Beginner's Guide to Workflow Automation with OpenAI, LangChain & API Integrations
Needs changesWhat this workflow does
This AI workflow has 21 nodes and runs manually, when you click “Execute workflow” (plus 3 other triggers). Along the way it connects OpenAI Chat Model. It also calls jsonplaceholder.typicode.com and api.openai.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 3 other triggers).
- Set Initial Data (Edit Fields (Set)): sets or maps fields
- Send Webhook Response (Respond to Webhook): sends the response back to the webhook caller
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 2 tools (Tool: Calculator, Tool: Current Time); memory: Window Buffer Memory
- Code: runs custom JavaScript code
- If: checks a condition and branches into true / false
- True Branch Data (Edit Fields (Set)): sets or maps fields
- False Branch Data (Edit Fields (Set)): sets or maps fields
- Merge: merges the data from its input branches
- Final Summary (Edit Fields (Set)): sets 1 field: workflow_summary
- HTTP Request: calls jsonplaceholder.typicode.com
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: jsonplaceholder.typicode.com, 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 - n8n Assistant (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent - n8n Assistant (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (15)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge - HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Code Tool
@n8n/n8n-nodes-langchain.toolCode - AI Agent
@n8n/n8n-nodes-langchain.agent - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
How it works This beginner-friendly workflow demonstrates the core building blocks of n8n. It guides you through: - Triggers – Start workflows manually, on a schedule, via webhooks, or through chat. - Data processing – Use Set and Code nodes to create,…