{ "name": "Product Launch Email", "nodes": [ { "parameters": { "content": "Placeholder for Product Launch Email", "height": 530, "width": 1100, "color": 5 }, "id": "61b01104-d0ec-4196-8d4f-a4d07cd749cd", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ -480, -240 ] }, { "parameters": { "httpMethod": "POST", "path": "product-launch-email" }, "id": "7ad673f2-6e28-4d06-b9c6-663a6fde1726", "name": "Webhook Trigger", "type": "n8n-nodes-base.webhook", "typeVersion": 1, "position": [ -300, 0 ] }, { "parameters": { "chunkSize": 400, "chunkOverlap": 40 }, "id": "ae25e008-ce10-4ee7-9fb1-11caf5e12e81", "name": "Text Splitter", "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter", "typeVersion": 1, "position": [ -130, 0 ] }, { "parameters": { "model": "embed-english-v3.0", "options": {} }, "id": "45c0d7d3-f8aa-44cb-9424-e08f4e39fbbd", "name": "Embeddings", "type": "@n8n/n8n-nodes-langchain.embeddingsCohere", "typeVersion": 1, "position": [ 70, 0 ], "credentials": { "cohereApi": { "id": "COHERE_API", "name": "Cohere" } } }, { "parameters": { "mode": "insert", "options": {}, "indexName": "product_launch_email" }, "id": "f5bce02a-2fe7-44f9-8958-a83cc9cc11e3", "name": "Supabase Insert", "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase", "typeVersion": 1, "position": [ 270, 0 ], "credentials": { "supabaseApi": { "id": "SUPABASE_API", "name": "Supabase account" } } }, { "parameters": { "indexName": "product_launch_email" }, "id": "98bbf1d4-b9de-465c-bd80-daf1a95d31e2", "name": "Supabase Query", "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase", "typeVersion": 1, "position": [ 270, -180 ], "credentials": { "supabaseApi": { "id": "SUPABASE_API", "name": "Supabase account" } } }, { "parameters": { "name": "Supabase", "description": "Vector context" }, "id": "7a04f90c-b92f-463c-b680-aababbec2f83", "name": "Vector Tool", "type": "@n8n/n8n-nodes-langchain.toolVectorStore", "typeVersion": 1, "position": [ 450, -180 ] }, { "parameters": {}, "id": "92265498-841d-4ba3-a444-250abc4665e7", "name": "Window Memory", "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", "typeVersion": 1.3, "position": [ 450, -40 ] }, { "parameters": { "options": {} }, "id": "7e5a965d-74d7-4c17-b587-8882ad721511", "name": "Chat Model", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1, "position": [ 450, -340 ], "credentials": { "openAiApi": { "id": "OPENAI_API", "name": "OpenAI" } } }, { "parameters": { "promptType": "define", "text": "Handle data", "options": { "systemMessage": "You are an assistant for Product Launch Email" } }, "id": "ba3f12f2-3db3-46ed-bd42-cabe92f48831", "name": "RAG Agent", "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 1, "position": [ 720, -40 ] }, { "parameters": { "operation": "append", "documentId": { "__rl": true, "value": "SHEET_ID", "mode": "list", "cachedResultName": "Product Launch Email" }, "sheetName": { "__rl": true, "value": "Log", "mode": "list", "cachedResultName": "Log" }, "columns": { "mappingMode": "defineBelow", "value": "Status", "schema": [] } }, "id": "0271fc8f-6af0-4a00-8fe2-4ff50ebedc45", "name": "Append Sheet", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4, "position": [ 930, -40 ], "credentials": { "googleSheetsOAuth2Api": { "id": "SHEETS_API", "name": "Google Sheets account" } } }, { "parameters": { "channel": "#alerts", "text": "Product Launch Email error: {$json.error.message}" }, "id": "c4784deb-12bd-4273-be2c-a7b6e76e28e5", "name": "Slack Alert", "type": "n8n-nodes-base.slack", "typeVersion": 1, "position": [ 930, 120 ], "credentials": { "slackApi": { "id": "SLACK_API", "name": "Slack" } } } ], "connections": { "Webhook Trigger": { "main": [ [ { "node": "Text Splitter", "type": "main", "index": 0 }, { "node": "Window Memory", "type": "main", "index": 0 } ] ] }, "Text Splitter": { "main": [ [ { "node": "Embeddings", "type": "main", "index": 0 } ] ], "ai_textSplitter": [ [ { "node": "Supabase Insert", "type": "ai_textSplitter", "index": 0 } ] ] }, "Embeddings": { "ai_embedding": [ [ { "node": "Supabase Insert", "type": "ai_embedding", "index": 0 }, { "node": "Supabase Query", "type": "ai_embedding", "index": 0 } ] ] }, "Supabase Insert": { "ai_document": [ [] ] }, "Supabase Query": { "ai_vectorStore": [ [ { "node": "Vector Tool", "type": "ai_vectorStore", "index": 0 } ] ] }, "Vector Tool": { "ai_tool": [ [ { "node": "RAG Agent", "type": "ai_tool", "index": 0 } ] ] }, "Window Memory": { "ai_memory": [ [ { "node": "RAG Agent", "type": "ai_memory", "index": 0 } ] ] }, "Chat Model": { "ai_languageModel": [ [ { "node": "RAG Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "RAG Agent": { "main": [ [ { "node": "Append Sheet", "type": "main", "index": 0 } ] ], "onError": [ [ { "node": "Slack Alert", "type": "main", "index": 0 } ] ] } }, "settings": { "executionOrder": "v1" }, "triggerCount": 1 }