This workflow corresponds to n8n.io template #2870 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "5401df22-bc19-472f-bfc5-6b80386fdb3d",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
460,
-160
],
"parameters": {},
"typeVersion": 1.7
},
{
"id": "ec6cf3f9-36d9-4c16-bc2c-15cdc715a152",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
280,
120
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "0a83c161-34c3-4cb1-ae28-f4d78656a741",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-340,
-20
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "c6a35360-88ed-4664-aa53-bc999bdfc68e",
"name": "Calculator",
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"position": [
760,
120
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2184afe7-2d1f-4fbb-9905-d76668cabdcc",
"name": "Meta Ads Insights",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
600,
120
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "debafe78-aa77-4ec1-875c-f4e7c48719b0",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-340,
-340
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "3d01568d-f080-4475-b4fc-058ad853be13",
"name": "Filter by chat ID",
"type": "n8n-nodes-base.filter",
"position": [
-120,
-340
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "701a0506-e61c-4df2-9de8-9d6c335cc84d",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-200,
-500
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "9c258c2b-049e-45b0-8d5e-e69d16bf7fa2",
"name": "Set sessionId",
"type": "n8n-nodes-base.set",
"position": [
140,
-160
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "e7540581-37f5-4aa1-a549-3800b7667a63",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
-500
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "439cf1c6-3dbb-4db9-9f98-1fface2fb72c",
"name": "Chat memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
440,
120
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "fe0051ab-14c1-4756-8cac-8f9bd83ab0fb",
"name": "Send message",
"type": "n8n-nodes-base.telegram",
"position": [
880,
-160
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "63565686-ac87-4d83-b4c1-f21d116504d0",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1060,
-500
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f02f77e0-e22b-49f0-8236-fe8909f93c2c",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
780,
-440
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "00266b8f-4291-446d-b7d6-5253bd5e11a1",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
560,
260
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f7e8f40e-0dec-4fcd-9f0c-513c4e928312",
"name": "Chat Memory Manager",
"type": "@n8n/n8n-nodes-langchain.memoryManager",
"position": [
1540,
180
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "52731de1-dc59-47e7-b30e-9fc3c88f2ab2",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-260
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c7237776-4f2b-40bc-8bfc-1d64183f0874",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
20
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ac7d8426-3f0f-4e36-be80-f54e027e0e4e",
"name": "Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1560,
360
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "ac10fe4e-3827-4db7-8601-aec540aeb3b9",
"name": "Clean Memory",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1160,
200
],
"parameters": {},
"typeVersion": 2
},
{
"id": "2d20bede-4d1b-44c7-8be9-1f717cdf31fd",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
1340,
180
],
"parameters": {},
"typeVersion": 1.1
}
],
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send message",
"type": "main",
"index": 0
}
]
]
},
"Calculator": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Chat Memory": {
"ai_memory": [
[
{
"node": "Chat Memory Manager",
"type": "ai_memory",
"index": 0
}
]
]
},
"Chat memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Clean Memory": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Set sessionId": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Filter by chat ID",
"type": "main",
"index": 0
}
]
]
},
"Filter by chat ID": {
"main": [
[
{
"node": "Set sessionId",
"type": "main",
"index": 0
}
]
]
},
"Meta Ads Insights": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Set sessionId",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Chat Memory Manager",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Chat with an AI and ask questions about your Meta Ads metrics.
Source: https://n8n.io/workflows/2870/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This template attempts to create an AI-powered content assistant for WordPress sites using Mistral AI, enabling article recommendations, content summarization, and contextual Q&A capabilities.
by Varritech Technologies
Community Node Disclaimer: This workflow uses KlickTipp community nodes.
Airtable AI Agent. Uses lmChatOpenAi, agent, toolWorkflow, toolCode. Chat trigger; 42 nodes.
Ai Agent To Chat With Airtable And Analyze Data. Uses lmChatOpenAi, agent, stickyNote, memoryBufferWindow. Chat trigger; 41 nodes.