This workflow corresponds to n8n.io template #4388 — we link there as the canonical source.
This workflow follows the Agent → Execute Workflow 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": "611a2bb4-8991-4144-a0c1-78a5cbefb966",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
480,
740
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "6b10af4c-4b89-4d44-945f-799aa5fe50be",
"name": "Save Long Term Memories",
"type": "n8n-nodes-base.googleDocs",
"position": [
1120,
700
],
"parameters": {},
"typeVersion": 2
},
{
"id": "2e9e0311-a2bf-483e-ba1f-40c341813cd8",
"name": "Saved response",
"type": "n8n-nodes-base.set",
"position": [
1300,
700
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "319c3f0a-c256-4ccc-b711-1fb5c02fe8f4",
"name": "Respond with long term memories",
"type": "n8n-nodes-base.set",
"position": [
1300,
900
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "e197e769-decb-4c5b-b73e-17a2e9edf3d4",
"name": "Retrieve Long Term Memories",
"type": "n8n-nodes-base.googleDocs",
"position": [
1120,
900
],
"parameters": {},
"typeVersion": 2
},
{
"id": "8f9ec70f-d492-4274-bc21-30c62a85ec1d",
"name": "Memory Tool Router",
"type": "n8n-nodes-base.switch",
"position": [
820,
740
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "77021caf-04fe-4308-8486-b9dfaddbdd4d",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
640,
740
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "9150f75e-c643-4591-8805-ab3ff38219ed",
"name": "Save Memories",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
480,
1180
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "dc5b064b-e66d-4ecf-9196-c68b0a5b9ddb",
"name": "Retrieve Memories",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
660,
1180
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "d24e81fd-405a-449a-bcb7-0d2f76f848bc",
"name": "Send Memories to Discord",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
840,
1180
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "ebed3fad-a567-421e-91be-cc8328ee294a",
"name": "4o-mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1260,
1260
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "c1f296d4-0f28-46e8-8497-c84d92b8589f",
"name": "MCP Server Trigger",
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"position": [
560,
940
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b870366a-b4aa-4547-96ca-bcae0365d1df",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1280,
1080
],
"parameters": {},
"typeVersion": 1.9
},
{
"id": "52a98e45-fe71-4dd5-bd6a-34b64c0118d5",
"name": "Retrieve Long Term Memories Discord",
"type": "n8n-nodes-base.googleDocs",
"position": [
1120,
1120
],
"parameters": {},
"typeVersion": 2
},
{
"id": "a9dc7e5d-d621-40e7-96a4-5f4006905863",
"name": "DM User",
"type": "n8n-nodes-base.discordTool",
"position": [
1520,
1260
],
"parameters": {},
"typeVersion": 2
},
{
"id": "dec22729-2b44-48c0-9a60-67902b2381f8",
"name": "Send to Channel",
"type": "n8n-nodes-base.discordTool",
"position": [
1400,
1260
],
"parameters": {},
"typeVersion": 2
}
],
"connections": {
"4o-mini": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"DM User": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Memory Tool Router",
"type": "main",
"index": 0
}
]
]
},
"Save Memories": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Send to Channel": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Retrieve Memories": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Memory Tool Router": {
"main": [
[
{
"node": "Save Long Term Memories",
"type": "main",
"index": 0
}
],
[
{
"node": "Retrieve Long Term Memories",
"type": "main",
"index": 0
}
],
[
{
"node": "Retrieve Long Term Memories Discord",
"type": "main",
"index": 0
}
]
]
},
"Save Long Term Memories": {
"main": [
[
{
"node": "Saved response",
"type": "main",
"index": 0
}
]
]
},
"Send Memories to Discord": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
},
"Retrieve Long Term Memories": {
"main": [
[
{
"node": "Respond with long term memories",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Retrieve Long Term Memories Discord": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Need help? Want access to this workflow + many more paid workflows + live Q&A sessions with a top verified n8n creator?
Source: https://n8n.io/workflows/4388/ — 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.
Need help? Want access to this workflow + many more paid workflows + live Q&A sessions with a top verified n8n creator?
The best content automation template in the market is now even better—with “deep research” on time-sensitive topics\! Unlike most n8n content automation templates that are mainly for “demo purposes,”
Agent Nodes. Uses lmChatOpenAi, slack, stopAndError, errorTrigger. Event-driven trigger; 72 nodes.
Splitout Redis. Uses executeWorkflowTrigger, n8n, redis, splitOut. Event-driven trigger; 46 nodes.
3770. Uses executeWorkflowTrigger, n8n, redis, agent. Event-driven trigger; 46 nodes.