About this recipe
Recipe Template
{
"meta": {
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
},
"nodes": [
{
"id": "939bb301-5e12-4d5b-9a56-61a61cca5f0d",
"name": "OpenAI Chat Model",
"type": "@n8n\/n8n-nodes-langchain.lmChatOpenAi",
"position": [
640,
460
],
"parameters": {
"model": "gpt-4o-mini",
"options": []
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "372777e8-ce90-4dea-befc-ac1b2eb4729f",
"name": "Window Buffer Memory",
"type": "@n8n\/n8n-nodes-langchain.memoryBufferWindow",
"position": [
780,
460
],
"parameters": [],
"typeVersion": 1.2
},
{
"id": "7a8f0ad1-1c00-4043-b3e5-c88521140a1a",
"name": "SerpAPI",
"type": "@n8n\/n8n-nodes-langchain.toolSerpApi",
"position": [
920,
460
],
"parameters": {
"options": []
},
"credentials": {
"serpApi": {
"id": "aJCKjxx6U3K7ydDe",
"name": "SerpAPI account"
}
},
"typeVersion": 1
},
{
"id": "a7624108-e3da-4193-a625-887314216b8b",
"name": "When chat message received",
"type": "@n8n\/n8n-nodes-langchain.chatTrigger",
"position": [
360,
240
],
"webhookId": "53c136fe-3e77-4709-a143-fe82746dd8b6",
"parameters": {
"options": []
},
"typeVersion": 1.1
},
{
"id": "6b8b7de8-fe3f-43b5-97ce-a52a9e44eb5e",
"name": "AI Agent",
"type": "@n8n\/n8n-nodes-langchain.agent",
"position": [
680,
240
],
"parameters": {
"options": []
},
"typeVersion": 1.6
}
],
"pinData": [],
"connections": {
"SerpAPI": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
How to Use an n8n Template
Create a New Workflow
Click "New Workflow" in your n8n dashboard to get started.
Copy & Paste Template
First, copy this template:
Click here to copy the JSON
.
Then, in n8n, click the three dots (···) → "Import from file" and paste the JSON code.
Customize the Nodes
Go through each node in the workflow to update inputs like spreadsheet IDs, email addresses, or message content. Adjust field mappings to match your data.
Grant Access
For nodes that connect to external apps (like Google Sheets or Slack), you'll need to grant access. Connect your accounts using OAuth or an API key and save the credentials in the node.
Test It
Run the workflow by clicking "Execute Node" for each step or "Run Once" for the whole thing. Check the right sidebar to inspect data and debug any errors (they'll show up in red).
Activate Workflow
Once everything works as expected, click the "Activate" toggle to turn your workflow on. You're all set!