🤖 Build resilient AI workflows with automatic GPT and Gemini failover chain
Needs changesWhat this workflow does
This AI workflow has 6 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI Chat Model and Google Gemini Chat Model.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Agent Variables (Edit Fields (Set)): sets 2 fields: models, fail_count
- AI Agent: runs an AI agent, with model: Fallback Models
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- LangChain Code (legacy) in Fallback Models: no direct replacement.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| LangChain Code (legacy) Fallback Models | No direct replacement |
Nodes used (6)
- AI Agent
@n8n/n8n-nodes-langchain.agent - Edit Fields (Set)
n8n-nodes-base.set - LangChain Code
@n8n/n8n-nodes-langchain.code - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Manual Trigger
n8n-nodes-base.manualTrigger
From the author
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works This workflow demonstrates how to create a resilient AI Agent that automatically falls back to a different language model if the primary one…