AI agent to chat with Airtable and analyze data
Needs changesWhat this workflow does
This AI workflow has 30 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects OpenAI Chat Model and Airtable. It also calls api.openai.com over HTTP.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 5 tools (Search records, Get base schema, Create map image, Get list of bases…); memory: Window Buffer Memory
- Switch: routes items into 4 branches
- Get Bases (Airtable): work with base
- Get Base/Tables schema (Airtable): get schema (base)
- If: checks a condition and branches into true / false
- OpenAI - Create thread (HTTP Request): calls api.openai.com (POST)
- Aggregate: combines items into one
- Aggregate: combines items into one
- Merge: merges the data from its input branches
- Set schema and prompt (Edit Fields (Set)): sets 2 fields: prompt, schema
…plus 11 more steps. See the full node list below.
Services it uses
HTTP calls to: api.openai.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (14)
- OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Aggregate
n8n-nodes-base.aggregate - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Code Tool
@n8n/n8n-nodes-langchain.toolCode - Airtable
n8n-nodes-base.airtable - HTTP Request
n8n-nodes-base.httpRequest
From the author
Video Guide I prepared a detailed guide that shows the entire process of building an AI agent that integrates with Airtable data in n8n. This template covers everything from data preparation to advanced configurations. Youtube Link Who is this for? This…