# templates

name: RAG Starter Template using Simple Vector Stores, Form trigger and OpenAI
author_name: n8n Team
author_username: n8n-team
categories: []
created_at: 2025-06-17T19:16:08.694Z
updated_at: 2025-06-17T19:16:08.694Z
url: https://n8n.io/workflows/5010
scraped_at: 2025-07-06 21:16:30
description:
  This template quickly shows how to use RAG in n8n.

  Who is this for?
  This template is for everyone who wants to start giving knowledge to their Agents through RAG.

  Requirements
  Have a PDF with custom knowledge that you want to provide to your agent.

  Setup
  No setup required. Just hit Execute Workflow, upload your knowledge document and then start chatting.

  How to customize this to your needs
  Add custom instructions to your Agent by changing the prompts in it.
  Add a different way to load in knowledge to your vector store, e.g. by looking at some Google Drive files or loading knowledge from a table.
  Exchange the Simple Vector Store nodes with your own vector store tools ready for production.
  Add a more sophisticated way to rank files found in the vector store.

  For more information read our docs on RAG in n8n.

nodes_used:
  ["@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.vectorStoreInMemory","@n8n/n8n-nodes-langchain.documentDefaultDataLoader"]

workflow_json:
  {"meta":{"instanceId":"257476b1ef58bf3cb6a46e65fac7ee34a53a5e1a8492d5c6e4da5f87c9b82833"},"nodes":[{"id":"83ed351e-90e8-458f-a01b-73001ef1800f","name":"Upload your file here","type":"n8n-nodes-base.formTrigger","position":[220,-120],"webhookId":"82848bc4-5ea2-4e5a-8bb6-3c09b94a8c5d","parameters":{"options":{},"formTitle":"Upload your data to test RAG","formFields":{"values":[{"fieldType":"file","fieldLabel":"Upload your file(s)","requiredField":true,"acceptFileTypes":".pdf, .csv"}]}},"typeVersion":2.2},{"id":"26d63e24-2592-41f9-9b4b-edab81e99f21","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[860,360],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"14","name":"OpenAi account"}},"typeVersion":1.2},{"id":"3a69c8a7-bf95-4de2-84b0-ae2cc3d2e4e7","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[660,40],"parameters":{"options":{},"dataType":"binary"},"typeVersion":1.1},{"id":"0b42832b-c9e8-4627-b36c-94fc5e242b33","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-320,-180],"parameters":{"color":4,"width":440,"height":300,"content":"### Readme\nLoad your data into a vector database with the 📚 **Load Data** flow, and then use your data as chat context with the 🐕 **Retriever** flow.\n\n**Quick start**\n1. Click on the `Execute Workflow` button to run the 📚 **Load Data** flow.\n2. Click on `Open Chat` button to run the 🐕 **Retriever** flow. Then ask a question about content from your document(s)\n\n\nFor more info, check our [docs on RAG in n8n](https://docs.n8n.io/advanced-ai/rag-in-n8n/)"},"typeVersion":1},{"id":"f902ab8f-4620-4a95-86f7-c5857c4d6c4f","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[160,-180],"parameters":{"color":7,"width":700,"height":460,"content":"### 📚 Load Data Flow"},"typeVersion":1},{"id":"0f4185ea-d7a9-44a9-a824-98f9dc2c2a5d","name":"Insert Data to Store","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","position":[400,-120],"parameters":{"mode":"insert","memoryKey":{"__rl":true,"mode":"list","value":"vector_store_key","cachedResultName":"vector_store_key"}},"typeVersion":1.2},{"id":"ce86b41b-7e1b-458f-ab13-d6b187854ae8","name":"Query Data Tool","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","position":[1280,80],"parameters":{"mode":"retrieve-as-tool","toolName":"knowledge_base","memoryKey":{"__rl":true,"mode":"list","value":"vector_store_key"},"toolDescription":"Use this knowledge base to answer questions from the user"},"typeVersion":1.2},{"id":"0039537b-558c-4fe8-9716-f8aa13676f4a","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1280,-140],"parameters":{"options":{}},"typeVersion":2},{"id":"2669a65e-f0f3-45aa-95c0-621b15a4fc67","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[1060,-140],"webhookId":"4091fa09-fb9a-4039-9411-7104d213f601","parameters":{"options":{}},"typeVersion":1.1},{"id":"d43cf585-4192-4f53-9532-4677923289ba","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1060,80],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"typeVersion":1.2},{"id":"3d1b3f5a-bc35-4739-a618-9c85820d39a0","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[940,-180],"parameters":{"color":7,"width":680,"height":460,"content":"### 🐕 2. Retriever Flow"},"typeVersion":1},{"id":"8d4c68cf-64d1-4b3a-bb19-2f003303c1df","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1000,320],"parameters":{"color":4,"width":320,"height":240,"content":"### Embeddings\n\nThe Insert and Retrieve operation use the same embedding node.\n\nThis is to ensure that they are using the **exact same embeddings and settings**.\n\nDifferent embeddings might not work at all, or have unintended consequences.\n"},"typeVersion":1}],"pinData":{},"connections":{"Query Data Tool":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Insert Data to Store","type":"ai_embedding","index":0},{"node":"Query Data Tool","type":"ai_embedding","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Insert Data to Store","type":"ai_document","index":0}]]},"Upload your file here":{"main":[[{"node":"Insert Data to Store","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]}}}


name: Save Costs In RAG Workflows using the Q&A Tool With Multiple Models
author_name: Niklas Hatje
author_username: nik8n
categories: []
created_at: 2025-06-17T19:30:43.009Z
updated_at: 2025-06-17T19:30:43.009Z
url: https://n8n.io/workflows/5011
scraped_at: 2025-07-06 21:16:30
description:
  This template shows how to use the Question and Answer tool to save costs in RAG use cases.

  Who is this for?
  This template is for everyone who wants to start giving knowledge to their Agents through RAG.

  Requirements
  Have a PDF with custom knowledge that you want to provide to your agent.

  Setup
  No setup required. Just hit Execute Workflow, upload your knowledge document and then start chatting.

  How to customize this to your needs
  Add custom instructions to your Agent by changing the prompts in it.
  Add a different way to load in knowledge to your vector store, e.g. by looking at some Google Drive files or loading knowledge from a table.
  Describe your data properly in the Q&A tool
  Exchange the Simple Vector Store nodes with your own vector store tools ready for production.
  Add a more sophisticated way to rank files found in the vector store.

  For more information read our docs on RAG in n8n.

nodes_used:
  ["@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.vectorStoreInMemory","@n8n/n8n-nodes-langchain.documentDefaultDataLoader","@n8n/n8n-nodes-langchain.toolVectorStore"]

workflow_json:
  {"meta":{"instanceId":"257476b1ef58bf3cb6a46e65fac7ee34a53a5e1a8492d5c6e4da5f87c9b82833","templateCredsSetupCompleted":true},"nodes":[{"id":"83ed351e-90e8-458f-a01b-73001ef1800f","name":"Upload your file here","type":"n8n-nodes-base.formTrigger","position":[220,-120],"webhookId":"82848bc4-5ea2-4e5a-8bb6-3c09b94a8c5d","parameters":{"options":{},"formTitle":"Upload your data to test RAG","formFields":{"values":[{"fieldType":"file","fieldLabel":"Upload your file(s)","requiredField":true,"acceptFileTypes":".pdf, .csv"}]}},"typeVersion":2.2},{"id":"26d63e24-2592-41f9-9b4b-edab81e99f21","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[860,460],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"14","name":"OpenAi account"}},"typeVersion":1.2},{"id":"3a69c8a7-bf95-4de2-84b0-ae2cc3d2e4e7","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[660,40],"parameters":{"options":{},"dataType":"binary"},"typeVersion":1.1},{"id":"0b42832b-c9e8-4627-b36c-94fc5e242b33","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-320,-180],"parameters":{"color":4,"width":440,"height":300,"content":"### Readme\nLoad your data into a vector database with the 📚 **Load Data** flow, and then use your data as chat context with the 🐕 **Retriever** flow.\n\n**Quick start**\n1. Click on the `Execute Workflow` button to run the 📚 **Load Data** flow.\n2. Click on `Open Chat` button to run the 🐕 **Retriever** flow. Then ask a question about content from your document(s)\n\n\nFor more info, check our [docs on RAG in n8n](https://docs.n8n.io/advanced-ai/rag-in-n8n/)"},"typeVersion":1},{"id":"f902ab8f-4620-4a95-86f7-c5857c4d6c4f","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[160,-180],"parameters":{"color":7,"width":700,"height":460,"content":"### 📚 Load Data Flow"},"typeVersion":1},{"id":"0f4185ea-d7a9-44a9-a824-98f9dc2c2a5d","name":"Insert Data to Store","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","position":[400,-120],"parameters":{"mode":"insert","memoryKey":{"__rl":true,"mode":"list","value":"vector_store_key","cachedResultName":"vector_store_key"}},"typeVersion":1.2},{"id":"ce86b41b-7e1b-458f-ab13-d6b187854ae8","name":"Query Data Tool","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","position":[1300,200],"parameters":{"memoryKey":{"__rl":true,"mode":"list","value":"vector_store_key"}},"typeVersion":1.2},{"id":"0039537b-558c-4fe8-9716-f8aa13676f4a","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1280,-140],"parameters":{"options":{}},"typeVersion":2},{"id":"2669a65e-f0f3-45aa-95c0-621b15a4fc67","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[1060,-140],"webhookId":"4091fa09-fb9a-4039-9411-7104d213f601","parameters":{"options":{}},"typeVersion":1.1},{"id":"3d1b3f5a-bc35-4739-a618-9c85820d39a0","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[940,-180],"parameters":{"color":7,"width":820,"height":520,"content":"### 🐕 2. Retriever Flow"},"typeVersion":1},{"id":"6553a758-c655-4196-88be-9d93187f9c7b","name":"Answer questions with a vector store","type":"@n8n/n8n-nodes-langchain.toolVectorStore","position":[1440,60],"parameters":{"description":"The data contains custom knowledge"},"typeVersion":1.1},{"id":"d43cf585-4192-4f53-9532-4677923289ba","name":"Expensive model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1060,80],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1","cachedResultName":"gpt-4.1"},"options":{}},"credentials":{"openAiApi":{"id":"14","name":"OpenAi account"}},"typeVersion":1.2},{"id":"18dcc49d-9ce0-4746-8135-7e4c77cfa501","name":"Cheap Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1600,200],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1-mini"},"options":{}},"credentials":{"openAiApi":{"id":"14","name":"OpenAi account"}},"typeVersion":1.2}],"pinData":{},"connections":{"Cheap Model":{"ai_languageModel":[[{"node":"Answer questions with a vector store","type":"ai_languageModel","index":0}]]},"Expensive model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Query Data Tool":{"ai_tool":[[]],"ai_vectorStore":[[{"node":"Answer questions with a vector store","type":"ai_vectorStore","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Insert Data to Store","type":"ai_embedding","index":0},{"node":"Query Data Tool","type":"ai_embedding","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Insert Data to Store","type":"ai_document","index":0}]]},"Upload your file here":{"main":[[{"node":"Insert Data to Store","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Answer questions with a vector store":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]}}}


name: Natural Language Database Queries with Dual-Agent AI & PostgreSQL Integration
author_name: Paul
author_username: diagopl
categories: []
created_at: 2025-06-17T21:17:10.100Z
updated_at: 2025-06-17T21:17:10.100Z
url: https://n8n.io/workflows/5012
scraped_at: 2025-07-06 21:16:30
description:
  AI Database Assistant with Smart Query's & PostgreSQL Integration

  Description:

  🚀 Transform Your Database into an Intelligent AI Assistant

  This workflow creates a smart database assistant that safely handles natural language queries without crashing your system. Features dual-agent architecture with built-in query limits and PostgreSQL optimization – perfect for commercial applications!

  ✅ Ideal for:
  SaaS developers building database search features 🔍
  Database administrators providing safe AI access 🛡️
  Business teams needing user-friendly data queries 📊
  Anyone wanting ChatGPT-like database interaction 🤖

  🔧 How It Works
  1️⃣ User asks a question – "Show me top 10 popular products"
  2️⃣ Main AI Agent – Interprets the request and ensures safety limits
  3️⃣ SQL Sub-Agent – Generates precise PostgreSQL queries
  4️⃣ Database executes – Returns formatted, limited results safely

  ⚡ Setup Instructions

  1️⃣ Prepare Your Database
  Ensure PostgreSQL is accessible from n8n
  Note your table structure and column names
  Set up database connection credentials

  2️⃣ Customize the Templates
  Replace [YOUR_TABLE_NAME] with your actual table name
  Update [YOUR_FIELDS] with your column names
  Modify examples to match your use case
  Important**: Keep all LIMIT clauses intact!

  3️⃣ Configure the Agents
  Copy Main Agent system message to your primary AI node
  Copy Sub-Agent system message to your SQL generator node
  Connect the sub-workflow between both agents

  4️⃣ Test & Deploy
  Test with sample queries like "Show me 5 recent items"
  Verify query limits work (max 50 results)
  Deploy and monitor performance

  🎯 Why Use This Workflow?
  ✔️ System Protection – Built-in limits prevent crashes from large queries
  ✔️ Natural Language – Users ask questions in plain English
  ✔️ Commercial Ready – Generic templates work with any database
  ✔️ Dual-Agent Safety – Smart interpretation + precise SQL generation
  ✔️ PostgreSQL Optimized – Handles complex schemas and data types

  🚨 Critical Features
  Query Limits**: Default 10, maximum 50 results (can be modified)
  Error Prevention**: No unlimited data retrieval
  Smart Routing**: Natural language → Safe SQL → Formatted results
  Customizable**: Works with any PostgreSQL database schema

  🔗 Start building your AI database assistant today – safe, smart, and scalable!

nodes_used:
  ["n8n-nodes-base.postgres","n8n-nodes-base.telegram","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.toolWorkflow","@n8n/n8n-nodes-langchain.openAi","@n8n/n8n-nodes-langchain.memoryPostgresChat","@n8n/n8n-nodes-langchain.lmChatOpenRouter","@n8n/n8n-nodes-langchain.toolThink"]

workflow_json:
  {"id":"XIcKeYYhzG9DdDPN","meta":{"instanceId":"e7ccf4281d5afb175c79c02db95b45f15d5b53862cb6bc357c5e5bc26567f35c","templateCredsSetupCompleted":true},"name":"Template 2","tags":[],"nodes":[{"id":"c4a7b5c1-f74e-4de0-9469-146a197c42f5","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-1560,360],"parameters":{"inputSource":"passthrough"},"typeVersion":1.1},{"id":"1f37374e-3c5c-4dad-bfa0-5e948cfbd6e5","name":"Query agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-1320,360],"parameters":{"text":"={{ $json.query }}","options":{"systemMessage":"# SQL Query Generator - Sub Agent Template\n\nYou are a PostgreSQL query generator. Convert user requests into SELECT queries for the database table.\n\n## CRITICAL: OUTPUT FORMAT\n- Output ONLY the SQL query\n- NO explanations, descriptions, or additional text\n- NO code blocks or formatting\n- Just the raw SQL query string\n\n## DATABASE SCHEMA:\n**[REPLACE WITH YOUR DATABASE SCHEMA]**\n```\n[TABLE_NAME] Table:\nid (bigint, Primary Key)\n[field_name] (data_type)\n[field_name] (data_type)\n...\n```\n\n## STRICT RULES:\n1. ONLY SELECT queries - NO INSERT/UPDATE/DELETE/DROP/ALTER\n2. Table name: \"[YOUR_TABLE_NAME]\" (use double quotes if needed)\n3. Column names with spaces: use double quotes (\"[column name]\")\n4. Boolean columns: use true/false (not 1/0)\n5. Text searches: use ILIKE for case-insensitive matching\n6. Always end query with semicolon\n\n## EXAMPLES:\n**[CUSTOMIZE THESE EXAMPLES FOR YOUR USE CASE]**\nUser: \"Show verified entries\" \nResponse: SELECT * FROM \"[YOUR_TABLE]\" WHERE [verified_field] = true;\n\nUser: \"Top 10 most popular\"  \nResponse: SELECT * FROM \"[YOUR_TABLE]\" ORDER BY [popularity_field] DESC LIMIT 10;\n\nUser: \"Items containing [keyword]\"\nResponse: SELECT * FROM \"[YOUR_TABLE]\" WHERE [description_field] ILIKE '%[keyword]%';\n\nREMEMBER: Output ONLY the SQL query, nothing else."},"promptType":"define"},"typeVersion":2},{"id":"1019eeda-425f-4450-934e-0224c689a801","name":"Think","type":"@n8n/n8n-nodes-langchain.toolThink","position":[-1140,580],"parameters":{"description":"Think if the ouputed query really matches the input message."},"typeVersion":1},{"id":"2219bc4a-cdf2-4297-9bd6-423d0f138319","name":"OpenRouter Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[-1340,560],"parameters":{"model":"anthropic/claude-3.5-sonnet","options":{}},"credentials":{"openRouterApi":{"id":"1t22HwKbMlWsWxcJ","name":"OpenRouter account"}},"typeVersion":1},{"id":"21a65536-abfd-4d19-94c9-9aa8d839db16","name":"Postgres Chat Memory","type":"@n8n/n8n-nodes-langchain.memoryPostgresChat","position":[-280,80],"parameters":{"sessionKey":"C08SU8T0FJ8","sessionIdType":"customKey"},"credentials":{"postgres":{"id":"6uE1gPELXSqR1Wgn","name":"Postgres accou"}},"typeVersion":1.3},{"id":"32cf9699-649c-4781-b27b-c68e7ff306a4","name":"OpenRouter Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[-440,80],"parameters":{"model":"anthropic/claude-3.5-sonnet","options":{}},"credentials":{"openRouterApi":{"id":"1t22HwKbMlWsWxcJ","name":"OpenRouter account"}},"typeVersion":1},{"id":"cacfb298-2ee6-4292-ade7-bb18436df301","name":"Think1","type":"@n8n/n8n-nodes-langchain.toolThink","position":[-140,80],"parameters":{},"typeVersion":1},{"id":"6c979f9c-38df-4b8d-a7c2-be499bd37cd7","name":"Download File1","type":"n8n-nodes-base.telegram","position":[-1040,-280],"webhookId":"00c7755c-cd84-4aa4-89fe-c56f1f0cb50d","parameters":{"fileId":"={{ $json.message.voice.file_id }}","resource":"file"},"credentials":{"telegramApi":{"id":"GX0f93u8bE9meFhE","name":"customer service"}},"typeVersion":1.2},{"id":"578c6f2d-d738-49d3-95f4-6de6a48c5754","name":"Transcribe1","type":"@n8n/n8n-nodes-langchain.openAi","position":[-820,-280],"parameters":{"options":{},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"OQJASLp1qn1StvpI","name":"OpenAi account"}},"typeVersion":1.6},{"id":"68b40dcf-46a0-47e8-9f63-ce020f08c4c6","name":"Telegram Trigger1","type":"n8n-nodes-base.telegramTrigger","position":[-1480,-180],"webhookId":"75096a78-a466-4f4e-bc0d-f68e9e952231","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"1vaRNATU5x2lDpH2","name":"supachat"}},"typeVersion":1.1},{"id":"e28131b3-4c13-4c5a-b6d1-e9be94970c9f","name":"Voice or Text","type":"n8n-nodes-base.switch","position":[-1260,-180],"parameters":{"rules":{"values":[{"outputKey":"Voice","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"612fa3b1-0e08-47f3-9455-746568546ab6","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{ $json.message.voice.file_id }}","rightValue":""}]},"renameOutput":true},{"outputKey":"Text","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8c844924-b2ed-48b0-935c-c66a8fd0c778","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{ $json.message.text }}","rightValue":""}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"b8d80841-beeb-43f9-a51b-3ea3683c4ba1","name":"Text","type":"n8n-nodes-base.set","position":[-940,-80],"parameters":{"options":{},"assignments":{"assignments":[{"id":"fe7ecc99-e1e8-4a5e-bdd6-6fce9757b234","name":"text","type":"string","value":"={{ $json.message.text }}"}]}},"typeVersion":3.4},{"id":"e5e1508a-ceb2-49fd-b3d2-ef87338a230b","name":"Merge","type":"n8n-nodes-base.merge","position":[-600,-180],"parameters":{},"typeVersion":3.1},{"id":"be9cde2d-e131-406b-a061-49193941e159","name":"Main agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-320,-180],"parameters":{"text":"={{ $json.text }}","options":{"systemMessage":"# Database Assistant - Main Agent\n\nYou are an intelligent database assistant that helps users find and explore information from a structured database. You work with a specialized SQL sub-agent to retrieve data efficiently.\n\n## DATABASE SCHEMA:\n**[REPLACE WITH YOUR DATABASE SCHEMA]**\n```\nExample format:\nid (bigint, Primary Key)\nname (text)\ndescription (text)\ncategory (text)\n...\n```\n\n## CRITICAL OPERATIONAL RULES:\n- **ALWAYS use LIMIT in queries** - Default: 10, Maximum: 50\n- **NEVER request unlimited data** - this breaks the system\n- Use ORDER BY with LIMIT for meaningful results\n- Apply specific filters and conditions to narrow results\n\n## COMMUNICATION WITH SQL SUB-AGENT:\nSend clear, natural language requests:\n- \"Show me the 10 most popular [YOUR_ITEMS] in [CATEGORY_FIELD]\"\n- \"Find 5 newest verified entries containing '[KEYWORD]'\"\n- \"Get top 15 [YOUR_ITEMS] by [ACTIVITY_METRIC]\"\n- \"Search for entries with [PRICE_FIELD] less than [AMOUNT], limit 20\"\n\n## RESPONSE GUIDELINES:\nPresent results in a user-friendly format:\n- Highlight key information ([NAME_FIELD], [DESCRIPTION_FIELD], metrics)\n- Include relevant metadata ([VERIFICATION_FIELD], [POPULARITY_FIELD], [CATEGORIES_FIELD])\n- Provide actionable insights\n- Suggest related searches or refinements\n\n## DATA INTERPRETATION:\n**[CUSTOMIZE THESE FIELD DESCRIPTIONS]**\n- **[POPULARITY_FIELD]**: [Description of what this metric means]\n- **[ACTIVITY_FIELD]**: [Description of recent activity indicator]\n- **[VERIFICATION_FIELD]**: [Description of quality/trust indicator]\n- **[CATEGORY_FIELD]**: [Description of classification system]\n- **[PRICE_FIELD]**: [Description of pricing (0 = free, etc.)]\n\nAlways respect system limits and focus on delivering relevant, targeted results."},"promptType":"define"},"typeVersion":2},{"id":"ec7a16f3-fd62-4952-a074-3c044de6e86f","name":"SEND MESSAGE","type":"n8n-nodes-base.telegram","position":[120,-180],"webhookId":"1aa59dcd-d299-439f-9fdc-96eae710da9d","parameters":{"text":"={{ $json.output }}","chatId":"(YOUR CHAT ID)","additionalFields":{}},"credentials":{"telegramApi":{"id":"1vaRNATU5x2lDpH2","name":"supachat"}},"typeVersion":1.2},{"id":"4dfb46ad-d110-40e6-9a87-3c247fc2d8d3","name":"CALL QUERY AGENT","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-20,80],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"Iw7dOCXYbpfRJrlW","cachedResultName":"query agent"},"description":"Call this tool for sql querys in natural language","workflowInputs":{"value":{},"schema":[],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"dd79a9fb-cf29-4266-a51d-114713e030c0","name":"ACCES DATABASE WITH DYNAMIC QUERYS","type":"n8n-nodes-base.postgres","position":[-980,360],"parameters":{"query":"{{ $json.output }}","options":{"largeNumbersOutput":"numbers","replaceEmptyStrings":true},"operation":"executeQuery"},"credentials":{"postgres":{"id":"6uE1gPELXSqR1Wgn","name":"Postgres accou"}},"typeVersion":2.6},{"id":"a302abcd-e6a0-4150-bcd7-84c549c1dc94","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1600,-540],"parameters":{"color":6,"width":1960,"height":800,"content":"# MAIN AGENT"},"typeVersion":1},{"id":"cfcf980f-e037-4c6a-9dd3-7ba4359f6b44","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1600,260],"parameters":{"color":4,"width":1220,"height":440,"content":"# SUB AGENT"},"typeVersion":1},{"id":"4aaa94db-f919-44d4-9c0f-c703d3838e94","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-2320,-540],"parameters":{"color":2,"width":1780,"height":1760,"content":"# Setup & Configuration Guide\n\n## 📋 **Setup Checklist**\n```\n□ Install N8N workflow platform\n□ Set up PostgreSQL database\n□ Configure AI Agent nodes\n□ Test sub-workflow connection\n□ Validate query limits\n□ Deploy and monitor\n```\n\n---\n\n## 🔧 **Database Configuration**\n```\n🎯 CRITICAL SETUP STEPS:\n1. Create your PostgreSQL table\n2. Replace [YOUR_TABLE_NAME] in templates\n3. Update database schema in both agents\n4. Set connection credentials in N8N\n5. Test database connectivity\n```\n\n---\n\n## 🤖 **Main Agent Setup**\n```\n📍 WHAT TO REPLACE:\n• [YOUR_DATABASE_SCHEMA] → Your actual table structure\n• [YOUR_ITEMS] → What you're querying (products, users, etc.)\n• [CATEGORY_FIELD] → Your category column name\n• [POPULARITY_FIELD] → Your popularity metric column\n• [PRICE_FIELD] → Your price column name\n```\n\n---\n\n## ⚙️ **Sub-Agent Configuration**\n```\n🔄 TEMPLATE REPLACEMENTS:\n• [YOUR_TABLE_NAME] → Actual table name\n• [field_name] → Your column names\n• [verified_field] → Your verification column\n• [popularity_field] → Your popularity column\n• [description_field] → Your description column\n```\n\n---\n\n## 🚨 **Critical System Limits**\n```\n⚠️ NEVER FORGET:\n• Default LIMIT: 10 results\n• Maximum LIMIT: 50 results\n• NO unlimited queries allowed\n• Always use ORDER BY with LIMIT\n• System will break without limits!\n```\n\n---\n\n## 🔗 **Workflow Architecture**\n```\n┌─────────────────┐\n│   USER QUERY    │\n└─────────┬───────┘\n          │\n┌─────────▼───────┐\n│   MAIN AGENT    │ ← Interprets user needs\n└─────────┬───────┘\n          │\n┌─────────▼───────┐\n│   SUB-AGENT     │ ← Generates SQL query\n└─────────┬───────┘\n          │\n┌─────────▼───────┐\n│   DATABASE      │ ← Executes query\n└─────────┬───────┘\n          │\n┌─────────▼───────┐\n│   FORMATTED     │ ← Returns to user\n│   RESPONSE      │\n└─────────────────┘\n```"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"36903df7-c2e2-4b12-b58d-9c9fbeebea24","connections":{"Text":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Merge":{"main":[[{"node":"Main agent","type":"main","index":0}]]},"Think":{"ai_tool":[[{"node":"Query agent","type":"ai_tool","index":0}]]},"Think1":{"ai_tool":[[{"node":"Main agent","type":"ai_tool","index":0}]]},"Main agent":{"main":[[{"node":"SEND MESSAGE","type":"main","index":0}]]},"Query agent":{"main":[[{"node":"ACCES DATABASE WITH DYNAMIC QUERYS","type":"main","index":0}]]},"Transcribe1":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Voice or Text":{"main":[[{"node":"Download File1","type":"main","index":0}],[{"node":"Text","type":"main","index":0}]]},"Download File1":{"main":[[{"node":"Transcribe1","type":"main","index":0}]]},"CALL QUERY AGENT":{"ai_tool":[[{"node":"Main agent","type":"ai_tool","index":0}]]},"Telegram Trigger1":{"main":[[{"node":"Voice or Text","type":"main","index":0}]]},"Postgres Chat Memory":{"ai_memory":[[{"node":"Main agent","type":"ai_memory","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"Query agent","type":"ai_languageModel","index":0}]]},"OpenRouter Chat Model1":{"ai_languageModel":[[{"node":"Main agent","type":"ai_languageModel","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Query agent","type":"main","index":0}]]}}}


name: Track n8n Workflow Changes Over Time with Compare Dataset & Google Sheets
author_name: Jimleuk
author_username: jimleuk
nodes_used: ["n8n-nodes-base.googleSheets"]
categories: []
created_at: 2025-06-17T22:43:15.197Z
updated_at: 2025-06-17T22:43:15.197Z
url: https://n8n.io/workflows/5013
scraped_at: 2025-07-06 21:16:30
description:
  This n8n template runs daily to track and report on any changes made to workflows  on any n8n instance.

  Useful if a team is working within a single instance and you want to be notified of what workflows have changed since you last visited them. Another use-case might be monitoring your managed instances for clients and being alerted when changes are made without your knowledge.

  See a sample Gsheet here: https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit?usp=sharing

  How it works
  A scheduled trigger is set to run once a day to review all available workflows.
  An n8n node imports the workflows as json.
  The workflows are brought into a loop where each is first checked to see if it exists in the designated google sheet.
  If not, a new entry is created and skipped.
  If the workflow has been captured before, then the comparison subworkflow can be executed using the previous and current versions of the workflow json data.
  The subworkflow uses the compare dataset tool to calculate the changes to nodes and connections for the given workflow.
  The results are then recorded back to the google sheet for review.

  How to use
  Start with the n8n node and try to filter by the workflows you're interested in tracking.
  Set the scheduled trigger interval to match the frequency to suit how often your workflows are being edited.

  Customising the workflow
  Want to get fancy? Add in an AI agent to help determine changes between the previous and current versions of the workflow. Add contextual explanations to reveal the impact of the changes.

workflow_json:
  {"meta":{"instanceId":"408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9","templateCredsSetupCompleted":true},"nodes":[{"id":"f2bb0773-754c-4535-99c0-14617221f64b","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-1100,100],"parameters":{"rule":{"interval":[{}]}},"typeVersion":1.2},{"id":"828cb1c8-f92a-4129-a6eb-4597ea809953","name":"Get Row","type":"n8n-nodes-base.googleSheets","position":[-100,100],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.id }}","lookupColumn":"id"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit?usp=drivesdk","cachedResultName":"97. Workflow Template Changes"}},"credentials":{"googleSheetsOAuth2Api":{"id":"XHvC7jIRR8A2TlUl","name":"Google Sheets account"}},"typeVersion":4.6,"alwaysOutputData":true},{"id":"6511415e-afa9-439c-b417-944c69b2c691","name":"Row Exists?","type":"n8n-nodes-base.if","position":[80,100],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"45b02cff-5406-4158-bb14-31cadf88b062","operator":{"type":"object","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"1791d64d-fbb1-4143-8925-f2d3dd15e645","name":"Create New Entry","type":"n8n-nodes-base.googleSheets","position":[280,280],"parameters":{"columns":{"value":{"id":"={{ $('Get Values').item.json.id }}","name":"={{ $('Get Values').item.json.name }}","nodes":"={{ $('Get Values').item.json.nodes.toJsonString() }}","status":"={{ $('Get Values').item.json.status }}","history":"={{$now.toISO() }} [info] Initiated","connections":"={{ $('Get Values').item.json.connections.toJsonString() }}","last_updated":"={{ $('Get Values').item.json.updatedAt }}"},"schema":[{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"name","type":"string","display":true,"required":false,"displayName":"name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":false,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"last_updated","type":"string","display":true,"required":false,"displayName":"last_updated","defaultMatch":false,"canBeUsedToMatch":true},{"id":"summary","type":"string","display":true,"required":false,"displayName":"summary","defaultMatch":false,"canBeUsedToMatch":true},{"id":"history","type":"string","display":true,"required":false,"displayName":"history","defaultMatch":false,"canBeUsedToMatch":true},{"id":"nodes","type":"string","display":true,"required":false,"displayName":"nodes","defaultMatch":false,"canBeUsedToMatch":true},{"id":"connections","type":"string","display":true,"removed":false,"required":false,"displayName":"connections","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{"useAppend":true},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit?usp=drivesdk","cachedResultName":"97. Workflow Template Changes"}},"credentials":{"googleSheetsOAuth2Api":{"id":"XHvC7jIRR8A2TlUl","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"56eacb4e-8c1d-454e-926b-3e91efc23639","name":"Compare Datasets","type":"n8n-nodes-base.compareDatasets","position":[-280,780],"parameters":{"options":{},"mergeByFields":{"values":[{"field1":"type","field2":"type"},{"field1":"name","field2":"name"}]}},"typeVersion":2.3},{"id":"1357e5ee-e456-4e71-8a84-1fbe22e879bf","name":"Current State","type":"n8n-nodes-base.set","position":[780,-20],"parameters":{"options":{},"assignments":{"assignments":[{"id":"a0306005-1c90-4e03-999c-0178663ff406","name":"name","type":"string","value":"={{ $('Get Values').item.json.name }}"},{"id":"847207dd-96a1-4d32-b854-d2965e34a44f","name":"nodes","type":"array","value":"={{ $('Get Values').item.json.nodes }}"},{"id":"e44844d9-b224-43c6-90f0-4e740b0da7fb","name":"connections","type":"array","value":"={{ $('Get Values').item.json.connections }}"},{"id":"e230a396-d27c-4604-b682-39217a40581a","name":"status","type":"string","value":"={{ $('Get Values').item.json.active ? 'active' : 'inactive' }}"}]}},"typeVersion":3.4},{"id":"6f97fba9-82d1-43b4-a51d-3bf9955a8d60","name":"Previous State","type":"n8n-nodes-base.set","position":[600,-20],"parameters":{"options":{},"assignments":{"assignments":[{"id":"98e1e832-ea3c-4bf9-862f-eb6f0c7892a3","name":"name","type":"string","value":"={{ $json.name }}"},{"id":"7594680d-0552-464d-9b2c-4ded8fdc3455","name":"nodes","type":"array","value":"={{ $json.nodes.parseJson() }}"},{"id":"5de5aab3-3236-4d47-88cb-701168aca8b8","name":"connections","type":"array","value":"={{ $json.connections.parseJson() }}"},{"id":"07c50e91-42ba-4fbb-be86-5b999c267541","name":"status","type":"string","value":"={{ $json.status }}"}]}},"typeVersion":3.4},{"id":"d50929da-1948-4283-a19d-4973d9c74acd","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[-500,100],"parameters":{"options":{}},"typeVersion":3},{"id":"2ec9bffd-4da4-41e5-9bb1-f2e1ace7db17","name":"Added Nodes","type":"n8n-nodes-base.aggregate","position":[-20,580],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"added"},"typeVersion":1},{"id":"2f07ae8b-fea4-4e01-bfae-0b9a689662bf","name":"Same Nodes","type":"n8n-nodes-base.aggregate","position":[-20,720],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"unchanged"},"typeVersion":1},{"id":"53e3083c-cf50-4361-bb70-bb6f1498c5b4","name":"Different Nodes","type":"n8n-nodes-base.aggregate","position":[-20,880],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"changed"},"typeVersion":1},{"id":"e28eb560-0fae-43a4-9e1f-1c8346d18ac0","name":"Removed Nodes","type":"n8n-nodes-base.aggregate","position":[-20,1020],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"removed"},"typeVersion":1},{"id":"c08719a3-b81a-4ee2-a6b8-d0463f70ccfe","name":"Report Nodes","type":"n8n-nodes-base.set","position":[420,1000],"parameters":{"mode":"raw","options":{},"jsonOutput":"={{\n{\n  \"nodes\": {\n    \"added_total\": $json.added?.length ?? 0,\n    \"added_names\": $json.added?.map(node =>\n      `${node.name} (${node.type.split('.').last()})`) ?? [],\n    \"removed_total\": $json.removed?.length ?? 0,\n    \"removed_names\": $json.removed?.map(node => `${node.name} (${node.type.split('.').last()})`) ?? []\n  }\n}\n}}"},"typeVersion":3.4},{"id":"900b67e3-465e-4e1d-8003-bdb312307569","name":"Compare Datasets1","type":"n8n-nodes-base.compareDatasets","position":[-280,1420],"parameters":{"options":{},"mergeByFields":{"values":[{"field1":"key","field2":"key"},{"field1":"node","field2":"node"},{"field1":"index","field2":"index"}]}},"typeVersion":2.3},{"id":"63e56c07-510e-4d28-a799-889cf94ef927","name":"Added Connections","type":"n8n-nodes-base.aggregate","position":[-20,1220],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"added"},"typeVersion":1},{"id":"42e3117e-2539-4667-bc99-263d46526fb4","name":"Same Connections","type":"n8n-nodes-base.aggregate","position":[-20,1360],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"unchanged"},"typeVersion":1},{"id":"cc09e996-b3af-4436-8eb2-8849745f3f76","name":"Different Connections","type":"n8n-nodes-base.aggregate","position":[-20,1520],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"changed"},"typeVersion":1},{"id":"658b2c72-8ff7-41c2-b4f9-a09109a408d9","name":"Removed Connections","type":"n8n-nodes-base.aggregate","position":[-20,1660],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"removed"},"typeVersion":1},{"id":"ca385cad-e275-4c5a-a880-9ac2ae0f1cf1","name":"Report Connections","type":"n8n-nodes-base.set","position":[420,1220],"parameters":{"mode":"raw","options":{},"jsonOutput":"={{\n{\n  \"connections\": {\n    \"added_total\": $json.added?.length ?? 0,\n    \"added_names\": $json.added?.map(node => `${node.key} [to] ${node.node}`) ?? [],\n    \"removed_total\": $json.removed?.length ?? 0,\n    \"removed_names\": $json.removed?.map(node => `${node.key} [to] ${node.node}`) ?? [],\n    \n  }\n}\n}}"},"typeVersion":3.4},{"id":"331d7764-752d-4b18-9b41-5c5f98997e13","name":"Merge Nodes Diff","type":"n8n-nodes-base.merge","position":[200,780],"parameters":{"mode":"combine","options":{"includeUnpaired":true},"combineBy":"combineByPosition","numberInputs":4},"typeVersion":3.2},{"id":"97a3ce94-acbb-40bd-b360-5891c62fbdfa","name":"Merge Connections Diff","type":"n8n-nodes-base.merge","position":[200,1420],"parameters":{"mode":"combine","options":{"includeUnpaired":true},"combineBy":"combineByPosition","numberInputs":4},"typeVersion":3.2},{"id":"ffe4301e-ad39-40e0-ae5b-c3ce3ed1cc32","name":"Merge Reports","type":"n8n-nodes-base.merge","position":[640,1120],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3.2},{"id":"0999ab7d-8227-4e6e-a08f-9821d806bd8e","name":"Has UpdatedAt Changed?","type":"n8n-nodes-base.if","position":[280,100],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e91f9db3-228c-47e4-a982-df0f73ebad26","operator":{"type":"dateTime","operation":"notEquals"},"leftValue":"={{ $('Get All Workflows').item.json.updatedAt }}","rightValue":"={{ $json.last_updated }}"}]}},"typeVersion":2.2},{"id":"f37d8fd6-cad6-4504-ae67-7172732b95ad","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-1060,1120],"parameters":{"workflowInputs":{"values":[{"name":"jobType"},{"name":"data","type":"object"}]}},"typeVersion":1.1},{"id":"c9930943-9348-469c-a500-2e06973b96b1","name":"Switch","type":"n8n-nodes-base.switch","position":[-860,1120],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"95d54b19-77f5-4559-b5a2-8cb3d6a608f5","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.jobType }}","rightValue":"diff"}]}}]},"options":{}},"typeVersion":3.2},{"id":"ec179774-ef5c-4e37-8476-ddfa7a32ed8b","name":"Split Conn Previous","type":"n8n-nodes-base.splitOut","position":[-500,1400],"parameters":{"options":{},"fieldToSplitOut":"data.previous.connections"},"typeVersion":1},{"id":"85ca03c4-8eb1-4477-8249-5f1d2235230f","name":"Split Conn Current","type":"n8n-nodes-base.splitOut","position":[-500,1220],"parameters":{"options":{},"fieldToSplitOut":"data.current.connections"},"typeVersion":1},{"id":"7d54b755-8402-40b6-8410-2f4010dc0c1a","name":"Split Nodes Current","type":"n8n-nodes-base.splitOut","position":[-500,860],"parameters":{"options":{},"fieldToSplitOut":"data.current.nodes"},"typeVersion":1},{"id":"2b7f1d6c-04ae-4e96-8004-2b91d94aa7fb","name":"Split Nodes Previous","type":"n8n-nodes-base.splitOut","position":[-500,1020],"parameters":{"options":{},"fieldToSplitOut":"data.previous.nodes"},"typeVersion":1},{"id":"7885842f-23b4-4963-85b3-ab24a536a645","name":"Calculate Template Diffs","type":"n8n-nodes-base.executeWorkflow","position":[960,-20],"parameters":{"mode":"each","options":{"waitForSubWorkflow":true},"workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"workflowInputs":{"value":{"data":"={{\n{\n  \"current\": $('Current State').item.json,\n  \"previous\": $('Previous State').item.json,\n}\n}}","jobType":"diff"},"schema":[{"id":"jobType","type":"string","display":true,"removed":false,"required":false,"displayName":"jobType","defaultMatch":false,"canBeUsedToMatch":true},{"id":"data","type":"object","display":true,"removed":false,"required":false,"displayName":"data","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":true}},"typeVersion":1.2},{"id":"155f0a4f-627a-43b8-824c-929d521dd2b8","name":"Update Entry","type":"n8n-nodes-base.googleSheets","position":[1580,-20],"parameters":{"columns":{"value":{"id":"={{ $('Get Values').item.json.id }}","name":"={{ $('Get Values').item.json.name }}","nodes":"={{ $('Get Values').item.json.nodes.toJsonString() }}","status":"={{ $('Get Values').item.json.status }}","history":"={{\n$('Current State').item.json.status !== $('Previous State').item.json.status\n  ? `{$now.toISO()} [status] ` + (\n    $('Current State').item.json.status === 'active'\n    ? 'Workflow was activated'\n    : 'Workflow was deactivated'\n  )\n  : ''\n}}\n{{$now.toISO() }} [connections] {{ $json.connections.added_total }} added, {{ $json.connections.removed_total }} removed\n{{$now.toISO() }} [nodes] {{ $json.nodes.added_total }} added, {{ $json.nodes.removed_total }} removed\n{{ $('Has UpdatedAt Changed?').item.json.history }}","summary":"={{\n$('Current State').item.json.status !== $('Previous State').item.json.status\n  ? (\n    $('Current State').item.json.status === 'active'\n    ? 'Workflow was activated'\n    : 'Workflow was deactivated'\n  )\n  : ''\n}}\n{{\n$json.nodes.added_total > 0\n  ? [\n    `The nodes added (${$json.nodes.added_total}) were:`,\n    $json.nodes.added_names.join(', ')\n  ].join(' ')\n  : ''\n}}.\n{{\n$json.nodes.removed_total > 0\n  ? [\n    `The nodes removed (${$json.nodes.removed_total}) were:`,\n    $json.nodes.removed_names.join(', ')\n  ].join(' ')\n  : ''\n}}.\n{{\n$json.connections.added_total > 0\n  ? [\n    `The connections added (${$json.connections.added_total}) were:`,\n    $json.connections.added_names.join(', ')\n  ].join(' ')\n  : ''\n}}\n{{\n$json.connections.removed_total > 0\n  ? [\n    `The connections removed (${$json.connections.removed_total}) were:`,\n    $json.connections.removed_names.join(', ')\n  ].join(' ')\n  : ''\n}}","connections":"={{ $('Get Values').item.json.connections.toJsonString() }}","last_updated":"={{ $('Get Values').item.json.updatedAt }}"},"schema":[{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"name","type":"string","display":true,"required":false,"displayName":"name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":false,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"last_updated","type":"string","display":true,"required":false,"displayName":"last_updated","defaultMatch":false,"canBeUsedToMatch":true},{"id":"summary","type":"string","display":true,"required":false,"displayName":"summary","defaultMatch":false,"canBeUsedToMatch":true},{"id":"history","type":"string","display":true,"required":false,"displayName":"history","defaultMatch":false,"canBeUsedToMatch":true},{"id":"nodes","type":"string","display":true,"required":false,"displayName":"nodes","defaultMatch":false,"canBeUsedToMatch":true},{"id":"connections","type":"string","display":true,"removed":false,"required":false,"displayName":"connections","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{"useAppend":true},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit?usp=drivesdk","cachedResultName":"97. Workflow Template Changes"}},"credentials":{"googleSheetsOAuth2Api":{"id":"XHvC7jIRR8A2TlUl","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"e16b0e69-5eee-4b51-9a5e-a653833a5d26","name":"Get Values","type":"n8n-nodes-base.set","position":[-280,100],"parameters":{"options":{},"assignments":{"assignments":[{"id":"0bd0d75d-3a1b-4e50-b496-6d33edebda8b","name":"id","type":"string","value":"={{ $json.id }}"},{"id":"07f2d234-c5d6-41ab-9198-80b139e898ae","name":"name","type":"string","value":"={{ $json.name }}"},{"id":"2596e1bd-a2d6-4c51-9797-b029ceb57d07","name":"nodes","type":"array","value":"={{ $json.nodes.map(node => ({ name: node.name, type: node.type })) }}"},{"id":"4182dc9c-8d40-438a-b8bb-db2f86632110","name":"connections","type":"array","value":"={{\n(function(connections){\n  return connections\n    .keys()\n    .flatMap(key =>\n      connections[key].keys().map(subkey =>\n        connections[key][subkey].flatMap(node =>\n          node.map(item =>\n            ({ key, node: item.node, index: item.index })\n          )\n        )\n      )\n    )\n})($json.connections)\n}}"},{"id":"82e3cb86-123a-4ae8-9dbe-0f613785feb6","name":"updatedAt","type":"string","value":"={{ $json.updatedAt }}"},{"id":"e98aaa3e-174d-456b-8289-c1d2025b986d","name":"status","type":"string","value":"={{ $json.active ? 'active' : 'inactive' }}"}]}},"typeVersion":3.4},{"id":"f98f2311-879c-4cfa-8498-dbd5d063f7a4","name":"set non-update response","type":"n8n-nodes-base.set","position":[1600,280],"parameters":{"options":{},"assignments":{"assignments":[{"id":"809ff45c-ff14-4195-b132-353e5cc49803","name":"id","type":"string","value":"={{ $json.id }}"},{"id":"77252bda-65ce-4e2b-852c-4c9dc7ce457e","name":"is_updated","type":"boolean","value":false}]}},"typeVersion":3.4},{"id":"b02b7552-68d4-40fc-a237-5a5d101a8d37","name":"Set Response","type":"n8n-nodes-base.set","position":[1820,280],"parameters":{"options":{},"assignments":{"assignments":[{"id":"99dccb72-bc38-47e9-9607-f7ef2d146293","name":"id","type":"string","value":"={{ $json.id }}"},{"id":"384725e9-bdc2-405b-8c1c-ab68b7a656f0","name":"is_updated","type":"boolean","value":"={{ $json.is_updated ?? true }}"}]}},"typeVersion":3.4},{"id":"ff36d209-0b29-443f-9dc8-33024ed9fa81","name":"Has Node or Connection Updates?","type":"n8n-nodes-base.if","position":[1340,-20],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"81db3948-7061-4ef1-a883-498dc03a2ab4","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.nodes.added_total }}","rightValue":0},{"id":"4aad2fa6-dac1-430e-9f41-1c315cc9aa1c","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.nodes.removed_total }}","rightValue":0},{"id":"b8f0889d-9b6a-4de6-b82e-e17e7135508d","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.connections.added_total }}","rightValue":0},{"id":"c6a5ba18-6e40-4ae5-b703-6f985fd49b66","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.connections.removed_total }}","rightValue":0}]}},"typeVersion":2.2},{"id":"89fbe71d-dd20-4b07-a203-c7ffb77750a7","name":"GSheets Rate Limit","type":"n8n-nodes-base.wait","position":[2020,280],"webhookId":"efe9a371-126f-4d73-9128-04b272222a9b","parameters":{"amount":3},"typeVersion":1.1},{"id":"9994e65f-2825-4ad8-9ce7-bcc9745c6346","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1200,-100],"parameters":{"color":7,"width":520,"height":400,"content":"## 1. Get Workflows To Track\n[Learn more about the n8n node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.n8n/)\n\nTo start, we'll need the json templates of the workflows that exist in the n8n instance. We can easily get these by using the n8n node. You may want to further filter down workflow depending on which ones you want to track. "},"typeVersion":1},{"id":"47202dc8-880d-48e4-b58a-a681d7dc56a2","name":"Get All Workflows","type":"n8n-nodes-base.n8n","position":[-880,100],"parameters":{"limit":25,"filters":{"activeWorkflows":false},"returnAll":false,"requestOptions":{}},"credentials":{"n8nApi":{"id":"5vELmsVPmK4Bkqkg","name":"n8n account"}},"typeVersion":1},{"id":"d1c2137f-2ac9-47a9-998d-6e17c8492793","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-620,-100],"parameters":{"color":7,"width":1080,"height":620,"content":"## 2. Create GSheet Entry If Workflow is New\n[Read more about the loop node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches)\n\nNext, we'll need to determine which workflows are currently new vs already being tracked. This is important as we can only compare workflow versions if we have a previous copy of it. If a workflow doesn't have an entry in our sheet then we can presume it's new and no comparison is necessary as of yet."},"typeVersion":1},{"id":"d4fa75b8-f1be-4dfd-994e-7458ef945016","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[500,-200],"parameters":{"color":7,"width":680,"height":380,"content":"## 3. Calculate Changes Since Last Update\n[Read more about the Execute Workflow node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow/)\n\nIf a previous version exists, we'll can compare it with the current versions to workout what exactly has changed. Here, I'll pass both versions of the workflow's json to a subworkflow which can compare the two."},"typeVersion":1},{"id":"c0044b95-e9ed-40ba-b602-ef7822637773","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1220,-200],"parameters":{"color":7,"width":580,"height":380,"content":"## 5. Update GSheet Entry with Changes\n[Read more about the Google Sheets node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n\nThe resulting list of changes of the workflow are updated in the Google sheet for review. From here, it's possible to connect messaging and/or notification platforms to alert on changes which may break the business processes or worse!"},"typeVersion":1},{"id":"7a83901c-3ed0-41c2-8f81-55d1508d0f94","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1200,840],"parameters":{"color":7,"width":600,"height":220,"content":"## 4. Calculate Differences in Nodes & Connections\n[Learn more about the Compare Datasets node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.comparedatasets)\n\nOur comparison focuses on changes between nodes and connections. It does this by running both the previous and current versions of the workflow json through the \"Compare dataset\" node to find the differences. Using this node, we're able to determine how many nodes and/or connections were added or removed."},"typeVersion":1},{"id":"49553752-1bba-44d1-ab92-4a4130dfa388","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-1660,-280],"parameters":{"width":420,"height":960,"content":"## Try It Out!\n### This n8n template runs daily to track and report on any changes to available workflows on an n8n instance.\n\nUseful if a team is working within a single instance and you want to be notified of what workflows have changed since you last visited them. Another use-case might be monitoring your managed instances for clients and being alerted when changes are made without your knowledge.\n\nSee a sample Gsheet here: [https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit?usp=sharing](https://docs.google.com/spreadsheets/d/1dOHSfeE0W_qPyEWj5Zz0JBJm8Vrf_cWp-02OBrA_ZYc/edit?usp=sharing)\n\n### How it works\n* A scheduled trigger is set to run once a day to review all available workflows.\n* An n8n node imports the workflows as json.\n* The workflows are brought into a loop where each is first checked to see if it exists in the designated google sheet.\n* If not, a new entry is created and skipped.\n* If the workflow has been captured before, then the comparison subworkflow can be executed using the previous and current versions of the workflow json data.\n* The subworkflow uses the compare dataset tool to calculate the changes to nodes and connections for the given workflow.\n* The results are then recorded back to the google sheet for review.\n\n### How to use\n* Start with the n8n node and try to filter by the workflows you're interested in tracking.\n* Set the scheduled trigger interval to match the frequency to suit how often your workflows are being edited.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"},"typeVersion":1}],"pinData":{},"connections":{"Switch":{"main":[[{"node":"Split Nodes Current","type":"main","index":0},{"node":"Split Nodes Previous","type":"main","index":0},{"node":"Split Conn Current","type":"main","index":0},{"node":"Split Conn Previous","type":"main","index":0}]]},"Get Row":{"main":[[{"node":"Row Exists?","type":"main","index":0}]]},"Get Values":{"main":[[{"node":"Get Row","type":"main","index":0}]]},"Same Nodes":{"main":[[{"node":"Merge Nodes Diff","type":"main","index":1}]]},"Added Nodes":{"main":[[{"node":"Merge Nodes Diff","type":"main","index":0}]]},"Row Exists?":{"main":[[{"node":"Has UpdatedAt Changed?","type":"main","index":0}],[{"node":"Create New Entry","type":"main","index":0}]]},"Report Nodes":{"main":[[{"node":"Merge Reports","type":"main","index":0}]]},"Set Response":{"main":[[{"node":"GSheets Rate Limit","type":"main","index":0}]]},"Update Entry":{"main":[[{"node":"Set Response","type":"main","index":0}]]},"Current State":{"main":[[{"node":"Calculate Template Diffs","type":"main","index":0}]]},"Removed Nodes":{"main":[[{"node":"Merge Nodes Diff","type":"main","index":3}]]},"Previous State":{"main":[[{"node":"Current State","type":"main","index":0}]]},"Different Nodes":{"main":[[{"node":"Merge Nodes Diff","type":"main","index":2}]]},"Loop Over Items":{"main":[[],[{"node":"Get Values","type":"main","index":0}]]},"Compare Datasets":{"main":[[{"node":"Added Nodes","type":"main","index":0}],[{"node":"Same Nodes","type":"main","index":0}],[{"node":"Different Nodes","type":"main","index":0}],[{"node":"Removed Nodes","type":"main","index":0}]]},"Create New Entry":{"main":[[{"node":"set non-update response","type":"main","index":0}]]},"Merge Nodes Diff":{"main":[[{"node":"Report Nodes","type":"main","index":0}]]},"Same Connections":{"main":[[{"node":"Merge Connections Diff","type":"main","index":1}]]},"Schedule Trigger":{"main":[[{"node":"Get All Workflows","type":"main","index":0}]]},"Added Connections":{"main":[[{"node":"Merge Connections Diff","type":"main","index":0}]]},"Compare Datasets1":{"main":[[{"node":"Added Connections","type":"main","index":0}],[{"node":"Same Connections","type":"main","index":0}],[{"node":"Different Connections","type":"main","index":0}],[{"node":"Removed Connections","type":"main","index":0}]]},"Get All Workflows":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"GSheets Rate Limit":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Report Connections":{"main":[[{"node":"Merge Reports","type":"main","index":1}]]},"Split Conn Current":{"main":[[{"node":"Compare Datasets1","type":"main","index":0}]]},"Removed Connections":{"main":[[{"node":"Merge Connections Diff","type":"main","index":3}]]},"Split Conn Previous":{"main":[[{"node":"Compare Datasets1","type":"main","index":1}]]},"Split Nodes Current":{"main":[[{"node":"Compare Datasets","type":"main","index":0}]]},"Split Nodes Previous":{"main":[[{"node":"Compare Datasets","type":"main","index":1}]]},"Different Connections":{"main":[[{"node":"Merge Connections Diff","type":"main","index":2}]]},"Has UpdatedAt Changed?":{"main":[[{"node":"Previous State","type":"main","index":0}],[{"node":"set non-update response","type":"main","index":0}]]},"Merge Connections Diff":{"main":[[{"node":"Report Connections","type":"main","index":0}]]},"set non-update response":{"main":[[{"node":"Set Response","type":"main","index":0}]]},"Calculate Template Diffs":{"main":[[{"node":"Has Node or Connection Updates?","type":"main","index":0}]]},"Has Node or Connection Updates?":{"main":[[{"node":"Update Entry","type":"main","index":0}],[{"node":"set non-update response","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Switch","type":"main","index":0}]]}}}


name: End of Turn Detection for smoother AI agent chats with Telegram and Gemini
author_name: Jimleuk
author_username: jimleuk
categories: []
created_at: 2025-06-17T22:47:24.712Z
updated_at: 2025-06-17T22:47:24.712Z
url: https://n8n.io/workflows/5014
scraped_at: 2025-07-06 21:16:30
description:
  This n8n template demonstrates one approach to achieve a more natural and less frustration conversations with AI agents by reducing interrupts by predicting the end of user utterances.

  When we text or chat casually, it's not uncommon to break our sentences over multiple messages or when it comes to voice, break our speech with the odd pause or umms and ahhs. If an agent replies to every message, it's likely to interrupt us before we finish our thoughts and it can get very annoying!

  Previously, I demonstrated a simple technique for buffering each incoming message by 5 seconds but that approach still suffers in some scenarios when more time is needed. This technique has no arbitrary time limit and instead uses AI to figure out when its the agent's turn based on the user's message, allowing for the user to take all the time they need.

  How it works
  Telegram messages are received but no reply is generated for them by default. Instead they are sent to the prediction subworkflow to determine if a reply should be generated.
  The prediction subworkflow begins by checking Redis for the current user's prediction session state. If this is a new "utterance", it kicks off the "predict end of utterance" loop - the purpose of which is to buffer messages in a smart way!
  New users message can continue to be accepted by the workflow until enough is collected to allow our prediction classifier to determine the end of the utterance has been reached.
  The loop is then broken and the buffered chat messages are combined and sent to the AI agent to generate a response and sent to the user via the telegram node.
  The prediction session state is then deleted to signal the workflow is ready to start again with a new message.

  How to use
  This system sits between your preferred chat platform and the AI agent so all you need to do is replace the telegram nodes as required.
  Where LLM-only prediction isn't working well enough, consider more traditional code-based checking of heuristics to improve the detection.
  Ideally you'll want a fast but accurate LLM so your user isn't waiting longer than they have to - at time of writing Gemini-2.5-flash-lite was the fastest in testing but keep a look out for smaller and more powerful LLMs in the future.

  Requirements
  Gemini for LLM
  Redis for session management
  Telegram for chat platform

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.redis","n8n-nodes-base.telegram","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.memoryRedisChat","@n8n/n8n-nodes-langchain.lmChatGoogleGemini","@n8n/n8n-nodes-langchain.textClassifier"]

workflow_json:
  {"meta":{"instanceId":"408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9","templateCredsSetupCompleted":true},"nodes":[{"id":"dd511e76-27a0-47a1-b475-d00fffa22eb8","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","position":[-1280,120],"webhookId":"dce8f9a4-86d1-4dd9-a83a-4de75185ae21","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"Lk9x8q4NhLDMjfTV","name":"jimleuk_bot"}},"typeVersion":1.2},{"id":"fef3c7b6-ac57-4b83-8f21-2babd81d3b50","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1280,320],"parameters":{"text":"={{\n$('Session Ref').first().json.data.messages?.parseJson()\n  .map(msg => msg.value)\n  .join(' ')\n}}","options":{"systemMessage":"Do not format your response in markdown, use plain text instead."},"promptType":"define"},"typeVersion":2},{"id":"084bfb67-c59b-44c4-a310-4c25743cd8f9","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[1260,520],"parameters":{"options":{},"modelName":"models/gemini-2.5-flash-preview-05-20"},"credentials":{"googlePalmApi":{"id":"dSxo6ns5wn658r8N","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"4733b8d3-427d-4724-a5a3-7eb787941494","name":"Redis Chat Memory","type":"@n8n/n8n-nodes-langchain.memoryRedisChat","position":[1420,520],"parameters":{"sessionKey":"=session/{{ $('Session Ref').first().json.data.from }}/agent","sessionIdType":"customKey","contextWindowLength":10},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1.5},{"id":"8f7e6148-b1a5-46b5-934a-0c75f20898d8","name":"Get Values","type":"n8n-nodes-base.set","position":[-860,120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"7cee3033-0615-43ac-93fd-5397c759e6a3","name":"from","type":"string","value":"={{ $json.message.chat.id }}"},{"id":"c2bb1875-7074-411f-a14a-42c699e5bdc1","name":"message","type":"string","value":"={{ $json.message.text }}"},{"id":"34d5087e-79be-4181-b839-0a55b95133e8","name":"createdAt","type":"string","value":"={{ $now.toISO() }}"}]}},"typeVersion":3.4},{"id":"52cc0bd2-bb0a-4c2c-a1a5-2a9104d891da","name":"Update Session","type":"n8n-nodes-base.redis","position":[-920,700],"parameters":{"key":"=session/{{ $('Prediction Subworkflow').item.json.from }}","value":"={{\n{\n  ...($('Get Session').item.json.data ?? {}),\n  messages: [\n    ...($('Get Session').item.json.data?.messages\n      ? $('Get Session').item.json.data?.messages.parseJson()\n      : []\n    ),\n    {\n      value: $('Prediction Subworkflow').item.json.message,\n      createdAt: $('Prediction Subworkflow').item.json.createdAt\n    }\n  ].toJsonString(),\n  from: $('Prediction Subworkflow').item.json.from\n}\n}}","expire":true,"keyType":"hash","operation":"set"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1},{"id":"7bdee33c-a2e7-49a3-b782-d045f3f46dd3","name":"Get Session","type":"n8n-nodes-base.redis","position":[-1100,700],"parameters":{"key":"=session/{{ $json.from }}","keyType":"hash","options":{},"operation":"get","propertyName":"data"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1},{"id":"0fc0b9eb-3553-4fdb-befc-7d7891305405","name":"Is Waiting?","type":"n8n-nodes-base.if","position":[-80,1020],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"0e37d8ff-3d04-4224-84cc-defa80dc4a8b","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('Get Session').item.json.data?.state }}","rightValue":"waiting"}]}},"typeVersion":2.2},{"id":"de3eb7bb-81e0-4169-a6f4-286a1ac9a2f7","name":"Update Session1","type":"n8n-nodes-base.redis","position":[40,300],"parameters":{"key":"=session/{{ $('Session Ref').first().json.data.from }}","value":"={{\n{\n  state: 'waiting',\n  resumeUrl: $execution.resumeUrl\n}\n}}","expire":true,"keyType":"hash","operation":"set"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1},{"id":"c7fb3fba-9d6a-4c68-a995-5539ab6bcf63","name":"is New Session?","type":"n8n-nodes-base.if","position":[-560,700],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"71db97f1-e5ba-49d1-8a9a-b9df3a989c77","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ !$json.data?.state }}","rightValue":""}]}},"typeVersion":2.2},{"id":"8bbb222c-d3d1-4c03-931c-37f1d2d37df2","name":"Google Gemini Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[300,460],"parameters":{"options":{},"modelName":"models/gemini-2.5-flash-lite-preview-06-17"},"credentials":{"googlePalmApi":{"id":"dSxo6ns5wn658r8N","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"3a285fef-8c80-48dc-8e79-2c30ff9d351c","name":"Get Session2","type":"n8n-nodes-base.redis","position":[720,460],"parameters":{"key":"=session/{{ $('Session Ref').first().json.data.from }}","keyType":"hash","options":{},"operation":"get","propertyName":"data"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1},{"id":"e8254612-ff46-4165-ab93-a6c9d7a2c583","name":"Session Ref","type":"n8n-nodes-base.noOp","position":[-120,300],"parameters":{},"typeVersion":1},{"id":"bdd227f1-65fd-46d0-8e0c-23e812f83967","name":"Session Ended?","type":"n8n-nodes-base.if","position":[880,460],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"398277f7-9386-4f99-ab9c-f99fe59c872e","operator":{"type":"object","operation":"empty","singleValue":true},"leftValue":"={{ Object.assign({}, $json.data ?? {}) }}","rightValue":""}]}},"typeVersion":2.2},{"id":"a9611069-9cf9-4090-aa6e-cc6a3f4a0fa8","name":"Wait For Webhook","type":"n8n-nodes-base.wait","position":[560,460],"webhookId":"d753b11d-0a61-40e5-b1c4-d217e106eaac","parameters":{"resume":"webhook","options":{},"resumeUnit":"seconds","resumeAmount":20,"limitWaitTime":true},"typeVersion":1.1},{"id":"456d5b81-7eee-49fd-9b27-93e9e8fbe7b8","name":"Update Session2","type":"n8n-nodes-base.redis","position":[1620,320],"parameters":{"key":"=session/{{ $('Session Ref').first().json.data.from }}","operation":"delete"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1},{"id":"d778edf7-4152-4bd9-a720-a0a28db45369","name":"Is Bot command?","type":"n8n-nodes-base.if","position":[-1080,120],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"bff0d1a5-1d78-4af6-a643-b2fd28f10fba","operator":{"type":"string","operation":"startsWith"},"leftValue":"={{ $json.message.text }}","rightValue":"/"}]}},"typeVersion":2.2},{"id":"a465cb15-8faf-42fb-b00e-51af15c596da","name":"Predict End of Utterance","type":"@n8n/n8n-nodes-langchain.textClassifier","position":[200,300],"parameters":{"options":{"systemPromptTemplate":"=You are an NLP expert who predicts whether a message is the end of an turn/utterance i.e., whether the user's message is complete or if more parts of the message are likely to follow. Help predict the given message or partial message to determine whether it is now the agent's turn to respond to the user.\n\n## Techniques to use\n* Temporal Threshold (Inactivity Delay) - Use a decay model—each consecutive message shortens the threshold unless punctuation suggests completeness.\n* Punctuation Patterns - Strong indicators of message completeness: Ends with period ., question mark ?, or exclamation mark !. Ends with an emoji or newline after a complete sentence. Weak or uncertain indicators: Ellipsis ... → often implies continuation. Dash - or incomplete sentence → wait for more.\n* Linguistic Features - Lexical cues (last word, punctuation). Part-of-speech tags (is the sentence syntactically complete?). Message length and position in sequence. Semantic cues like discourse markers: \"anyway\", \"so\", \"that's all\"\n* Conversational Cues (Pragmatic Signals) - \"That's it\", \"Done\", \"Hope that helps\", \"Thanks\" → End markers. \"Let me continue\", \"Hold on\", \"Part 2\" → Continuation markers.\n\n### Sample Dataset\nLabel: 1 = end of utterance, 0 = continuation\n* \"Here's the plan for tomorrow.\" = 1,\n* \"First, we meet at 9am.\" = 0,\n* \"Then we head to the venue\" = 0,\n* \"...and set everything up.\" = 0,\n* \"Let me know if you're free!\" = 1,\n* \"Part 1 of the idea is this\" = 0,\n* \"More to come\" = 0,\n* \"That's all!\" = 1,\n* \"Thanks!\" = 1\n* \"Next, we should discuss logistics\" = 0"},"inputText":"={{\n$('Session Ref').item.json.data.messages.parseJson()\n  .map(msg => `[${msg.createdAt}] ${msg.value}`)\n  .join(' ')\n}}","categories":{"categories":[{"category":"end_of_utterance","description":"The user has reached their end of turn or end of utterance"},{"category":"has_more_to_follow","description":"The user has not finished their message or turn or reached their end of utterance"}]}},"typeVersion":1.1},{"id":"14dd091f-636b-4944-81b4-35da5f0f64b2","name":"Respond to User","type":"n8n-nodes-base.telegram","position":[1800,320],"webhookId":"c095b0ea-c349-4ab7-8b16-efa5f4c22299","parameters":{"text":"={{ $json.output }}","chatId":"={{ $('Session Ref').first().json.data.from }}","additionalFields":{"parse_mode":"HTML","appendAttribution":false}},"credentials":{"telegramApi":{"id":"Lk9x8q4NhLDMjfTV","name":"jimleuk_bot"}},"typeVersion":1.2},{"id":"b6ae259c-9fc4-481a-bd6d-f1b3a0dc2d28","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1360,-80],"parameters":{"color":7,"width":1020,"height":440,"content":"## 1. Accept Telegram messages\n[Read more about the Telegram Trigger](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.telegramtrigger)\n\nThis template will only work with chat systems where not every incoming message needs a reply - this unfortunately rules out n8n's built in chat trigger. For demonstration purposes, we'll use Telegram and in this set up, we have designed it to capture as many messages from a single user as possible without blocking the execution."},"typeVersion":1},{"id":"33c5c000-5d3e-459a-814e-f2e5669e9592","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1360,400],"parameters":{"color":7,"width":1020,"height":560,"content":"## 2. Determine If New Message\n[Learn more about the subworkflow trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflowtrigger)\n\nOur goal is ultimately to not \"interrupt\" the user. We do so by buffering presumed partial messages until we can predict that the user has reached the end of what they want to say. Before we can do that however, we need to first determine if the message received is a new message or \"utterance\". For this task, we'll use simple session/state management via Redis to create temporary data to collect each incoming utterance and track our progress."},"typeVersion":1},{"id":"939f8f46-c7c1-468f-af83-2c4f15fca09b","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-240,780],"parameters":{"color":7,"width":660,"height":460,"content":"## 3. Prediction Loop Already Running? Let's Resume!\n[Read more about the HTTP node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\nUsing the session data, we can check if a prediction loop is already running and if so, resume it rather than starting a new one. The HTTP request is used to trigger the \"resume_url\" of the prediction loop wait node."},"typeVersion":1},{"id":"d36770f7-1992-4335-8e9d-01a73de44c0b","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-240,-60],"parameters":{"color":7,"width":1340,"height":800,"content":"## 2. Start of a New Utterance? Start the Prediction Wait Loop.\n[Learn more about the Text Classifier node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.text-classifier)\n\nPredicting when a user has finished their thought during a casual text or call is surprisingly difficult. Although some heuristics and natural language processing (NLP) tools exist, I wanted to explore whether large language models (LLMs) could effectively handle this task.\n\nI implemented a basic text classifier and fine-tuned its prompt to predict message completion. If the model determines a message is incomplete, the workflow pauses using a wait node. This node doesn't operate on a timer; instead, it needs to be triggered by a HTTP request to resume. The trick is when we get new messages, we use those executions to resume the paused wait node if it exists. Once the wait node resumes, it combined the new message with the previous messages and sends them to the classifier for a new prediction.\n\nThe loop continues until the model identifies the message as complete, at which point the full conversation is sent to the agent. As a fallback, if the session is somehow lost - maybe due to expiry, the loop is abandoned and the new chat message is sent to the agent instead."},"typeVersion":1},{"id":"d9dcc03f-8549-495e-969b-82c0f96c3057","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1160,80],"parameters":{"color":7,"width":840,"height":660,"content":"## 4. Send Reply Only When End of Utterance is Detected\n[Read more about the AI Agent node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nFinally! With the buffered messages combined and sent to the agent, we're now able to generate a reply to the user. The end experience is seemingly much closer to a natural conversation with a human as there is no artificial delays needed.\n\nThe last thing to do then is to clear out the temporary session for the utterance. This allows our workflow to recognise the next chat message as a new utterance."},"typeVersion":1},{"id":"c242729b-0d95-4201-adee-b3a537d28eb1","name":"Resume Wait Node","type":"n8n-nodes-base.httpRequest","position":[140,1020],"parameters":{"url":"={{ $json.data.resumeUrl }}","options":{}},"typeVersion":4.2},{"id":"321e48ff-9389-408f-af97-e1590ce13e0c","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-1860,-300],"parameters":{"width":460,"height":1260,"content":"## Try It Out!\n### This n8n template demonstrates one approach to achieve a more natural and less frustration conversations with AI agents by reducing interrupts by predicting the end of user utterances.\n\nWhen we text or chat casually, it's not uncommon to break our sentences over multiple messages or when it comes to voice, break our speech with the odd pause or umms and ahhs. If an agent replies to every message, it's likely to interrupt us before we finish our thoughts and it can get very annoying!\n\nPreviously, I demonstrated a [simple technique for buffering each incoming message by 5 seconds](https://n8n.io/workflows/2346-enhance-customer-chat-by-buffering-messages-with-twilio-and-redis/) but that approach still suffers in some scenarios when more time is needed. This technique has no arbitrary time limit and instead uses AI to figure out when its the agent's turn based on the user's message, allowing for the user to take all the time they need.\n\n### How it works\n* Telegram messages are received but no reply is generated for them by default. Instead they are sent to the prediction subworkflow to determine if a reply should be generated.\n* The prediction subworkflow begins by checking Redis for the current user's prediction session state. If this is a new \"utterance\", it kicks off the \"predict end of utterance\" loop - the purpose of which is to buffer messages in a smart way!\n* New users message can continue to be accepted by the workflow until enough is collected to allow our prediction classifier to determine the end of the utterance has been reached.\n* The loop is then broken and the buffered chat messages are combined and sent to the AI agent to generate a response and sent to the user via the telegram node.\n* The prediction session state is then deleted to signal the workflow is ready to start again with a new message.\n\n### How to use\n* This system sits between your preferred chat platform and the AI agent so all you need to do is replace the telegram nodes as required.\n* Where LLM-only prediction isn't working well enough, consider more traditional code-based checking of heuristics to improve the detection.\n* Ideally you'll want a fast but accurate LLM so your user isn't waiting longer than they have to - at time of writing Gemini-2.5-flash-lite was the fastest in testing but keep a look out for smaller and more powerful LLMs in the future.\n\n### Requirements\n* Gemini for LLM\n* Redis for session management\n* Telegram for chat platform\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"},"typeVersion":1},{"id":"f56fe585-7ece-49aa-813a-2d72b11d5d0f","name":"Call Prediction Subworkflow","type":"n8n-nodes-base.executeWorkflow","position":[-640,120],"parameters":{"options":{"waitForSubWorkflow":false},"workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"workflowInputs":{"value":{"from":"={{ $json.from }}","message":"={{ $json.message }}","createdAt":"={{ $json.createdAt }}"},"schema":[{"id":"from","type":"string","display":true,"removed":false,"required":false,"displayName":"from","defaultMatch":false,"canBeUsedToMatch":true},{"id":"message","type":"string","display":true,"removed":false,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"createdAt","type":"string","display":true,"removed":false,"required":false,"displayName":"createdAt","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":true}},"typeVersion":1.2},{"id":"6d24bc9e-223e-48f8-b32d-84cabf1febfc","name":"Prediction Subworkflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-1280,700],"parameters":{"workflowInputs":{"values":[{"name":"from"},{"name":"message"},{"name":"createdAt"}]}},"typeVersion":1.1},{"id":"f711ff8e-4b68-4379-8abe-33bc673bab1f","name":"Get Updated Session Values","type":"n8n-nodes-base.set","position":[-740,700],"parameters":{"options":{},"assignments":{"assignments":[{"id":"ed66f412-aa70-4838-9295-bed652d62bfd","name":"data","type":"object","value":"={{\n{\n  ...($('Get Session').item.json.data ?? {}),\n  messages: [\n    ...($('Get Session').item.json.data?.messages\n      ? $('Get Session').item.json.data?.messages.parseJson()\n      : []\n    ),\n    {\n      value: $('Prediction Subworkflow').item.json.message,\n      createdAt: $('Prediction Subworkflow').item.json.createdAt\n    }\n  ].toJsonString(),\n  from: $('Prediction Subworkflow').item.json.from\n}\n}}"}]}},"typeVersion":3.4}],"pinData":{},"connections":{"AI Agent":{"main":[[{"node":"Update Session2","type":"main","index":0}]]},"Get Values":{"main":[[{"node":"Call Prediction Subworkflow","type":"main","index":0}]]},"Get Session":{"main":[[{"node":"Update Session","type":"main","index":0}]]},"Is Waiting?":{"main":[[{"node":"Resume Wait Node","type":"main","index":0}],[]]},"Session Ref":{"main":[[{"node":"Update Session1","type":"main","index":0}]]},"Get Session2":{"main":[[{"node":"Session Ended?","type":"main","index":0}]]},"Session Ended?":{"main":[[{"node":"AI Agent","type":"main","index":0}],[{"node":"Session Ref","type":"main","index":0}]]},"Update Session":{"main":[[{"node":"Get Updated Session Values","type":"main","index":0}]]},"Is Bot command?":{"main":[[],[{"node":"Get Values","type":"main","index":0}]]},"Respond to User":{"main":[[]]},"Update Session1":{"main":[[{"node":"Predict End of Utterance","type":"main","index":0}]]},"Update Session2":{"main":[[{"node":"Respond to User","type":"main","index":0}]]},"is New Session?":{"main":[[{"node":"Session Ref","type":"main","index":0}],[{"node":"Is Waiting?","type":"main","index":0}]]},"Telegram Trigger":{"main":[[{"node":"Is Bot command?","type":"main","index":0}]]},"Wait For Webhook":{"main":[[{"node":"Get Session2","type":"main","index":0}]]},"Redis Chat Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Prediction Subworkflow":{"main":[[{"node":"Get Session","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Predict End of Utterance":{"main":[[{"node":"AI Agent","type":"main","index":0}],[{"node":"Wait For Webhook","type":"main","index":0}]]},"Google Gemini Chat Model1":{"ai_languageModel":[[{"node":"Predict End of Utterance","type":"ai_languageModel","index":0}]]},"Get Updated Session Values":{"main":[[{"node":"is New Session?","type":"main","index":0}]]},"Call Prediction Subworkflow":{"main":[[]]}}}


name: Find and email ANYONE on LinkedIn with OpenAI, Hunter & Gmail
author_name: Abhijay Vuyyuru
author_username: abhijayvuyyuru
categories: []
created_at: 2025-06-18T03:13:10.626Z
updated_at: 2025-06-18T03:13:10.626Z
url: https://n8n.io/workflows/5015
scraped_at: 2025-07-06 21:16:30
description:
  Setup Time

  5-10 minutes

  Problem

  🚨 LinkedIn search is BROKEN. Personalized cold-emailing takes hours!


  I waste hours on LinkedIn manually filtering profiles, reading summaries, hoping they’d reply—tedious, frustrating, inefficient.

  But even after finding the email IDs of the contacts, the job to be done is incomplete. 𝗜 𝘄𝗮𝗻𝘁 𝘁𝗼 𝘀𝘁𝗮𝗿𝘁 𝗮 𝗰𝗼𝗻𝘃𝗲𝗿𝘀𝗮𝘁𝗶𝗼𝗻 𝘄𝗶𝘁𝗵 𝘁𝗵𝗲𝘀𝗲 𝗰𝗼𝗻𝘁𝗮𝗰𝘁𝘀.

  If only I could type "𝘗𝘳𝘰𝘥𝘶𝘤𝘵 𝘮𝘢𝘯𝘢𝘨𝘦𝘳𝘴 𝘸𝘰𝘳𝘬𝘪𝘯𝘨 𝘰𝘯 𝘨𝘦𝘯𝘦𝘳𝘢𝘵𝘪𝘷𝘦 𝘈𝘐 𝘪𝘯 𝘠𝘰𝘶𝘛𝘶𝘣𝘦 𝘪𝘯 𝘕𝘦𝘸 𝘠𝘰𝘳𝘬" and seconds later have 10 personalized outreach emails in my Gmail drafts folder, ready for my review. 

  It would save me hours of research effort!

  Introducing LinkGPT, a LinkedIn Agent, an automated agentic workflow powered by n8n.

  Prerequisites: 
  Required accounts/API keys for Hunter.io, Google, and OpenAI.

  This would be helpful for:

  🎯 Job Seekers wanting direct outreach to hiring managers (everyone applies to multiple jobs, and crafting personal emails takes hours!)

  🎯 Recruiters looking to personalize candidate outreach at scale

  🎯 Sales & Founders aiming for targeted customer conversations 

  Step-by-step workflow:

  Takes 5-10 minutes to setup.

  Generate a Boolean search string for LinkedIn profiles.
  Perform authenticated Google searches using your query.
  Extract LinkedIn URLs and workplace context from the search results.
  Use OpenAI to extract first name, last name, and domain name from the context.
  Use Hunter.io to find emails of the contacts.
  Append all results to your connected Google Sheet. Columns: first_name, last_name, domain_name, email, context
  Read everything publicly available about your target profiles
  Identify common ground (shared backgrounds, interests, experiences)
  Craft highly personalized, thoughtful email drafts
  Automatically save tailored drafts in your Gmail and Google Sheets



  I put together a clear, step-by-step guide on setting this up yourself.

  Sample Query

  Sample:

  Input: "I am headed to NYC later this month, whom should I meet with that works in product management for gen AI products?"

  Output: List of 10 contacts with first name, last name, workplace, email address and context about them, and 10 personalized emails waiting for you review in your Gmail drafts folder 

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.hunter","n8n-nodes-base.gmail","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"e49UBJheMiRF7iDk","meta":{"instanceId":"7b22476bf9699de09fe66fed92056e8ae798418cc9901fa9bd85bb46439116b8","templateCredsSetupCompleted":true},"name":"LinkedIn Agent v2","tags":[{"id":"V4LdVOYIGIbfdqvb","name":"linkedin","createdAt":"2025-06-11T18:52:18.612Z","updatedAt":"2025-06-11T18:52:18.612Z"},{"id":"qlvLkg4Mxoeos0VK","name":"cold email","createdAt":"2025-06-11T18:52:31.368Z","updatedAt":"2025-06-11T18:52:31.368Z"},{"id":"yt7Z3T0SDl1Coo7S","name":"hunter","createdAt":"2025-06-11T18:52:25.423Z","updatedAt":"2025-06-11T18:52:25.423Z"}],"nodes":[{"id":"0fa236a3-2e00-4710-ab5f-a5d237dcfa90","name":"Wait","type":"n8n-nodes-base.wait","position":[760,880],"webhookId":"39010e58-367a-490c-a827-0e06d5d47a51","parameters":{},"typeVersion":1.1},{"id":"5d57cbba-4061-4f2f-b4a1-f99ef47eedcc","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[440,400],"webhookId":"34291cf6-4908-4be5-9cf6-df085702abd2","parameters":{},"typeVersion":1.1},{"id":"af9ccdbe-30aa-451c-851c-3f2b6418c211","name":"Create a new sheet","type":"n8n-nodes-base.googleSheets","position":[1120,400],"parameters":{},"typeVersion":4.5},{"id":"36698cf4-3d75-491f-b4da-bdb7b6d2d3c1","name":"Add columns to new sheet","type":"n8n-nodes-base.googleSheets","position":[760,640],"parameters":{},"typeVersion":4.5},{"id":"84149de7-58b5-498c-aebc-ec79ec7317fa","name":"set page number for google search","type":"n8n-nodes-base.code","position":[1060,640],"parameters":{},"typeVersion":2},{"id":"119084c3-a1d8-4007-9421-764f4625d5dc","name":"Google Boolean Search","type":"n8n-nodes-base.httpRequest","position":[1080,880],"parameters":{},"typeVersion":4.2},{"id":"2ae7afc6-727d-4c25-8f3b-dc6e613b813b","name":"If desired results not reached","type":"n8n-nodes-base.if","position":[400,900],"parameters":{},"typeVersion":2.2},{"id":"650665b9-cb6e-4e69-b039-4962a9a0efca","name":"Appends the results to the sheet","type":"n8n-nodes-base.googleSheets","position":[380,1320],"parameters":{},"typeVersion":4.5},{"id":"5289c588-a2d0-41d9-94e9-5e1ab564c78f","name":"Code","type":"n8n-nodes-base.code","position":[4960,600],"parameters":{},"typeVersion":2},{"id":"5e6b2802-6710-4851-ab2e-4d29c9c5e644","name":"Extracts fname, lname, domainname","type":"n8n-nodes-base.code","position":[1080,1140],"parameters":{},"typeVersion":2},{"id":"f611ee14-5864-4032-8ae1-3342658be76f","name":"Extracts all linkedin urls and workplace context from the google http response","type":"n8n-nodes-base.code","position":[400,1140],"parameters":{},"typeVersion":2},{"id":"7b60c3e0-d6b3-4652-93d4-805bbe7f095c","name":"Adds 10 to start - Go to next page","type":"n8n-nodes-base.code","position":[100,900],"parameters":{},"typeVersion":2},{"id":"f19b8bac-a55f-43cf-bd74-fa59fc0c217c","name":"Generate a Boolean Search String","type":"@n8n/n8n-nodes-langchain.openAi","position":[740,400],"parameters":{},"retryOnFail":false,"typeVersion":1.8},{"id":"7b57464a-d650-465b-91fd-d87aa8884517","name":"Extract Contact Details","type":"@n8n/n8n-nodes-langchain.openAi","position":[680,1140],"parameters":{},"typeVersion":1.8},{"id":"18fba241-bb89-4468-bbf0-6bec4e75612c","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1240,840],"parameters":{"content":""},"typeVersion":1},{"id":"ebb1f62f-3206-46f3-873e-36d78eb134dc","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[660,1060],"parameters":{"content":""},"typeVersion":1},{"id":"e7283690-37fb-4ca6-8797-d0b07026e0a6","name":"Columns to add: linkedin_url, first_name, last_name, email, context, domain","type":"n8n-nodes-base.code","position":[420,640],"parameters":{},"typeVersion":2},{"id":"98eb8c1b-a90d-497b-865f-70db3a79ba4a","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[720,300],"parameters":{"content":""},"typeVersion":1},{"id":"463dc7e3-711b-4d9f-8b23-6622215e20e9","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[640,820],"parameters":{"content":""},"typeVersion":1},{"id":"db7b1096-5381-4daf-8aac-ab491921d862","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[60,760],"parameters":{"content":""},"typeVersion":1},{"id":"4a9d208c-c989-4630-a013-77aa9a3f9bd7","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[180,1280],"parameters":{"content":""},"typeVersion":1},{"id":"7b8fb208-bfc3-4d3a-b676-3fc9ea53c5c1","name":"Gmail","type":"n8n-nodes-base.gmail","position":[1260,1360],"webhookId":"e3c8a3f8-6dac-48e0-90c8-3fb9ac2213fb","parameters":{},"typeVersion":2.1},{"id":"1f3132e6-a3d1-4e94-9d3d-bd5ea6e333d0","name":"Extract subject and email body","type":"n8n-nodes-base.code","position":[700,1360],"parameters":{},"typeVersion":2},{"id":"b4396b3c-83aa-4255-92c1-98b910388101","name":"Personalized Cold-Email Generator","type":"@n8n/n8n-nodes-langchain.openAi","position":[1360,1140],"parameters":{},"typeVersion":1.8},{"id":"9822e7c5-1f6a-4c94-a997-d83f30a0160c","name":"Hunter","type":"n8n-nodes-base.hunter","position":[900,1360],"parameters":{},"executeOnce":true,"typeVersion":1},{"id":"c9813338-95b8-433c-b52b-c78c049575ec","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[860,1320],"parameters":{"content":""},"typeVersion":1},{"id":"28eddff1-1b6b-4d87-a650-0262d2f2ccde","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[1080,320],"parameters":{"content":""},"typeVersion":1},{"id":"e92fb3ad-c98b-4917-98d6-6de847af7425","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[1320,1060],"parameters":{"content":""},"typeVersion":1},{"id":"2b8c2dba-4b3c-486d-b765-7bae108802a3","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[1360,1340],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{},"settings":{},"versionId":"70ebcd8c-5023-4fee-85af-c94683f7bba0","connections":{"Code":{"main":[[]]},"Wait":{"main":[[{"node":"Google Boolean Search","type":"main","index":0}]]},"Hunter":{"main":[[{"node":"Gmail","type":"main","index":0},{"node":"Appends the results to the sheet","type":"main","index":0}]]},"Create a new sheet":{"main":[[{"node":"Columns to add: linkedin_url, first_name, last_name, email, context, domain","type":"main","index":0}]]},"Google Boolean Search":{"main":[[{"node":"Extracts all linkedin urls and workplace context from the google http response","type":"main","index":0}]]},"Extract Contact Details":{"main":[[{"node":"Extracts fname, lname, domainname","type":"main","index":0}]]},"Add columns to new sheet":{"main":[[{"node":"set page number for google search","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"Generate a Boolean Search String","type":"main","index":0}]]},"Extract subject and email body":{"main":[[{"node":"Hunter","type":"main","index":0}]]},"If desired results not reached":{"main":[[{"node":"Wait","type":"main","index":0}],[]]},"Appends the results to the sheet":{"main":[[{"node":"Adds 10 to start - Go to next page","type":"main","index":0}]]},"Generate a Boolean Search String":{"main":[[{"node":"Create a new sheet","type":"main","index":0}]]},"Extracts fname, lname, domainname":{"main":[[{"node":"Personalized Cold-Email Generator","type":"main","index":0}]]},"Personalized Cold-Email Generator":{"main":[[{"node":"Extract subject and email body","type":"main","index":0}]]},"set page number for google search":{"main":[[{"node":"If desired results not reached","type":"main","index":0}]]},"Adds 10 to start - Go to next page":{"main":[[{"node":"If desired results not reached","type":"main","index":0}]]},"Columns to add: linkedin_url, first_name, last_name, email, context, domain":{"main":[[{"node":"Add columns to new sheet","type":"main","index":0}]]},"Extracts all linkedin urls and workplace context from the google http response":{"main":[[{"node":"Extract Contact Details","type":"main","index":0}]]}}}


name: Zillow Property Scraper by Location via Bright Data & Google Sheets
author_name: Incrementors
author_username: incrementors
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-06-18T11:31:57.431Z
updated_at: 2025-06-18T11:31:57.431Z
url: https://n8n.io/workflows/5019
scraped_at: 2025-07-06 21:16:30
description:
  🛒 Google Maps Business Phone Number Scraper Using Bright Data API & Google Sheets Integration

  This template requires a self-hosted n8n instance to run.

  An automated workflow that extracts business information including phone numbers from Google Maps using Bright Data's API and saves the data to Google Sheets for easy access and analysis.

  📋 Overview

  This workflow provides an automated solution for extracting business contact information from Google Maps based on location and keyword searches. Perfect for lead generation, market research, competitor analysis, and business directory creation.

  ✨ Key Features

  🎯 Form-Based Input: Easy-to-use form for location and keyword submission
  🗺️ Google Maps Integration: Uses Bright Data's Google Maps dataset for accurate business data
  📊 Comprehensive Data Extraction: Extracts business names, addresses, phone numbers, ratings, and more
  📧 Automated Processing: Handles the entire scraping process automatically
  📈 Google Sheets Storage: Automatically saves extracted data to organized spreadsheets
  🔄 Smart Status Checking: Monitors scraping progress with automatic retry logic
  ⚡ Fast & Reliable: Professional scraping with built-in error handling
  🎯 Customizable Output: Configurable data fields for specific business needs

  🎯 What This Workflow Does

  Input
  Location:** Geographic area to search (city, state, country)
  Keywords:** Business type or industry keywords

  Processing
  Form Submission: User submits location and keywords through web form
  API Request: Sends scraping request to Bright Data's Google Maps dataset
  Status Monitoring: Continuously checks scraping progress
  Data Retrieval: Fetches completed business data when ready
  Data Storage: Saves extracted information to Google Sheets
  Error Handling: Implements retry logic for failed requests

  Output Data Points

  | Field | Description | Example |
  |-------|-------------|---------|
  | Business Name | Official business name from Google Maps | "Joe's Pizza Restaurant" |
  | Phone Number | Contact phone number | "+1-555-123-4567" |
  | Address | Complete business address | "123 Main St, New York, NY 10001" |
  | Rating | Google Maps rating score | 4.5 |
  | URL | Google Maps listing URL | "https://maps.google.com/..." |

  🚀 Setup Instructions

  Prerequisites
  n8n instance (self-hosted or cloud)
  Google account with Sheets access
  Bright Data account with Google Maps dataset access
  5-10 minutes for setup

  Step 1: Import the Workflow
  Copy the JSON workflow code from the provided file
  In n8n: Workflows → + Add workflow → Import from JSON
  Paste JSON and click Import

  Step 2: Configure Bright Data
  Set up Bright Data credentials:
     In n8n: Credentials → + Add credential → HTTP Request Auth
     Enter your Bright Data API key
     Test the connection
  Configure dataset:
     Ensure you have access to Google Maps dataset (gd_m8ebnr0q2qlklc02fz)
     Verify dataset permissions in Bright Data dashboard

  Step 3: Configure Google Sheets Integration
  Create a Google Sheet:
     Go to Google Sheets
     Create a new spreadsheet named "Business Data" or similar
     Copy the Sheet ID from URL: https://docs.google.com/spreadsheets/d/SHEET_ID_HERE/edit
  Set up Google Sheets credentials:
     In n8n: Credentials → + Add credential → Google Sheets OAuth2 API
     Complete OAuth setup and test connection
  Prepare your data sheet with columns:
     Column A: Name
     Column B: Address
     Column C: Rating
     Column D: Phone Number
     Column E: URL

  Step 4: Update Workflow Settings
  Update Google Sheets node:
     Open "Save to Google Sheets" node
     Replace the document ID with your Sheet ID
     Select your Google Sheets credential
     Choose the correct sheet/tab name
  Update Bright Data nodes:
     Open HTTP Request nodes
     Replace BRIGHT_DATA_API_KEY with your actual API key
     Verify dataset ID matches your subscription

  Step 5: Test & Activate
  Test the workflow:
     Activate workflow (toggle switch)
     Submit test form with location: "New York" and keywords: "restaurants"
     Verify data appears in Google Sheet
     Check for proper phone number extraction

  📖 Usage Guide

  Submitting Search Requests
  Access the form URL provided by n8n
  Enter the desired location (city, state, or country)
  Enter relevant keywords (business type, industry, etc.)
  Submit the form and wait for processing

  Understanding the Results
  Your Google Sheet will populate with business data including:
  Complete business contact information
  Verified phone numbers from Google Maps
  Accurate addresses and ratings
  Direct links to Google Maps listings

  🔧 Customization Options

  Adding More Data Points
  Edit the "Bright Data API - Request Business Data" node to capture additional fields:
  Business descriptions
  Operating hours
  Reviews count
  Website URLs
  Photos and videos

  Modifying Search Parameters
  Customize the search behavior:
  Adjust "limit_per_input" for more or fewer results
  Modify search type and discovery method
  Add geographical coordinates for precise targeting

  🚨 Troubleshooting

  Common Issues & Solutions

  1. "Bright Data connection failed"
  Cause:** Invalid API credentials or dataset access
  Solution:** Verify credentials in Bright Data dashboard, check dataset permissions

  2. "No business data extracted"
  Cause:** Invalid search parameters or no results found
  Solution:** Try broader keywords or different locations, verify dataset availability

  3. "Google Sheets permission denied"
  Cause:** Incorrect credentials or sheet permissions
  Solution:** Re-authenticate Google Sheets, check sheet sharing settings

  4. "Workflow execution timeout"
  Cause:** Large search results or slow API response
  Solution:** Reduce search scope, increase timeout settings, check internet connection

  📊 Use Cases & Examples

  1. Lead Generation
  Goal:** Find potential customers in specific areas
  Search for businesses by industry and location
  Extract contact information for outreach campaigns
  Build targeted prospect lists

  2. Market Research
  Goal:** Analyze local business landscape
  Study competitor density in target markets
  Identify market gaps and opportunities
  Gather business intelligence for strategic planning

  3. Directory Creation
  Goal:** Build comprehensive business directories
  Create industry-specific business listings
  Maintain updated contact databases
  Support local business communities

  📈 Performance & Limits

  Expected Performance
  Processing time:** 1-5 minutes per search depending on results
  Data accuracy:** 95%+ for active Google Maps listings
  Success rate:** 90%+ for accessible businesses
  Concurrent requests:** Depends on Bright Data plan limits

  Resource Usage
  Memory:** ~50MB per execution
  Storage:** Minimal (data stored in Google Sheets)
  API calls:** 2-3 Bright Data calls + 1 Google Sheets call per search
  Bandwidth:** ~1-2MB per search request
  Execution time:** 2-5 minutes for typical searches

  Scaling Considerations
  Rate limiting:** Respect Bright Data API limits
  Error handling:** Implement retry logic for failed requests
  Data validation:** Add checks for incomplete business data
  Cost optimization:** Monitor API usage to control expenses
  Batch processing:** Group multiple searches for efficiency

  🤝 Support & Community

  Getting Help
  n8n Community Forum:** community.n8n.io
  Documentation:** docs.n8n.io
  Bright Data Support:** Contact through your dashboard
  GitHub Issues:** Report bugs and feature requests

  Contributing
  Share improvements with the community
  Report issues and suggest enhancements
  Create variations for specific use cases
  Document best practices and lessons learned

  🎯 Ready to Use!

  This workflow provides a solid foundation for automated Google Maps business data extraction. Customize it to fit your specific needs and use cases.

  Your workflow URL: https://your-n8n-instance.com/workflow/google-maps-scraper

  For any questions or support, please contact:  
  info@incrementors.com  
  or fill out this form: https://www.incrementors.com/contact-us/

workflow_json:
  {"id":"0eFmaRUQnmJfkcaI","meta":{"instanceId":"bc8ca75c203589705ae2e446cad7181d6f2a7cc1766f958ef9f34810e53b8cb2","templateCredsSetupCompleted":true},"name":"Zillow Property Listing Scraper by Location & Category Using Bright Data API & Google Sheets Integration","tags":[],"nodes":[{"id":"3ac2c390-45ef-4c40-99ba-7c41e387f88c","name":"📝 Form Trigger - Start Property Search","type":"n8n-nodes-base.formTrigger","position":[-2040,620],"webhookId":"1485a089-e3a3-4aff-8043-9e2e24a24bad","parameters":{"options":{},"formTitle":"Zillow Property Search","formFields":{"values":[{"fieldLabel":"Location","requiredField":true},{"fieldType":"dropdown","fieldLabel":"Listing Category","fieldOptions":{"values":[{"option":"House for rent"},{"option":"House for sale"}]}}]}},"typeVersion":2.2},{"id":"e8976089-8572-45f0-b895-3517bf157801","name":"📤 Trigger Bright Data Scraping Job","type":"n8n-nodes-base.httpRequest","position":[-1800,620],"parameters":{"url":"https://api.brightdata.com/datasets/v3/trigger","method":"POST","options":{},"jsonBody":"={\n  \"input\": [\n    {\n      \"location\": \"{{ $json.Location }}\",\n      \"listingCategory\": \"{{ $json['Listing Category'] }}\",\n      \"HomeType\": \"\",\n      \"days_on_zillow\": \"\"\n    }\n  ]\n}","sendBody":true,"sendQuery":true,"sendHeaders":true,"specifyBody":"json","queryParameters":{"parameters":[{"name":"dataset_id","value":"gd_lfqkr8wm13ixtbd8f5"},{"name":"include_errors","value":"true"},{"name":"type","value":"discover_new"},{"name":"discover_by","value":"input_filters"},{"name":"limit_per_input","value":"2"}]},"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer YOUR_TOKEN_HERE"}]}},"typeVersion":4.2},{"id":"1a3a3572-b249-4ca0-9b18-0fc2341aea93","name":"Form Submission Note","type":"n8n-nodes-base.stickyNote","position":[-2080,545],"parameters":{"color":7,"width":180,"height":240,"content":"Starts workflow when user submits location & category via form"},"typeVersion":1},{"id":"902fe79f-8373-4a17-9e6a-a8449bcd48f5","name":"API Trigger Note","type":"n8n-nodes-base.stickyNote","position":[-1850,545],"parameters":{"color":2,"width":200,"height":240,"content":"Sends search request to Bright Data API to trigger Zillow data scraping"},"typeVersion":1},{"id":"eea4519d-eaca-4bba-b31b-67c12bdd943b","name":"Status Check Note","type":"n8n-nodes-base.stickyNote","position":[-1610,545],"parameters":{"color":6,"width":200,"height":240,"content":"Monitors scraping job status and waits for completion"},"typeVersion":1},{"id":"0992cf05-aa2c-449f-af0f-c4cbd4cb340d","name":"⏳ Check Scraping Job Status","type":"n8n-nodes-base.httpRequest","position":[-1560,620],"parameters":{"url":"=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"format","value":"json"}]},"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer YOUR_TOKEN_HERE"}]}},"typeVersion":4.2},{"id":"ce4357aa-e6de-4082-8cef-7cb3aa9727a2","name":"Wait Timer Note","type":"n8n-nodes-base.stickyNote","position":[-1140,660],"parameters":{"color":6,"width":220,"height":220,"content":"Waits 1 minute before rechecking scraping job status"},"typeVersion":1},{"id":"5be9e5cb-57d3-47db-ba39-543799a1ecad","name":"⏱️ Wait Before Retry","type":"n8n-nodes-base.wait","position":[-1100,720],"webhookId":"7047efad-de41-4608-b95c-d3e0203ef620","parameters":{"unit":"minutes","amount":1},"typeVersion":1.1},{"id":"60878135-aa34-4b71-98ca-ac9dccc6b7e9","name":"Data Validation Note","type":"n8n-nodes-base.stickyNote","position":[-1140,420],"parameters":{"color":5,"width":220,"height":220,"content":"Validates if property data was found in scraping results"},"typeVersion":1},{"id":"4b6df4c2-c72a-4a29-8077-17332184a038","name":"Data Retrieval Note","type":"n8n-nodes-base.stickyNote","position":[-880,400],"parameters":{"color":4,"width":220,"height":220,"content":"Retrieves the actual property data using snapshot ID"},"typeVersion":1},{"id":"fc1fcdd3-f3cf-43aa-ac63-bfc5270b3663","name":"📥 Fetch Property Listing Data","type":"n8n-nodes-base.httpRequest","position":[-820,460],"parameters":{"url":"=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"format","value":"json"}]},"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer YOUR_TOKEN_HERE"}]}},"typeVersion":4.2},{"id":"b980cf99-85cc-4dd9-9c41-405f20e45827","name":"Google Sheets Save Note","type":"n8n-nodes-base.stickyNote","position":[-640,400],"parameters":{"color":3,"height":220,"content":"Saves the scraped property data to your Google Sheet"},"typeVersion":1},{"id":"a9daf529-3b67-4f07-8d55-95af66861baf","name":"📄 Save Property Data to Google Sheets","type":"n8n-nodes-base.googleSheets","position":[-600,460],"parameters":{"columns":{"value":{"URL":"={{ $json.hdpUrl }}","City":"={{ $json.city }}","Country":"={{ $json.country }}","Home Type":"={{ $json.homeType }}","Zestimate":"={{ $json.zestimate }}","Year Built":"={{ $json.yearBuilt }}","Agent Phone":"={{ $json.listing_provided_by.phone_number }}","Home Status":"={{ $json.homeStatus }}","School Rating":"={{ $json.schools[0].rating }}","Street Address":"={{ $json.address }}","Interior Details":"={{ $json.interior_full[0].values }}"},"schema":[{"id":"URL","type":"string","display":true,"required":false,"displayName":"URL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"City","type":"string","display":true,"required":false,"displayName":"City","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Agent Phone","type":"string","display":true,"required":false,"displayName":"Agent Phone","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Home Status","type":"string","display":true,"required":false,"displayName":"Home Status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Street Address","type":"string","display":true,"required":false,"displayName":"Street Address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Zestimate","type":"string","display":true,"required":false,"displayName":"Zestimate","defaultMatch":false,"canBeUsedToMatch":true},{"id":"School Rating","type":"string","display":true,"required":false,"displayName":"School Rating","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Year Built","type":"string","display":true,"required":false,"displayName":"Year Built","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Home Type","type":"string","display":true,"required":false,"displayName":"Home Type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Country","type":"string","display":true,"required":false,"displayName":"Country","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Interior Details","type":"string","display":true,"required":false,"displayName":"Interior Details","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"Zillow","cachedResultUrl":"https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0","cachedResultName":"Zillow"},"documentId":{"__rl":true,"mode":"list","value":"YOUR_GOOGLE_SHEET_ID","cachedResultUrl":"https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit","cachedResultName":"Property Data Sheet"}},"credentials":{"googleSheetsOAuth2Api":{"id":"YOUR_GOOGLE_SHEETS_CREDENTIAL_ID","name":"Google Sheets OAuth2"}},"typeVersion":4.6},{"id":"74062322-6e62-40d6-8876-dada77a319fc","name":"✅ Check If Scraping Complete","type":"n8n-nodes-base.if","position":[-1320,540],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"35ed620d-b5d5-4e97-bcc5-52b283d85616","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.status }}","rightValue":"ready"}]}},"typeVersion":2.2},{"id":"25326b0a-7fb3-4ee5-9d6a-56c2d1d4cf41","name":"📊 Validate Property Data Exists","type":"n8n-nodes-base.if","position":[-1080,480],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"f01bd215-c406-493c-a6e4-2b8ec5686b44","operator":{"type":"number","operation":"notEquals"},"leftValue":"={{ $json.records }}","rightValue":"={{ 0 }}"}]}},"typeVersion":2.2},{"id":"3a7c4645-e5e9-4feb-8635-0953b6ae6a6a","name":"Google Sheet Template Note","type":"n8n-nodes-base.stickyNote","position":[-2080,300],"parameters":{"color":7,"width":280,"content":"Sample Google Sheet Template:\nhttps://docs.google.com/spreadsheets/d/SAMPLE_SHEET_ID/edit\n\nMake a copy and update the workflow with your Sheet ID"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"1be06750-3f46-4f87-ab33-829b4e8f3079","connections":{"⏱️ Wait Before Retry":{"main":[[{"node":"⏳ Check Scraping Job Status","type":"main","index":0}]]},"⏳ Check Scraping Job Status":{"main":[[{"node":"✅ Check If Scraping Complete","type":"main","index":0}]]},"✅ Check If Scraping Complete":{"main":[[{"node":"📊 Validate Property Data Exists","type":"main","index":0}],[{"node":"⏱️ Wait Before Retry","type":"main","index":0}]]},"📥 Fetch Property Listing Data":{"main":[[{"node":"📄 Save Property Data to Google Sheets","type":"main","index":0}]]},"📊 Validate Property Data Exists":{"main":[[{"node":"📥 Fetch Property Listing Data","type":"main","index":0}]]},"📤 Trigger Bright Data Scraping Job":{"main":[[{"node":"⏳ Check Scraping Job Status","type":"main","index":0}]]},"📝 Form Trigger - Start Property Search":{"main":[[{"node":"📤 Trigger Bright Data Scraping Job","type":"main","index":0}]]}}}


name: Automated GitHub Scanner for Exposed AWS IAM Keys
author_name: Niranjan G
author_username: niranjan
nodes_used: ["n8n-nodes-base.httpRequest","n8n-nodes-base.slack","n8n-nodes-base.code"]
categories: []
created_at: 2025-06-18T13:22:16.072Z
updated_at: 2025-06-18T13:22:16.072Z
url: https://n8n.io/workflows/5021
scraped_at: 2025-07-06 21:16:30
description:
  Automated GitHub Scanner for Exposed AWS IAM Keys

  Overview

  This n8n workflow automatically scans GitHub for exposed AWS IAM access keys associated with your AWS account, helping security teams quickly identify and respond to potential security breaches. When compromised keys are found, the workflow generates detailed security reports and sends Slack notifications with actionable remediation steps.

  🔑 Key Features

  Automated AWS IAM Key Scanning**: Regularly checks for exposed AWS access keys on GitHub
  Real-time Security Alerts**: Sends immediate Slack notifications when compromised keys are detected
  Comprehensive Security Reports**: Generates detailed reports with exposure information and risk assessment
  Actionable Remediation Steps**: Provides clear instructions for securing compromised credentials
  Continuous Monitoring**: Maintains ongoing surveillance of your AWS environment

  📋 Workflow Steps

  List AWS Users: Retrieves all users from your AWS account
  Split Users for Processing: Processes each user individually
  Get User Access Keys: Retrieves access keys for each user
  Filter Active Keys Only: Focuses only on currently active access keys
  Search GitHub for Exposed Keys: Scans GitHub repositories for exposed access keys
  Aggregate Search Results: Consolidates and deduplicates search findings
  Check For Compromised Keys: Determines if any keys have been exposed
  Generate Security Report: Creates detailed security reports for compromised keys
  Extract AWS Usernames: Extracts usernames from AWS response for notification
  Format Slack Alert: Prepares comprehensive Slack notifications
  Send Slack Notification: Delivers alerts with actionable information
  Continue Scanning: Maintains continuous monitoring cycle

  🛠️ Setup Requirements

  Prerequisites

  Active n8n instance
  AWS account with IAM permissions
  GitHub account/token for searching repositories
  Slack workspace for notifications

  Required Credentials

  AWS Credentials:
     IAM user with permissions to list users and access keys
     Access Key ID and Secret Access Key

  GitHub Credentials:
     Personal Access Token with search permissions

  Slack Credentials:
     Webhook URL for your notification channel

  ⚙️ Configuration

  AWS Configuration:
     Configure the "List AWS Users" node with your AWS credentials
     Ensure proper IAM permissions for listing users and access keys

  GitHub Configuration:
     Set up the "Search GitHub for Exposed Keys" node with your GitHub token
     Adjust search parameters if needed

  Slack Configuration:
     Configure the Slack node with your webhook URL
     Customize notification format if desired

  🚀 Usage

  Running the Workflow

  Manual Execution: Click "Execute Workflow" to run an immediate scan
  Scheduled Execution: Set up a schedule to run periodic scans (recommended daily or weekly)

  Repository Compatibility

  This workflow is compatible with both public and private GitHub repositories to which you have access. It will scan all repositories you have permission to view based on your GitHub credentials.

  Handling Alerts

  When a compromised key is detected:

  Review the Slack notification for details about the exposure
  Follow the recommended remediation steps:
     Deactivate the compromised key immediately
     Create a new key if needed
     Investigate the exposure source
     Update any services using the compromised key

  ⚠️ Disclaimer

  This workflow template is provided for reference purposes only to demonstrate how to automate AWS IAM key exposure scanning. Please note:

  The scanning process may produce false positives as it only matches potential AWS access key patterns
  Always verify any reported exposures manually before taking action
  Disabling or deleting access keys without proper verification could have significant negative impacts on your environment
  Understand which systems and applications rely on identified access keys before deactivating them
  This template should be customized to fit your specific environment and security policies

  IMPORTANT: Use this workflow with caution and only after thoroughly understanding your AWS environment. The authors of this template are not responsible for any disruptions or damages resulting from its use.

  🔒 Security Considerations

  This workflow requires access to sensitive AWS credentials
  Store all credentials securely within n8n
  Review and rotate access keys regularly

  📝 Customization Options

  Adjust GitHub search parameters for more targeted scanning
  Customize Slack notification format and content
  Modify security report generation for your specific needs
  Integrate with additional notification channels (email, MS Teams, etc.)

  Optional: Enabling Interactive Slack Buttons

  The Slack Block Kit notification format supports interactive buttons that can be implemented if you want to perform actions directly from Slack:

  Disable Key: This button can be configured to automatically disable the compromised AWS IAM access key
  View Details: This button can be set up to show additional information about the exposure
  Acknowledge: This button can be used to mark the alert as acknowledged

  To make these buttons functional:

  Set up a Slack Socket Mode App:
     Create a Slack app in the Slack API Console
     Enable Socket Mode and Interactive Components
     Subscribe to the block_actions event to capture button clicks

  Create an n8n Webhook Endpoint:
     Add a new webhook node to receive Slack button click events
     Create separate workflows for each button action

  Implement AWS Key Disabling:
     For the "Disable Key" button, create a workflow that uses the n8n HTTP Request node to call the AWS IAM UpdateAccessKey API
     Example HTTP request that can be implemented in n8n:
            Method: POST
       URL: https://iam.amazonaws.com/
       Query Parameters:
         Action: UpdateAccessKey
         AccessKeyId: AKIAIOSFODNN7EXAMPLE
         Status: Inactive
         UserName: {{$json.username}}
         Version: 2010-05-08
       
  Update the Slack Message Format:
     Modify the Format Slack Alert node to include your webhook URL in the button action values
     Add callback_id and action_id values to identify which button was clicked

  This implementation allows for immediate response to security incidents directly from the Slack interface, reducing response time and improving security posture.

workflow_json:
  {"id":"Tcy2xebw2oGWMxUN","meta":{"instanceId":"c62c01f3e843893075a10f252ec7d6d69e5ab593af019f50055d506cb3081b99","templateCredsSetupCompleted":true},"name":"🕵️‍♂️ Automated GitHub Scanner for Exposed AWS IAM Keys","tags":[{"id":"XuoVybTXeUXuim6G","name":"✅ Live","createdAt":"2025-06-08T07:59:43.586Z","updatedAt":"2025-06-08T07:59:43.586Z"},{"id":"MbPHhZHgb39Syuoa","name":"🔐 SecOps","createdAt":"2025-04-20T05:18:20.689Z","updatedAt":"2025-06-08T08:01:56.494Z"}],"nodes":[{"id":"84edf6c4-fc87-4b34-86c6-ad72c15cafe8","name":"When clicking ‘Execute workflow’","type":"n8n-nodes-base.manualTrigger","position":[-880,75],"parameters":{},"typeVersion":1},{"id":"b2c1157f-c1eb-4d22-95d0-6ec166a93a4a","name":"Split Users for Processing","type":"n8n-nodes-base.splitInBatches","position":[-220,75],"parameters":{"options":{}},"typeVersion":3},{"id":"ae5a0e4f-892c-4a75-bdcc-36253fbc7274","name":"Get User Access Keys","type":"n8n-nodes-base.httpRequest","position":[0,0],"parameters":{"url":"https://iam.amazonaws.com","method":"POST","options":{},"sendBody":true,"contentType":"form-urlencoded","authentication":"predefinedCredentialType","bodyParameters":{"parameters":[{"name":"Action","value":"ListAccessKeys"},{"name":"Version","value":"2010-05-08"},{"name":"UserName","value":"={{ $json.username }}"}]},"nodeCredentialType":"aws"},"credentials":{"aws":{"id":"Y0EXCbx12345678","name":"AWS account"}},"typeVersion":4.1},{"id":"0946f05d-11f0-480b-934a-c996bbb9551e","name":"Filter Active Keys Only","type":"n8n-nodes-base.if","position":[220,0],"parameters":{"options":{},"conditions":{"options":{"version":1,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"active-key-check","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.ListAccessKeysResponse.ListAccessKeysResult.AccessKeyMetadata[0].Status }}","rightValue":"Active"}]}},"typeVersion":2},{"id":"8f9db031-245e-4c00-bdb9-4ed55e9b57b2","name":"Search GitHub for Exposed Keys","type":"n8n-nodes-base.httpRequest","position":[880,0],"parameters":{"url":"={{ $json.simpleSearch.searchUrl }}","options":{"timeout":10000,"response":{"response":{"responseFormat":"json"}}},"authentication":"predefinedCredentialType","nodeCredentialType":"githubApi"},"credentials":{"githubApi":{"id":"3fz93A0mgyxzXGOL","name":"GitHub account"}},"typeVersion":4.1},{"id":"a6cd482c-86d2-49ac-aefe-6beec92c98af","name":"Aggregate Search Results","type":"n8n-nodes-base.code","position":[1100,0],"parameters":{"jsCode":"// Aggregate all search results\nconst allResults = [];\nconst accessKeyId = $input.first().json.accessKeyId;\nconst userName = $input.first().json.userName;\n\nfor (const item of $input.all()) {\n  if (item.json.total_count > 0) {\n    allResults.push(...item.json.items);\n  }\n}\n\n// Remove duplicates based on repository and file path\nconst uniqueResults = allResults.filter((item, index, self) => \n  index === self.findIndex(t => t.repository.full_name === item.repository.full_name && t.path === item.path)\n);\n\nreturn [{\n  accessKeyId,\n  userName,\n  totalMatches: uniqueResults.length,\n  repositories: uniqueResults,\n  isCompromised: uniqueResults.length > 0\n}];"},"typeVersion":2},{"id":"75ed15ec-fdee-4644-a83c-6b47005dcac1","name":"Check For Compromised Keys","type":"n8n-nodes-base.if","position":[1320,0],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"ebf33a67-f8f3-4700-8579-1d33b7a642d5","operator":{"type":"boolean","operation":"equals"},"leftValue":"isCompromised","rightValue":"={{ $json.isCompromised }}"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"57753be8-33d2-4172-94a2-0d5a4f7c73ec","name":"Generate Security Report","type":"n8n-nodes-base.code","position":[1540,0],"parameters":{"jsCode":"// Generate comprehensive security report - Notification Only (No Automatic Actions)\nconst data = $input.item.json;\n\nconst report = {\n  timestamp: new Date().toISOString(),\n  accessKeyId: data.accessKeyId,\n  userName: data.userName,\n  status: data.isCompromised ? 'COMPROMISED' : 'SAFE',\n  totalRepositories: data.totalMatches,\n  repositories: data.repositories.map(repo => ({\n    name: repo.repository.full_name,\n    url: repo.html_url,\n    path: repo.path,\n    score: repo.score\n  })),\n  actionTaken: data.isCompromised ? 'Security team notified - Manual review required' : 'No action required',\n  riskLevel: data.totalMatches > 5 ? 'HIGH' : data.totalMatches > 0 ? 'MEDIUM' : 'LOW',\n  notificationSent: data.isCompromised ? true : false,\n  requiresManualAction: data.isCompromised ? true : false,\n  recommendedActions: data.isCompromised ? [\n    'Manually disable the compromised access key',\n    'Generate new access keys for affected services',\n    'Remove exposed keys from repositories',\n    'Audit recent API usage for this key'\n  ] : []\n};\n\nreturn [report];"},"typeVersion":2},{"id":"f2634090-b035-4592-ad56-b970c2bff14c","name":"Continue Scanning","type":"n8n-nodes-base.noOp","position":[2340,80],"parameters":{},"typeVersion":1},{"id":"158340f1-4dc4-4b4c-933f-95a28be524dc","name":"Slack","type":"n8n-nodes-base.slack","position":[2020,0],"webhookId":"47dc1fb0-71c0-40f6-8263-88880f01a436","parameters":{"text":"={{ $json.message }}","select":"channel","channelId":{"__rl":true,"mode":"id","value":"C08Q2H8SRUP"},"otherOptions":{}},"credentials":{"slackApi":{"id":"i1yhHILyYn12345678","name":"Slack account"}},"typeVersion":2.3},{"id":"c0300832-418b-4fa8-98b6-2b799f2bcfe6","name":"Format Slack Alert","type":"n8n-nodes-base.code","position":[1760,0],"parameters":{"jsCode":"/**\n * GitHub Scanner for Exposed AWS IAM Keys - Data Processor\n * \n * This script processes the results from the AWS IAM Key scanner workflow\n * and formats them for reporting and notification purposes.\n */\n\n// Main entry point - this is what n8n will call\n// Input: items array from n8n workflow\n// Output: Slack Block Kit UI format (blocks array only)\nconst items = $input.all();\n\n// Process the input data\nconst scanResults = items.map(item => item.json);\nconst processedResults = processIAMScanResults(scanResults);\n\n// Format for markdown notification\nconst markdownNotification = formatForMarkdownNotification(processedResults);\n// Return as array of objects for n8n\nreturn [{ message: markdownNotification }];\n\n/**\n * Process scan results and format them for reporting\n * @param {Array} scanResults - Array of scan result objects from the workflow\n * @returns {Array} Array of formatted result objects\n */\nfunction processIAMScanResults(scanResults) {\n  if (!Array.isArray(scanResults) || scanResults.length === 0) {\n    return [{\n      status: 'NO_RESULTS',\n      timestamp: new Date().toISOString(),\n      message: 'No scan results to process'\n    }];\n  }\n\n  // Process each scan result\n  const processedResults = scanResults.map(result => {\n    // Create a deep copy to avoid modifying the original data\n    const processedResult = JSON.parse(JSON.stringify(result));\n    \n    // Ensure we have the required fields\n    if (!processedResult.timestamp) {\n      processedResult.timestamp = new Date().toISOString();\n    }\n    \n    // Calculate risk metrics if not provided\n    if (!processedResult.riskLevel) {\n      processedResult.riskLevel = calculateRiskLevel(processedResult);\n    }\n    \n    // Generate recommended actions if not provided\n    if (!processedResult.recommendedActions || processedResult.recommendedActions.length === 0) {\n      processedResult.recommendedActions = generateRecommendedActions(processedResult);\n    }\n    \n    return processedResult;\n  });\n\n  return processedResults;\n}\n  \n  /**\n   * Calculate risk level based on scan result data\n   * @param {Object} result - Individual scan result\n   * @returns {string} Risk level (HIGH, MEDIUM, LOW)\n   */\n  function calculateRiskLevel(result) {\n    // Default to MEDIUM if we can't determine\n    if (!result || !result.status) {\n      return 'MEDIUM';\n    }\n    \n    // Determine risk level based on status and other factors\n    if (result.status === 'COMPROMISED') {\n      // Public repositories or repositories with many contributors increase risk\n      if (result.repositories && result.repositories.some(repo => {\n        return repo.score >= 0.8; // High score indicates higher risk\n      })) {\n        return 'HIGH';\n      }\n      return 'MEDIUM';\n    } else if (result.status === 'POTENTIAL_EXPOSURE') {\n      return 'MEDIUM';\n    } else {\n      return 'LOW';\n    }\n  }\n  \n  /**\n   * Generate recommended actions based on scan result\n   * @param {Object} result - Individual scan result\n   * @returns {Array} List of recommended actions\n   */\n  function generateRecommendedActions(result) {\n    const commonActions = [\n      'Review the exposure details in the security report',\n      'Rotate affected access keys immediately'\n    ];\n    \n    if (result.status === 'COMPROMISED') {\n      return [\n        ...commonActions,\n        'Disable the compromised access key',\n        'Generate new access keys for affected services',\n        'Remove exposed keys from repositories',\n        'Audit recent API usage for this key'\n      ];\n    } else if (result.status === 'POTENTIAL_EXPOSURE') {\n      return [\n        ...commonActions,\n        'Verify if the exposure is a false positive',\n        'Consider rotating keys as a precaution'\n      ];\n    } else {\n      return [\n        'No immediate action required',\n        'Continue monitoring for potential exposures'\n      ];\n    }\n  }\n  \n  /**\n   * Format scan results for Slack-compatible markdown notification\n   * @param {Array} processedResults - Processed scan results\n   * @returns {string} Slack-compatible markdown formatted notification text\n   */\n  function formatForMarkdownNotification(processedResults) {\n    if (!Array.isArray(processedResults) || processedResults.length === 0) {\n      return `🔒 *AWS IAM Key Scan Completed*\\n\\nNo exposed AWS IAM keys were detected in this scan.`;\n    }\n  \n    // Count compromised keys\n    const compromisedCount = processedResults.filter(r => r.status === 'COMPROMISED').length;\n    \n    if (compromisedCount === 0) {\n      return `🔒 *AWS IAM Key Scan Completed*\\n\\nNo exposed AWS IAM keys were detected in this scan.`;\n    }\n    \n    // Create Slack-compatible notification for compromised keys\n    let markdown = `⚠️ *ALERT: AWS IAM Keys Exposed*\\n\\n*${compromisedCount}* AWS IAM keys have been potentially exposed on GitHub. Immediate action required.\\n\\n`;\n    \n    // Add details for each compromised key\n    processedResults.filter(r => r.status === 'COMPROMISED').forEach((result, index) => {\n      markdown += `*Exposure ${index + 1}*\\n\\n`;\n      \n      // Add repository information in a cleaner format\n      markdown += `*Exposure Details:*\\n`;\n      result.repositories.forEach(repo => {\n        markdown += `• *Repository:* ${repo.name}\\n`;\n        markdown += `• *Path:* \\`${repo.path}\\`\\n`;\n        markdown += `• *Risk Score:* ${repo.score.toFixed(2)}\\n\\n`;\n      });\n      \n      // Add risk level and action taken in a compact format\n      markdown += `*Risk Level:* ${result.riskLevel} | *Action Taken:* ${result.actionTaken || 'None'}\\n\\n`;\n      \n      // Add recommended actions with better formatting\n      markdown += `*Recommended Actions:*\\n`;\n      result.recommendedActions.forEach(action => {\n        markdown += `• ${action}\\n`;\n      });\n      markdown += `\\n`;\n    });\n    \n    return markdown;\n  }\n\n  \n  // Export functions for use in n8n workflow\n  module.exports = {\n    processIAMScanResults,\n    calculateRiskLevel,\n    generateRecommendedActions,\n    formatForMarkdownNotification\n  };"},"typeVersion":2},{"id":"3ed685c7-27b5-4a00-840a-6f9dddff6d3f","name":"Prepare Github Search","type":"n8n-nodes-base.code","position":[440,0],"parameters":{"jsCode":"/**\n * Simplified GitHub Search for AWS Access Keys\n * This script generates optimized search queries for finding exposed AWS access keys on GitHub\n */\n\n/**\n * Generates a GitHub API search URL for a given AWS access key\n * @param {Object} inputData - The input data containing AWS access key information\n * @returns {Object} - Search information including URL and query\n */\nfunction generateGitHubSearchQuery(inputData) {\n  try {\n    // Extract access key information from input\n    let accessKeyId;\n    let userName;\n    \n    // Handle different input formats\n    if (inputData && typeof inputData === 'object') {\n      // Check for n8n workflow format\n      if (inputData.ListAccessKeysResponse && \n          inputData.ListAccessKeysResponse.ListAccessKeysResult && \n          inputData.ListAccessKeysResponse.ListAccessKeysResult.AccessKeyMetadata && \n          Array.isArray(inputData.ListAccessKeysResponse.ListAccessKeysResult.AccessKeyMetadata) && \n          inputData.ListAccessKeysResponse.ListAccessKeysResult.AccessKeyMetadata.length > 0) {\n        \n        accessKeyId = inputData.ListAccessKeysResponse.ListAccessKeysResult.AccessKeyMetadata[0].AccessKeyId;\n        userName = inputData.ListAccessKeysResponse.ListAccessKeysResult.AccessKeyMetadata[0].UserName;\n      } \n      // Direct object format\n      else if (inputData.accessKeyId) {\n        accessKeyId = inputData.accessKeyId;\n        userName = inputData.userName || 'unknown';\n      }\n    }\n    \n    // Validate we have an access key\n    if (!accessKeyId) {\n      console.error('No valid AWS access key ID found in input');\n      return { error: 'No valid AWS access key ID found in input' };\n    }\n    \n    // Create the most effective search query\n    // Based on testing, the exact match with quotes is most reliable\n    const searchQuery = `\"${accessKeyId}\" in:file`;\n    \n    // Generate the GitHub API search URL\n    const searchUrl = `https://api.github.com/search/code?q=${encodeURIComponent(searchQuery)}`;\n    \n    return {\n      accessKeyId,\n      userName,\n      searchQuery,\n      searchUrl,\n      note: 'A single exact match query is typically sufficient for finding exposed AWS keys'\n    };\n  } catch (error) {\n    console.error('Error generating GitHub search query:', error);\n    return { error: `Error generating GitHub search query: ${error.message}` };\n  }\n}\n\n/**\n * For more comprehensive searches, this function generates multiple search patterns\n * This is optional and can be used if the simple search doesn't yield results\n * @param {string} accessKeyId - The AWS access key ID to search for\n * @returns {Array} - Array of search queries and URLs\n */\nfunction generateComprehensiveSearch(accessKeyId) {\n  if (!accessKeyId) {\n    return { error: 'No access key ID provided' };\n  }\n  \n  // Search patterns for access keys (in order of effectiveness)\n  const searchQueries = [\n    `\"${accessKeyId}\" in:file`,           // Exact match (most effective)\n    `${accessKeyId} in:file`,              // Without quotes (catches more results but may have false positives)\n    `AWS_ACCESS_KEY_ID=${accessKeyId} in:file`,  // Environment variable format\n    `aws_access_key_id: ${accessKeyId} in:file`, // YAML/config format\n    `accessKeyId: ${accessKeyId} in:file`        // JavaScript/JSON format\n  ];\n  \n  return searchQueries.map(query => ({\n    searchQuery: query,\n    searchUrl: `https://api.github.com/search/code?q=${encodeURIComponent(query)}`\n  }));\n}\n\n// For n8n integration\nfunction processForN8n() {\n  try {\n    // Get input data\n    const inputData = $input.item.json;\n    \n    // Generate the simplified search (recommended approach)\n    const simpleSearch = generateGitHubSearchQuery(inputData);\n    \n    // For backward compatibility, also generate the comprehensive search\n    // if an access key was successfully extracted\n    let comprehensiveSearch = [];\n    if (simpleSearch.accessKeyId) {\n      comprehensiveSearch = generateComprehensiveSearch(simpleSearch.accessKeyId);\n    }\n    \n    return {\n      simpleSearch,\n      comprehensiveSearch,\n      recommendation: 'The simple search is recommended for most cases. Only use comprehensive search if simple search yields no results.'\n    };\n  } catch (error) {\n    console.error('Error in n8n processing:', error);\n    return { error: `Error in n8n processing: ${error.message}` };\n  }\n}\n\n// For standalone usage\nif (typeof module !== 'undefined' && module.exports) {\n  module.exports = {\n    generateGitHubSearchQuery,\n    generateComprehensiveSearch\n  };\n} else {\n  // For n8n execution\n  return processForN8n();\n}"},"typeVersion":2},{"id":"e58f0cd8-13df-41eb-9a9c-99efc7eba0c4","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-900,-680],"parameters":{"width":1120,"height":580,"content":"# 🔐🕵️‍♂️ GitHub Scanner for Exposed AWS IAM Keys – Quick Overview\n\n## ⚙️ Workflow at a Glance\n\n1. 🔍 **Automated Discovery**  \n   Scans GitHub repositories for exposed AWS IAM access keys associated with your AWS account.\n\n2. 🧠 **Intelligent Filtering**  \n   Processes only active access keys and eliminates duplicate findings.\n\n3. 🚨 **Risk Assessment**  \n   Evaluates exposure severity and assigns risk levels (High/Medium/Low) based on findings.\n\n4. 📣 **Actionable Alerts**  \n   Sends detailed Slack notifications with interactive buttons for immediate response.\n\n5. 🛠️ **Remediation Guidance**  \n   Provides step-by-step instructions for securing compromised credentials.\n\n6. 🔄 **Continuous Monitoring**  \n   Maintains ongoing surveillance to detect new exposures quickly.\n\n---\n\n*🛡️ This workflow helps security teams quickly identify and respond to potential security breaches from exposed AWS credentials.*\n"},"typeVersion":1},{"id":"ef29b02b-f2a4-4642-a5c4-c9685b0e2c22","name":"Rate Limit Wait","type":"n8n-nodes-base.wait","position":[660,0],"webhookId":"850e337e-d261-456a-86c1-1725d77f9e52","parameters":{},"typeVersion":1.1},{"id":"714724b6-9aaf-4d17-97b7-1a3fd3dcaeae","name":"List AWS Users1","type":"n8n-nodes-base.httpRequest","position":[-660,80],"parameters":{"url":"https://iam.amazonaws.com","method":"POST","options":{},"sendBody":true,"contentType":"form-urlencoded","authentication":"predefinedCredentialType","bodyParameters":{"parameters":[{"name":"Action","value":"ListUsers"},{"name":"Version","value":"2010-05-08"}]},"nodeCredentialType":"aws"},"credentials":{"aws":{"id":"Y0EXCbx12345678","name":"AWS account"}},"typeVersion":4.1},{"id":"a1448a68-81aa-4571-8f62-617c57daa6e6","name":"Extract AWS Usernames","type":"n8n-nodes-base.code","position":[-440,75],"parameters":{"jsCode":"// n8n Function node: Extract usernames from AWS ListUsersResponse\n\nconst allInputs = $input.all();\n\n// Find the ListUsersResponse input\nconst listUsersInput = allInputs.find(item => item.json.ListUsersResponse);\n\nif (!listUsersInput) {\n  throw new Error('No ListUsersResponse found in input data');\n}\n\n// Extract users array from the response\nconst users = listUsersInput.json\n  .ListUsersResponse\n  .ListUsersResult\n  .Users || [];\n\n// Extract usernames and return each as a separate item for looping\nconst usernameItems = users.map(user => ({\n  json: { username: user.UserName }\n}));\n\n// Return array of individual username objects\nreturn usernameItems;"},"typeVersion":2},{"id":"2339c570-93a3-4c1a-ae0d-2eb9810eeee8","name":"Disable Access Keys","type":"n8n-nodes-base.httpRequest","disabled":true,"position":[1200,-620],"parameters":{"url":"https://iam.amazonaws.com","method":"POST","options":{},"sendBody":true,"contentType":"form-urlencoded","authentication":"predefinedCredentialType","bodyParameters":{"parameters":[{"name":"Action","value":"UpdateAccessKey"},{"name":"AccessKeyId","value":"AKIAEXAMPLEACCESSKEY1"},{"name":"UserName","value":"user@domain.com"},{"name":"Status","value":"Inactive"},{"name":"Version","value":"2010-05-08"}]},"nodeCredentialType":"aws"},"credentials":{"aws":{"id":"Y0EXCbx12345678","name":"AWS account"}},"typeVersion":4.1},{"id":"99938eb1-580b-4a91-b7a7-83464b33053e","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[240,-680],"parameters":{"color":6,"width":1200,"height":580,"content":"## 🚨 Automate Disable Access Keys\n\n### 1. Prerequisites\n\n- Configure AWS credentials in n8n with appropriate IAM permissions  \n- Create an `Extract_Key_Info` node that provides the compromised key's ID and username  \n\n### 2. Workflow Integration\n\n- Add this node after your key detection logic  \n- Connect it to trigger when a compromised key is confirmed  \n\n### 3. Security Considerations\n\n- Ensure your AWS credentials have the `iam:UpdateAccessKey` permission  \n- Consider adding verification steps before automatic disabling  \n- Implement notification steps after key disabling (e.g., Slack, email)  \n\n---\n\nThis implementation enables **immediate remediation of security risks** by automatically disabling compromised AWS access keys as soon as they're discovered in GitHub repositories.\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"d96b586a-4739-4ef5-84c8-c71ff9f3e1e6","connections":{"Slack":{"main":[[{"node":"Continue Scanning","type":"main","index":0}]]},"List AWS Users1":{"main":[[{"node":"Extract AWS Usernames","type":"main","index":0}]]},"Rate Limit Wait":{"main":[[{"node":"Search GitHub for Exposed Keys","type":"main","index":0}]]},"Continue Scanning":{"main":[[{"node":"Split Users for Processing","type":"main","index":0}]]},"Format Slack Alert":{"main":[[{"node":"Slack","type":"main","index":0}]]},"Get User Access Keys":{"main":[[{"node":"Filter Active Keys Only","type":"main","index":0}]]},"Extract AWS Usernames":{"main":[[{"node":"Split Users for Processing","type":"main","index":0}]]},"Prepare Github Search":{"main":[[{"node":"Rate Limit Wait","type":"main","index":0}]]},"Filter Active Keys Only":{"main":[[{"node":"Prepare Github Search","type":"main","index":0}]]},"Aggregate Search Results":{"main":[[{"node":"Check For Compromised Keys","type":"main","index":0}]]},"Generate Security Report":{"main":[[{"node":"Format Slack Alert","type":"main","index":0}]]},"Check For Compromised Keys":{"main":[[{"node":"Generate Security Report","type":"main","index":0}]]},"Split Users for Processing":{"main":[[],[{"node":"Get User Access Keys","type":"main","index":0}]]},"Search GitHub for Exposed Keys":{"main":[[{"node":"Aggregate Search Results","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"List AWS Users1","type":"main","index":0}]]}}}


name: LinkedIn Talent Pipeline: AI-Powered Candidate Search & Ranking with GPT-4o
author_name: Badr
author_username: b4dr
categories: []
created_at: 2025-06-18T14:21:55.773Z
updated_at: 2025-06-18T14:21:55.773Z
url: https://n8n.io/workflows/5022
scraped_at: 2025-07-06 21:16:30
description:
  The Ultimate AI Recruiting Solution for Finding Perfect Candidates with GPT-4o

  Are you tired of manually sifting through hundreds of LinkedIn profiles to find the right talent? Say goodbye to inefficient recruiting processes and embrace the power of AI-driven candidate selection. Our AI Candidate Ranking Flow automates the entire process from job description to ranked candidate lists, saving you countless hours while delivering superior results.

  💼 Key Features & Benefits

  Automatic Candidate Discovery**: Finds relevant LinkedIn profiles based on your job requirements
  AI-Powered Profile Analysis**: Uses advanced GPT models to evaluate each candidate's fit
  Multi-Factor Scoring**: Analyzes skills, experience, and education match with precision
  Seamless Google Sheets Integration**: Export comprehensive results for team collaboration
  100% Automated Workflow**: No manual intervention needed after initial setup
  Custom Match Criteria**: Tailor scoring parameters to your specific needs

  🚀 How It Works

  Simple Input: Just provide a detailed job description
  Smart Extraction: AI extracts key job requirements automatically
  Intelligent Search: Workflow finds relevant LinkedIn profiles using Google Search API
  Deep Profile Analysis: Apify scrapes comprehensive profile data
  Advanced AI Evaluation: Candidates scored based on match to job requirements
  Organized Results: Ranked candidates exported to Google Sheets

  🛠️ Getting Started

  Prerequisites:

  n8n workflow automation platform
  Google Cloud account with Custom Search API enabled
  Apify account for LinkedIn data extraction
  Google Sheets for results storage

  Quick Setup Guide:

  Import Workflow: Download and import our AI_Candidate_Ranking_Flow.json
  Set API Credentials:
     Configure your Google Custom Search API key
     Connect your Apify API token
     Set up Google Sheets OAuth connection
  .  Prepare Your Google Sheet:
      Create a new Google Sheet. In the first tab, create the following headers in the first row: First Name, Last Name, LinkedIn URL, Match Score (0-100), Skills Match, Experience Match, Summary, Ranking.
  Customize Parameters: Adjust AI matching criteria if needed
  Run & Analyze: Start the workflow and watch AI do the heavy lifting!

  💡 Pro Tips For Maximum Results

  Provide detailed job descriptions with specific technical requirements
  Include industry-specific terminology in your job description
  Adjust LLM temperature settings for more creative or precise matching
  Utilize multiple search result pages for a wider candidate pool
  Export data to multiple sheets for different hiring managers

  🔗 Essential Resources

  Apify LinkedIn Scraper - Get deep LinkedIn profile data
  n8n Documentation - Master workflow automation
  Google Custom Search Setup - Configure search API

  ⚙️ Technical Specifications

  Workflow Platform: n8n (latest version)
  AI Models: OpenAI GPT-4o-mini with optional upgrades
  Profile Data Source: Apify LinkedIn Scrapers
  API Integrations: Google Custom Search, Apify, Google Sheets
  Customization: Fully modifiable workflow and scoring parameters

  🔒 Privacy & Compliance

  This workflow respects all LinkedIn terms of service by utilizing only publicly available profile information through Google Search results and legitimate API services. Data processing complies with GDPR and relevant data protection regulations.

  🤔 Frequently Asked Questions

  Q: Do I need programming knowledge to use this?
  A: No! The workflow is completely visual and requires no coding experience.


  Q: Can I customize the matching criteria?
  A: Absolutely! The AI prompt and scoring system are fully customizable.

  Q: Does this replace human recruiters?
  A: No, it enhances their capabilities by handling the time-consuming initial screening.

  Get Started Today!

  Transform your recruiting process with our AI-Powered LinkedIn Candidate Ranking System. Import the workflow, connect your APIs, and start finding ideal candidates in minutes!

  Get Your Apify Account →

  Keywords: ai recruiting, linkedin automation, candidate ranking, job matching algorithm, n8n workflow, recruiting automation, apify linkedin, ai hr tools

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"meta":{"instanceId":"4786bf0f18c0e8e92c361de5a158cabf4eb0bb3b9c113091b054ff26e359a029"},"nodes":[{"id":"22e89311-cf71-4ac2-9863-86d5ecea8e27","name":"Job Description Input","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[880,320],"webhookId":"job-desc-webhook","parameters":{},"typeVersion":1.1},{"id":"faf1b39a-2d82-443b-a635-e713a2785a80","name":"Extract Job Details","type":"@n8n/n8n-nodes-langchain.agent","position":[1140,320],"parameters":{},"typeVersion":1.7},{"id":"e09c41f5-5e4e-47a3-8e2e-2e24ec74403a","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1100,540],"parameters":{},"typeVersion":1},{"id":"358e5c6d-a2fd-46f2-9f7a-c489d97f4733","name":"Window Buffer Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[1220,540],"parameters":{},"typeVersion":1.3},{"id":"5434c8a3-960e-45fa-a35b-d64d74f666b2","name":"Set Search Page Numbers","type":"n8n-nodes-base.set","position":[1540,320],"parameters":{},"typeVersion":3.4},{"id":"be49661f-2eed-40b8-b443-0b556fab29ad","name":"Split Search Pages","type":"n8n-nodes-base.splitOut","position":[1760,320],"parameters":{},"typeVersion":1},{"id":"9e062b99-8ba1-4bf1-9897-75389bd21119","name":"Google Custom Search API Request","type":"n8n-nodes-base.httpRequest","position":[1980,320],"parameters":{},"typeVersion":4.2},{"id":"3baccbf7-f435-47b5-b43e-1d505d01cf31","name":"Filter LinkedIn Profiles","type":"n8n-nodes-base.function","position":[2200,320],"parameters":{},"typeVersion":1},{"id":"83f477e8-33f2-48a9-a0fa-d5933eb5291b","name":"Prepare Apify Input","type":"n8n-nodes-base.function","position":[2420,320],"parameters":{},"typeVersion":1},{"id":"7f0c20da-d3a7-4715-a6ee-8fcaca274bc0","name":"LLM Scoring","type":"@n8n/n8n-nodes-langchain.openAi","position":[2960,960],"parameters":{},"typeVersion":1.7},{"id":"6234ddcf-3e0b-40e2-b5a0-3a7056aa9bbd","name":"Parse LLM Result","type":"n8n-nodes-base.code","position":[3340,960],"parameters":{},"typeVersion":2},{"id":"0b3863b1-e360-4e9f-a230-66978a42de73","name":"Save to Google Sheets","type":"n8n-nodes-base.googleSheets","position":[3560,1040],"parameters":{},"typeVersion":4.5},{"id":"ecb23196-a5f5-4f58-8c40-e9c6660bc8b5","name":"Workflow Documentation","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"content":""},"typeVersion":1},{"id":"a0a65e86-7ab2-455d-b3f0-5db24603b2b1","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1340,540],"parameters":{},"typeVersion":1.2},{"id":"144e0ddf-0d8d-4df4-ae79-0cf71b4be99b","name":"Run Apify Scraper","type":"n8n-nodes-base.httpRequest","position":[1880,960],"parameters":{},"typeVersion":4.2},{"id":"506fc90f-776d-4d71-8978-e9e8ae44c57e","name":"Extract Profile URLs","type":"n8n-nodes-base.code","position":[2640,320],"parameters":{},"typeVersion":2},{"id":"cd875e17-6fce-43c1-851b-97134069fb7f","name":"Limit","type":"n8n-nodes-base.limit","position":[2900,320],"parameters":{},"typeVersion":1},{"id":"1b1bb113-effa-4414-9a78-837f93ee54a0","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[1500,940],"parameters":{},"typeVersion":3},{"id":"6ab01d47-532f-49a8-8938-c4d5c5d3f52f","name":"Wait for Scraping","type":"n8n-nodes-base.wait","position":[2080,960],"webhookId":"e238029e-e85d-46a0-8c30-aef3ddeeef77","parameters":{},"typeVersion":1.1},{"id":"5e6356b4-590d-445e-a07a-d7e2bfc066fe","name":"Check Scraping Status","type":"n8n-nodes-base.httpRequest","position":[2300,880],"parameters":{},"typeVersion":4.2},{"id":"c506cd9e-aae1-4481-ac83-fc9e047ebdfd","name":"Verify Completion","type":"n8n-nodes-base.if","position":[2520,960],"parameters":{},"typeVersion":2.2},{"id":"49fb6044-4ba0-4fe3-afdf-0417b26fda5b","name":"Get LinkedIn Data","type":"n8n-nodes-base.httpRequest","position":[2740,960],"parameters":{},"typeVersion":4.2},{"id":"564192fc-3f7a-4837-b1c1-d60b2183c174","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1460,720],"parameters":{"content":""},"typeVersion":1},{"id":"a5526f40-c47c-490f-aedf-46fc334d22a5","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[800,180],"parameters":{"content":""},"typeVersion":1}],"pinData":{},"connections":{"Limit":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"LLM Scoring":{"main":[[{"node":"Parse LLM Result","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Run Apify Scraper","type":"main","index":0}]]},"Parse LLM Result":{"main":[[{"node":"Save to Google Sheets","type":"main","index":0}]]},"Get LinkedIn Data":{"main":[[{"node":"LLM Scoring","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Extract Job Details","type":"ai_languageModel","index":0}]]},"Run Apify Scraper":{"main":[[{"node":"Wait for Scraping","type":"main","index":0}]]},"Verify Completion":{"main":[[{"node":"Get LinkedIn Data","type":"main","index":0}],[{"node":"Wait for Scraping","type":"main","index":0}]]},"Wait for Scraping":{"main":[[{"node":"Check Scraping Status","type":"main","index":0}]]},"Split Search Pages":{"main":[[{"node":"Google Custom Search API Request","type":"main","index":0}]]},"Extract Job Details":{"main":[[{"node":"Set Search Page Numbers","type":"main","index":0}]]},"Prepare Apify Input":{"main":[[{"node":"Extract Profile URLs","type":"main","index":0}]]},"Extract Profile URLs":{"main":[[{"node":"Limit","type":"main","index":0}]]},"Window Buffer Memory":{"ai_memory":[[{"node":"Extract Job Details","type":"ai_memory","index":0}]]},"Check Scraping Status":{"main":[[{"node":"Verify Completion","type":"main","index":0}]]},"Job Description Input":{"main":[[{"node":"Extract Job Details","type":"main","index":0}]]},"Save to Google Sheets":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Set Search Page Numbers":{"main":[[{"node":"Split Search Pages","type":"main","index":0}]]},"Filter LinkedIn Profiles":{"main":[[{"node":"Prepare Apify Input","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Extract Job Details","type":"ai_outputParser","index":0}]]},"Google Custom Search API Request":{"main":[[{"node":"Filter LinkedIn Profiles","type":"main","index":0}]]}}}


name: Build a RAG System with Automatic Citations using Qdrant, Gemini & OpenAI
author_name: Davide
author_username: n3witalia
categories: []
created_at: 2025-06-18T14:37:45.594Z
updated_at: 2025-06-18T14:37:45.594Z
url: https://n8n.io/workflows/5023
scraped_at: 2025-07-06 21:16:30
description:
  This workflow implements a Retrieval-Augmented Generation (RAG) system that:

  Stores vectorized documents in Qdrant,
  Retrieves relevant content based on user input,
  Generates AI answers using Google Gemini,
  Automatically cites the document sources (from Google Drive).

  Workflow Steps

  Create Qdrant Collection
     A REST API node creates a new collection in Qdrant with specified vector size (1536) and cosine similarity.

  Load Files from Google Drive
     The workflow lists all files in a Google Drive folder, downloads them as plain text, and loops through each.

  Text Preprocessing & Embedding

     Documents are split into chunks (500 characters, with 50-character overlap).
     Embeddings are created using OpenAI embeddings (text-embedding-3-small assumed).
     Metadata (file name and ID) is attached to each chunk.

  Store in Qdrant
     All vectors, along with metadata, are inserted into the Qdrant collection.

  Chat Input & Retrieval

     When a chat message is received, the question is embedded and matched against Qdrant.
     Top 5 relevant document chunks are retrieved.
     A Gemini model is used to generate the answer based on those sources.

  Source Aggregation & Response

     File IDs and names are deduplicated.
     The AI response is combined with a list of cited documents (filenames).
     Final output:

            AI Response

       Sources: ["Document1", "Document2"]
  Main Advantages

  End-to-end Automation**: From document ingestion to chat response generation, fully automated with no manual steps.
  Scalable Knowledge Base**: Easy to expand by simply adding files to the Google Drive folder.
  Traceable Responses**: Each answer includes its source files, increasing transparency and trustworthiness.
  Modular Design**: Each step (embedding, storage, retrieval, response) is isolated and reusable.
  Multi-provider AI**: Combines OpenAI (for embeddings) and Google Gemini (for chat), optimizing performance and flexibility.
  Secure & Customizable**: Uses API credentials and configurable chunk size, collection name, etc.

  How It Works  
  Document Processing & Vectorization  
     The workflow retrieves documents from a specified Google Drive folder.  
     Each file is downloaded, split into chunks (using a recursive text splitter), and converted into embeddings via OpenAI.  
     The embeddings, along with metadata (file ID and name), are stored in a Qdrant vector database under the collection negozio-emporio-verde.  

  Query Handling & Response Generation  
     When a user submits a chat message, the workflow:  
       Embeds the query using OpenAI.  
       Retrieves the top 5 relevant document chunks from Qdrant.  
       Uses Google Gemini to generate a response based on the retrieved context.  
       Aggregates and deduplicates the source file names from the retrieved chunks.  
     The final output includes both the AI-generated response and a list of source documents (e.g., Sources: ["FAQ.pdf", "Policy.txt"]).  

  Set Up Steps  
  Configure Qdrant Collection  
     Replace QDRANTURL and COLLECTION in the "Create collection" HTTP node to initialize the Qdrant collection with:  
       Vector size: 1536 (OpenAI embedding dimension).  
       Distance metric: Cosine.  
     Ensure the "Clear collection" node is configured to reset the collection if needed.  

  Google Drive & OpenAI Integration  
     Link the Google Drive node to the target folder (Test Negozio in this example).  
     Verify OpenAI and Google Gemini API credentials are correctly set in their respective nodes.  

  Metadata & Output Customization  
     Adjust the "Aggregate" and "Response" nodes if additional metadata fields are needed.  
     Modify the "Output" node to format the response (e.g., changing Sources: {{...}} to match your preferred style).  

  Testing  
     Trigger the workflow manually to test document ingestion.  
     Use the chat interface to verify responses include accurate source attribution.  

  Note: Replace placeholder values (e.g., QDRANTURL) with actual endpoints before deployment.

  Need help customizing?  
  Contact me for consulting and support or add me on Linkedin. 

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.googleDrive","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.chainRetrievalQa","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.retrieverVectorStore","@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","@n8n/n8n-nodes-langchain.documentDefaultDataLoader","@n8n/n8n-nodes-langchain.vectorStoreQdrant","@n8n/n8n-nodes-langchain.lmChatGoogleGemini"]

workflow_json:
  {"id":"OAvKQCYsly0DTlci","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462","templateCredsSetupCompleted":true},"name":"Complete RAG System with Automatic Source Citations Using Qdrant","tags":[],"nodes":[{"id":"65d3e882-ef84-4b3b-88b0-bb69bbe6886f","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-400,220],"parameters":{},"typeVersion":1},{"id":"db531b5a-588a-4982-aa00-e565d6f5610b","name":"Embeddings OpenAI1","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[940,480],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.1},{"id":"5a1606d8-d851-4fb1-a18a-a45f5de3adf2","name":"Default Data Loader1","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[1080,480],"parameters":{"options":{"metadata":{"metadataValues":[{"name":"file_id","value":"={{ $('Get file').item.json.id }}"},{"name":"file_name","value":"={{ $('Get file').item.json.name }}"}]}},"dataType":"binary","binaryMode":"specificField"},"typeVersion":1},{"id":"9923f6be-c2a5-4498-9fd2-0ed74ccdab35","name":"Qdrant Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[1000,240],"parameters":{"mode":"insert","options":{},"qdrantCollection":{"__rl":true,"mode":"list","value":"negozio-emporio-verde","cachedResultName":"negozio-emporio-verde"}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account (Hetzner)"}},"typeVersion":1},{"id":"db1f5e71-28ef-427e-8911-275ddea4e44f","name":"Create collection","type":"n8n-nodes-base.httpRequest","position":[-180,-140],"parameters":{"url":"http://QDRANTURL/collections/COLLECTION","method":"PUT","options":{},"jsonBody":"{\n  \"vectors\": {\n    \"size\": 1536,\n    \"distance\": \"Cosine\"  \n  },\n  \"shard_number\": 1,  \n  \"replication_factor\": 1,  \n  \"write_consistency_factor\": 1 \n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"qhny6r5ql9wwotpn","name":"Qdrant API (Hetzner)"}},"typeVersion":4.2},{"id":"e0936863-4ece-429c-bf32-49f75b5c8bf0","name":"Recursive Character Text Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","position":[1060,660],"parameters":{"options":{},"chunkSize":500,"chunkOverlap":50},"typeVersion":1},{"id":"1311350d-75d3-4edc-8fa9-584a1c36da6d","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[420,220],"parameters":{"options":{}},"typeVersion":3},{"id":"1f9b623c-4e93-44da-8c9d-cfe9f5d5be9a","name":"Wait","type":"n8n-nodes-base.wait","position":[1380,240],"webhookId":"89248db2-59f2-4b61-9cd5-71406144efee","parameters":{},"typeVersion":1.1},{"id":"22aacdc0-8ec5-42e2-b9a0-fb9e5a4aa23c","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-460,1080],"webhookId":"c9460030-9e23-41c4-9fcd-6c4c7fadf784","parameters":{"options":{}},"typeVersion":1.1},{"id":"1e132fba-00a5-414a-8f37-f34645f668ff","name":"Question and Answer Chain","type":"@n8n/n8n-nodes-langchain.chainRetrievalQa","position":[120,1280],"parameters":{"options":{}},"typeVersion":1.5},{"id":"badee75e-bca7-49e4-9095-c098cb7adcab","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[0,1500],"parameters":{"options":{},"modelName":"models/gemini-1.5-flash"},"credentials":{"googlePalmApi":{"id":"0p34rXqIqy8WuoPg","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"ad8cec62-ce1d-4e58-8e40-9a7a9f4f93c7","name":"Vector Store Retriever","type":"@n8n/n8n-nodes-langchain.retrieverVectorStore","position":[160,1500],"parameters":{"topK":5},"typeVersion":1},{"id":"0c7d1804-4525-4117-a19d-f2d59195fd47","name":"Qdrant Vector Store1","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[40,1680],"parameters":{"options":{},"qdrantCollection":{"__rl":true,"mode":"list","value":"negozio-emporio-verde","cachedResultName":"negozio-emporio-verde"}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account (Hetzner)"}},"typeVersion":1.1},{"id":"6cfe7e8a-e593-4e4e-a0be-3379dd85c748","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[20,1880],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"d9aa08b5-ed04-4506-9a2e-f994d4694f48","name":"Embeddings OpenAI4","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[100,1140],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"d0d32470-b1df-40ec-aac1-32e4c9cf2e4e","name":"Merge1","type":"n8n-nodes-base.merge","position":[640,1140],"parameters":{"mode":"combine","options":{},"combineBy":"combineAll"},"typeVersion":3.1},{"id":"2edbca72-220e-45a6-8295-830d58611549","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[460,940],"parameters":{"options":{},"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"document.metadata.file_id"},{"fieldToAggregate":"document.metadata.file_name"}]}},"typeVersion":1},{"id":"8d116bc2-73d8-4349-8b4e-8dc0aef7cfa3","name":"Clear collection","type":"n8n-nodes-base.httpRequest","position":[-140,220],"parameters":{"url":"http://QDRANTURL/collections/COLLECTION/points/delete","method":"POST","options":{},"jsonBody":"{\n  \"filter\": {}\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"qhny6r5ql9wwotpn","name":"Qdrant API (Hetzner)"}},"typeVersion":4.2},{"id":"0d4d3bab-2370-4ced-8f5d-2977d360f72b","name":"Get folder","type":"n8n-nodes-base.googleDrive","position":[120,220],"parameters":{"filter":{"driveId":{"__rl":true,"mode":"list","value":"My Drive","cachedResultUrl":"https://drive.google.com/drive/my-drive","cachedResultName":"My Drive"},"folderId":{"__rl":true,"mode":"list","value":"1RO5ByPhq2yvYLmbapTNC_kKdU5lZd4W5","cachedResultUrl":"https://drive.google.com/drive/folders/1RO5ByPhq2yvYLmbapTNC_kKdU5lZd4W5","cachedResultName":"Test Negozio"}},"options":{},"resource":"fileFolder"},"credentials":{"googleDriveOAuth2Api":{"id":"HEy5EuZkgPZVEa9w","name":"Google Drive account (n3w.it)"}},"typeVersion":3},{"id":"e81ee92f-db50-4c62-aac7-7bc03e63cc1a","name":"Get file","type":"n8n-nodes-base.googleDrive","position":[700,240],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"},"options":{"googleFileConversion":{"conversion":{"docsToFormat":"text/plain"}}},"operation":"download"},"credentials":{"googleDriveOAuth2Api":{"id":"HEy5EuZkgPZVEa9w","name":"Google Drive account (n3w.it)"}},"typeVersion":3},{"id":"c9bdc00a-ca8c-4457-8720-e6dce07e6b22","name":"chatInput","type":"n8n-nodes-base.set","position":[-200,1080],"parameters":{"options":{},"assignments":{"assignments":[{"id":"282b9bed-e5fd-4edb-95d5-682bcc08e070","name":"chatInput","type":"string","value":"={{ $json.chatInput }}"}]}},"typeVersion":3.4},{"id":"b65ca747-e738-4b7a-ae02-83840ce0a460","name":"Retrive sources","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[140,940],"parameters":{"mode":"load","topK":5,"prompt":"={{ $json.chatInput }}","options":{},"qdrantCollection":{"__rl":true,"mode":"list","value":"negozio-emporio-verde","cachedResultName":"negozio-emporio-verde"}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account (Hetzner)"}},"typeVersion":1.1},{"id":"265e2613-0155-4585-8d5c-fcda26975585","name":"Output","type":"n8n-nodes-base.set","position":[1060,1140],"parameters":{"options":{},"assignments":{"assignments":[{"id":"b296c92b-d9ee-4322-b972-d1069d01feb8","name":"output","type":"string","value":"={{ $('Question and Answer Chain').item.json.response }}\n\nSources: {{ (JSON.stringify($json.unique_file_names)) }},"}]}},"typeVersion":3.4},{"id":"9407fcaf-d90a-46bd-9b1f-b0493a0357c1","name":"Response","type":"n8n-nodes-base.code","position":[880,1140],"parameters":{"jsCode":"const item = $input.item.json;\n\n// Creiamo Set per rimuovere duplicati\nconst uniqueFileIds = Array.from(new Set(item.file_id));\nconst uniqueFileNames = Array.from(new Set(item.file_name));\n\n// Ritorniamo un item con i valori univoci\nreturn [\n  {\n    json: {\n      unique_file_ids: uniqueFileIds,\n      unique_file_names: uniqueFileNames\n    }\n  }\n];\n"},"typeVersion":2},{"id":"0b8a715f-36eb-49fd-895e-e8e76fdbb0c1","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-360,-520],"parameters":{"width":840,"height":220,"content":"## Complete RAG System with Automatic Source Citations Using Qdrant\n\nThis workflow implements a **Retrieval-Augmented Generation (RAG)** system that:\n\n* Stores vectorized documents in **Qdrant**,\n* Retrieves relevant content based on user input,\n* Generates AI answers using **Google Gemini**,\n* Automatically **cites the document sources** (from Google Drive).\n"},"typeVersion":1},{"id":"3220c323-a3d6-4855-ad05-2aaf8761771e","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[80,-200],"parameters":{"color":6,"width":880,"height":220,"content":"# STEP 1\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"},"typeVersion":1},{"id":"738835a3-888b-426e-a897-8ddc630b85bf","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-220,120],"parameters":{"color":4,"width":620,"height":520,"content":"# STEP 2\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Documents vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"},"typeVersion":1},{"id":"70205511-2c4a-4f2f-8f68-97e3ede28851","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1200,620],"parameters":{"color":4,"width":520,"height":420,"content":"Set as metadata:\n- FILE_ID from Google Drive\n- FILE_NAME from Google Drive\n\n```\n{\n  \"source\": \"blob\",\n  \"blobType\": \"text/plain\",\n  \"loc\": {\n    \"lines\": {\n      \"from\": 1,\n      \"to\": 15\n    }\n  },\n  \"file_id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxx\",\n  \"file_name\": \"FAQ\"\n}\n```\n\n\n"},"typeVersion":1},{"id":"921497ff-1beb-4bd1-aecd-81b68c5a0357","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[680,1400],"parameters":{"color":3,"width":520,"height":200,"content":"The final output is:\n\n\nRESPONSE\n\nSources: [\"FILENAME 1\", \"FILENAME 2\",...]\n\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"33d05a21-33dd-422a-ba58-3eafffc7d50a","connections":{"Wait":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Merge1":{"main":[[{"node":"Response","type":"main","index":0}]]},"Get file":{"main":[[{"node":"Qdrant Vector Store","type":"main","index":0}]]},"Response":{"main":[[{"node":"Output","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"Merge1","type":"main","index":0}]]},"chatInput":{"main":[[{"node":"Question and Answer Chain","type":"main","index":0},{"node":"Retrive sources","type":"main","index":0}]]},"Get folder":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Get file","type":"main","index":0}]]},"Retrive sources":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Clear collection":{"main":[[{"node":"Get folder","type":"main","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Qdrant Vector Store1","type":"ai_embedding","index":0}]]},"Embeddings OpenAI1":{"ai_embedding":[[{"node":"Qdrant Vector Store","type":"ai_embedding","index":0}]]},"Embeddings OpenAI4":{"ai_embedding":[[{"node":"Retrive sources","type":"ai_embedding","index":0}]]},"Qdrant Vector Store":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Default Data Loader1":{"ai_document":[[{"node":"Qdrant Vector Store","type":"ai_document","index":0}]]},"Qdrant Vector Store1":{"ai_vectorStore":[[{"node":"Vector Store Retriever","type":"ai_vectorStore","index":0}]]},"Vector Store Retriever":{"ai_retriever":[[{"node":"Question and Answer Chain","type":"ai_retriever","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"Question and Answer Chain","type":"ai_languageModel","index":0}]]},"Question and Answer Chain":{"main":[[{"node":"Merge1","type":"main","index":1}]]},"When chat message received":{"main":[[{"node":"chatInput","type":"main","index":0}]]},"Recursive Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader1","type":"ai_textSplitter","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Clear collection","type":"main","index":0}]]}}}


name: Build Custom Workflows Automatically with GPT-4o, RAG, and Web Search
author_name: Franz
author_username: agents-by-franz
categories: []
created_at: 2025-06-18T15:09:18.253Z
updated_at: 2025-06-18T15:09:18.253Z
url: https://n8n.io/workflows/5024
scraped_at: 2025-07-06 21:16:30
description:
  🚀 What the “Agent Builder” template does

  Need to turn a one-line chat request into a fully-wired n8n workflow template—complete with AI agents, RAG, and web-search super-powers—without lifting a finger?
  That’s exactly what Agent Builder automates:

  Listens to any incoming chat message (via the Chat Trigger).
  Spins up an AI architect that analyses the request, searches the web, reads n8n docs from a Pinecone vector store, and designs the smallest possible set of nodes.
  Auto-generates a ready-to-import JSON template and hands it back as a downloadable file—plus all the supporting assets (embeddings, vector store etc.) so the next prompt is even smarter.

  Think of it as your personal “workflow chef”: you shout the order, it shops for ingredients, cooks, plates, and serves the meal. All you do is eat.

  🤗 Who will love this?

  No-code builders / power users** who don’t want to wrestle with AI node wiring.
  Agencies & consultants** delivering lots of bespoke automations.
  Internal platform teams** who need a “workflow self-service portal” for non-technical colleagues.

  🧩 How it’s wired

  | Sub-process                | What happens inside                                                                                                                                                                              | Key nodes                                                                              |
  | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
  | Web Crawler (optional) | Firecrawl scrapes docs.n8n.io (or any URL you drop in) and streams raw markdown back.                                                                                                            | Set URL → HTTP Request (Extract) → Wait & Retry                                      |
  | RAG Trainer            | Splits the scraped docs, embeds them with OpenAI, and upserts vectors into Pinecone.                                                                                                             | Recursive Text Splitter → Embeddings OpenAI → Train Pinecone                         |
  | Agent Builder          | The star of the show – orchestrates GPT-4o (via OpenRouter), SerpAPI web-search, your Pinecone index and a Structured Output Parser to produce → validate → prettify the final n8n template. | Chat Trigger → AI Agent → OpenAI (validator) → Code (extract) → Convert to JSON file |

  Every arrow in the drawn workflow is pre-connected, so the generated template always passes n8n’s import check.

  🛠️ Getting set up (5 quick creds)

  | Service                                             | Credential type                                            |
  | --------------------------------------------------- | ---------------------------------------------------------- |
  | OpenAI / Azure OpenAI – embeddings & validation | OpenAI API                                               |
  | Pinecone – vector store                         | Pinecone API                                             |
  | OpenRouter – GPT-4o LLM                         | OpenRouter API Key                                       |
  | SerpAPI – web search                            | SerpAPI Key                                              |
  | Firecrawl (only if you plan to crawl)           | Generic Header Auth → Authorization: Bearer YOUR_KEY |

  Each node already expects those creds; just create them once, select in the dropdown, hit Activate.

  🏃‍♀️ What a typical run looks like

  User says: “Build me a workflow that monitors our support inbox, summarises new tickets with GPT and posts to Slack.”
  Chat Trigger captures the message.
  AI Agent:

     queries Pinecone for relevant n8n docs,
     fires a SerpAPI search for “n8n gmail trigger example”,
     sketches an architecture (Gmail Trigger → GPT Model → Slack).
  The agent returns JSON ➜ OpenAI node double-checks field names, connections, type versions.
  A tiny JS Code node slices the JSON out of the chat blob and saves it as template.json ready for download.
  You download, import, and… done.

  ✏️ Customising

  Switch the LLM* – plug in Claude 3, Gemini 1.5, or a local model; just swap the *OpenRouter Chat Model node.
  Point the RAG at your own docs* – change the crawl URL or feed PDFs via the *Default Data Loader.
  Hard-code preferred nodes* – edit the “User node preferences” in the system message so the agent always chooses *Notion for databases, etc.

  🥡 Take-away notes

  It's a prototype feel free to experiment with it to improve its capabilities.
  Have fun building!**

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","@n8n/n8n-nodes-langchain.toolSerpApi","@n8n/n8n-nodes-langchain.vectorStorePinecone","@n8n/n8n-nodes-langchain.documentDefaultDataLoader","@n8n/n8n-nodes-langchain.openAi","@n8n/n8n-nodes-langchain.lmChatOpenRouter"]

workflow_json:
  {"id":"M7saccCy1gO4g2zr","meta":{"instanceId":"5116f2f7706b559eceadfeb527d2f261505621d6d31889c13b53a0633d9b86eb","templateCredsSetupCompleted":true},"name":"Agent_Builder","tags":[],"nodes":[{"id":"ee1c8a9a-e0fb-46d2-8274-140f5b297fba","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-2320,240],"webhookId":"4e30031a-81f0-4d4d-bc44-2347530b51e8","parameters":{"options":{}},"typeVersion":1.1},{"id":"243ba102-72bf-441a-b247-d784b3b054bd","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","onError":"continueRegularOutput","position":[-1920,240],"parameters":{"options":{"systemMessage":"# General Instruction\nYou are a helpful AI agents that outputs n8n agents / workflows in JSON format.\n\n# Input\nYou receive the user request what the agent should be able to accomplish.\n\n# Output\nThe Output must be a valid n8n template JSON\n\n# Workflow\nThink carefully how the agent the user requests can be build. Start by conceptualizing the architecture. It might be helpful to reflect in how a human team would tackle the task or go backwards (starting with the desired end state). Note that most workflows need an AI agent as its \"brain\". Consult your tools whenever beneficial. Once you thought of a meaningful structure actually populate the template with the nodes. Work very iterative and use the tools EXTENSIVELY! Fill the nodes with the correct content and CONNECT them properly! In a last check everything and make sure all nodes are properly connected! All but the trigger and final Output node must be connected to at least one input and one output node. Whenever you need information regarding what is possible in n8n, with what nodes and how they are set up and connected, consult the tools as you see it fit. \n\n# Tools\nYou have access to the following tools:\n1) Pinecone vector store containing some of n8n decumentation, saved in a Pinecone Vector database\n2) SerpAPI web search tool, with which you can search for example existing n8n workflows and templates or node characteristics (leverage this a lot!)\n\n# User node preferences (if not specified differently by the user use the following nodes for the listed functionalities):\nvector database: {{ $json['vector database'] }}\nchat model: {{ $json['chat model'] }}\nembeddings: {{ $json.embedding }}\nweb search tool: {{ $json['web search tool'] }}\n\n# Examples (variables are replaced with \"...\")\n--> output refers to the final result. still do not skip an elaborate step by step thinking process and extensive tool use!\n## example 1\n### input: automation flow is designed to automatically monitor incoming Gmail messages, analyze their content and context using AI, and intelligently classify them with appropriate labels for better email organization and prioritization\n\n### output: {\n  \"id\": \"uf6t5qhnQMgilteE\",\n  \"meta\": {\n    \"instanceId\": \"f694ebfb8236012bcdeb0adbc4faa465b6fa315f9ad30732114d26f7419da901\",\n    \"templateCredsSetupCompleted\": true\n  },\n  \"name\": \"Email Manager\",\n  \"tags\": [\n    {\n      \"id\": \"xG398zgKum2bPs6D\",\n      \"name\": \"Personal Assistant\",\n      \"createdAt\": \"2025-05-28T13:58:43.876Z\",\n      \"updatedAt\": \"2025-05-28T13:58:43.876Z\"\n    }\n  ],\n  \"nodes\": [\n    {\n      \"id\": \"5e01a927-caf7-41ad-aca7-d7504e313564\",\n      \"name\": \"Gmail Trigger\",\n      \"type\": \"n8n-nodes-base.gmailTrigger\",\n      \"position\": [\n        -20,\n        -60\n      ],\n      \"parameters\": {\n        \"filters\": {},\n        \"pollTimes\": {\n          \"item\": [\n            {\n              \"mode\": \"everyMinute\"\n            }\n          ]\n        }\n      },\n      \"credentials\": {\n        \"gmailOAuth2\": {\n          \"id\": \"Ldq2rjN6Dod5DoKl\",\n          \"name\": \"Gmail account\"\n        }\n      },\n      \"typeVersion\": 1.2\n    },\n    {\n      \"id\": \"a8644856-a8bf-49de-84a7-3fd9f93550d3\",\n      \"name\": \"Gmail\",\n      \"type\": \"n8n-nodes-base.gmail\",\n      \"position\": [\n        200,\n        -20\n      ],\n      \"webhookId\": \"01c91a6b-4d45-4630-8e81-0f82ee5d6524\",\n      \"parameters\": {\n        \"simple\": false,\n        \"options\": {},\n        \"messageId\": \"=...\",\n        \"operation\": \"get\"\n      },\n      \"credentials\": {\n        \"gmailOAuth2\": {\n          \"id\": \"Ldq2rjN6Dod5DoKl\",\n          \"name\": \"Gmail account\"\n        }\n      },\n      \"typeVersion\": 2.1\n    },\n    {\n      \"id\": \"f6ddae9f-303b-46cd-980d-1d46fc4ecbec\",\n      \"name\": \"Structured Output Parser\",\n      \"type\": \"@n8n/n8n-nodes-langchain.outputParserStructured\",\n      \"position\": [\n        1000,\n        100\n      ],\n      \"parameters\": {\n        \"jsonSchemaExample\": \"{\\n\\t\\\"label\\\": \\\"Label name\\\", \\n\\\"label ID\\\": \\\"label ID\\\" \\n}\"\n      },\n      \"typeVersion\": 1.2\n    },\n    {\n      \"id\": \"cc6b0990-a778-4199-a0fe-80c83dfb9934\",\n      \"name\": \"Gmail1\",\n      \"type\": \"n8n-nodes-base.gmail\",\n      \"position\": [\n        1020,\n        -220\n      ],\n      \"webhookId\": \"575a4038-3b07-46b9-be69-39cfc1d47d7e\",\n      \"parameters\": {\n        \"labelIds\": \"= ... \",\n        \"messageId\": \"=...\",\n        \"operation\": \"addLabels\"\n      },\n      \"credentials\": {\n        \"gmailOAuth2\": {\n          \"id\": \"Ldq2rjN6Dod5DoKl\",\n          \"name\": \"Gmail account\"\n        }\n      },\n      \"typeVersion\": 2.1\n    },\n    {\n      \"id\": \"f47e8e55-f634-417f-b62f-60e47af71827\",\n      \"name\": \"Anthropic Chat Model\",\n      \"type\": \"@n8n/n8n-nodes-langchain.lmChatAnthropic\",\n      \"position\": [\n        380,\n        160\n      ],\n      \"parameters\": {\n        \"model\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"claude-sonnet-4-20250514\",\n          \"cachedResultName\": \"Claude Sonnet 4\"\n        },\n        \"options\": {}\n      },\n      \"credentials\": {\n        \"anthropicApi\": {\n          \"id\": \"BVgmqTRcPinCIX4S\",\n          \"name\": \"Anthropic account 3\"\n        }\n      },\n      \"typeVersion\": 1.3\n    },\n    {\n      \"id\": \"b0ed86c7-5ddd-48dc-aa93-5c4d5c1cacf7\",\n      \"name\": \"AI Agent\",\n      \"type\": \"@n8n/n8n-nodes-langchain.agent\",\n      \"position\": [\n        500,\n        -140\n      ],\n      \"parameters\": {\n        \"text\": \"Run the task.\",\n        \"options\": {\n          \"systemMessage\": \"=**Objective:** Analyze the provided email data and classify it with the most appropriate label. **Utilize the capability to check for prior email history (emails sent to or received from the sender by `max@trigify.io`)** to determine if this is a first-time interaction (cold email) or part of an existing relationship. This context is crucial for accurate labeling, especially for distinguishing between Marketing, Notifications, and FYI. Respond with *only* the corresponding Label ID.\\n\\n**Your Email Address (for context):** `max@trigify.io`\\n\\n**Key Capabilities (to be used by the system executing this prompt):**\\n* **Check Prior Email History:** Before full classification, determine if any prior email correspondence exists between `max@trigify.io` and `...`. This check should yield \\\"Yes\\\" (history exists) or \\\"No\\\" (no history found).\\n\\n**Input Email Data (from n8n JSON item for the *current* email):**\\n* **Sender Email:** `...`\\n* **Sender Name:** `...`\\n* **Direct Recipient Emails (To):** `...`\\n* **CC Recipient Emails:** `...` *(Added this based on your JSON, use if populated)*\\n* **Subject:** `...`\\n* **Body (Plain Text):** `...`\\n* **Existing Gmail Labels (for current email):** `...`\\n* **Auto-Submitted Header:** `...`\\n* **Original Sender Header (if different from From):** `...`\\n* **In-Reply-To Header (for current email):** `...`\\n* **References Header (for current email):** `...`\\n* **List-Unsubscribe Header:** `...`\\n* **Precedence Header:** `...` (e.g., \\\"Bulk\\\")\\n\\n**Labels, Descriptions, and Prioritization Logic:**\\n\\n**Guidance on Using Prior Email History & Unsubscribe Links:**\\n* **Prior Email History = \\\"No\\\":** Strong indicator of a **cold/unsolicited email**.\\n    * If promotional/sales pitch: Likely \\\"Marketing.\\\"\\n    * If exceptionally personalized & high-value for Trigify: Rare \\\"To Respond.\\\"\\n* **Prior Email History = \\\"Yes\\\":** Indicates an **existing relationship/conversation**.\\n    * If it's an update on terms, policies, or service changes from this known entity: Likely \\\"Notification.\\\"\\n    * If it's a newsletter Max subscribed to: Could be \\\"FYI\\\" or \\\"Marketing\\\" based on content.\\n    * If it's a direct message requiring action: Likely \\\"To Respond.\\\"\\n* **`List-Unsubscribe` Header or Unsubscribe Links in Body:**\\n    * Common in \\\"Marketing\\\" emails.\\n    * Also present in many legitimate \\\"Notification\\\" emails (e.g., service updates, policy changes like the DPA example) and some \\\"FYI\\\" newsletters for compliance.\\n    * **Therefore, an unsubscribe link alone does not define the category. Consider it alongside Prior Email History and email content/purpose.**\\n* **`Precedence: Bulk` Header:** Often indicates mass mailings, common for Marketing, Notifications, and some FYIs.\\n\\n---\\n\\n* **To Respond (Label ID: `Label_5151750749488724401`):**\\n    * **Primary Criteria:** Requires direct, timely action/reply from `max@trigify.io`.\\n    * **Key Indicators (especially if Prior Email History = \\\"Yes\\\"):** Direct questions to Max, assigned tasks, requests for info for Trigify, deadlines for Max, part of an active conversation (indicated by `In-Reply-To`/`References`).\\n    * **Sales Process Prioritization (Warm Leads/Active Processes - typically Prior Email History = \\\"Yes\\\"):** Ongoing, active Trigify sales process discussions.\\n    * **High-Value Cold Outreach (Exceptional Cases - Prior Email History = \\\"No\\\"):** Highly personalized, strategic opportunity for Trigify requiring Max's personal attention. (Default for cold sales is \\\"Marketing\\\").\\n\\n* **FYI (Label ID: `Label_7518716752151077752`):**\\n    * **Primary Criteria:** For Max's awareness; no immediate action/reply required.\\n    * **Key Indicators:**\\n        * Max is CC'd, primary action for others.\\n        * General announcements, *non-promotional* newsletters from *known entities/subscriptions* (Prior Email History = \\\"Yes\\\" or sender is clearly a subscribed source) that aren't critical service notifications.\\n        * Informational updates within ongoing projects where Max isn't the primary actor.\\n    * If an email is a mass mailing (`Precedence: Bulk`, `List-Unsubscribe` present) from a *known entity* (Prior Email History = \\\"Yes\\\") and is purely informational without a direct call to action or critical service update, it could be \\\"FYI.\\\"\\n\\n* **Comment (Label ID: `Label_1470120230130814788`):**\\n    * Comment/feedback on a document, task, system (e.g., subject \\\"New comment on...\\\").\\n\\n* **Notification (Label ID: `Label_9`):**\\n    * **Primary Criteria:** Provides important, often non-promotional, updates or alerts regarding an existing service, account, or system that `max@trigify.io` or Trigify uses or is affected by. Action is typically awareness, potential configuration change, or noting a deadline, rather than a conversational reply.\\n    * **Key Indicators:**\\n        * **Updates from Known Service Providers (Prior Email History = \\\"Yes\\\" is common):**\\n            * Changes to Terms of Service, Privacy Policies, Data Processing Agreements (DPAs like the \\\"Plain\\\" example).\\n            * Critical service availability announcements (outages, maintenance).\\n            * Security alerts related to an account Max uses.\\n            * Important updates about features or functionality of a service Trigify relies on, which are not primarily marketing new features.\\n        * System-generated alerts (e.g., `Auto-Submitted Header` = `auto-generated`) like social media notifications, non-meeting calendar reminders, some financial transaction alerts.\\n        * Subject lines may contain: \\\"Important Update,\\\" \\\"Service Notification,\\\" \\\"Policy Change,\\\" \\\"DPA Update,\\\" \\\"Security Alert.\\\"\\n        * Even if a `List-Unsubscribe` link is present (for compliance), if the core content is a critical service/account/legal update from a company Max/Trigify does business with, it's a \\\"Notification.\\\"\\n        * The `Existing Gmail Labels` might include `CATEGORY_UPDATES`.\\n\\n* **Meeting Update (Label ID: `Label_7958083858424702466`):**\\n    * Update specifically regarding a scheduled meeting (e.g., \\\"Accepted:\\\", \\\"Declined:\\\", \\\"Updated Invitation:\\\", \\\"Cancelled:\\\").\\n\\n* **Marketing (Label ID: `Label_5274550748854913384`):**\\n    * **Primary Criteria:** Unsolicited promotional sales pitch, advertisement, or general marketing newsletter, especially if **Prior Email History = \\\"No.\\\"**\\n    * **Key Indicators:**\\n        * **No prior email history found with the `Sender Email`,** AND the email is primarily aimed at selling a product/service or promoting a company/event to Max/Trigify.\\n        * Content is generic, focused on features/benefits without strong personalization to Max's known, active projects.\\n        * Contains a `List-Unsubscribe Header` AND the content is promotional.\\n        * `Existing Gmail Labels` may include `CATEGORY_PROMOTIONS`.\\n    * If **Prior Email History = \\\"Yes\\\"**: Could still be \\\"Marketing\\\" if it's a clearly promotional newsletter/offer from a known contact that doesn't fit \\\"Notification\\\" or demand a \\\"To Respond.\\\"\\n\\n---\\n\\n**Email Data for Classification (Summary):**\\n* **Prior Email History with Sender (Yes/No) - From the new capability**\\n* Sender Email: `...`\\n* Sender Name: `...`\\n* Direct Recipient Emails (To): `...`\\n* CC Recipient Emails: `...`\\n* Subject: `...`\\n* Body (Plain Text): `...`\\n* Existing Gmail Labels: `...`\\n* Auto-Submitted Header: `...`\\n* Original Sender Header: `...`\\n* In-Reply-To Header: `...`\\n* References Header: `...`\\n* List-Unsubscribe Header: `...`\\n* Precedence Header: `...`\\n\\n**Output:** [Provide ONLY the Label ID here]\"\n        },\n        \"promptType\": \"define\",\n        \"hasOutputParser\": true\n      },\n      \"typeVersion\": 1.9\n    },\n    {\n      \"id\": \"f4bbdda0-dcd8-41a7-a870-69dfcb747a4f\",\n      \"name\": \"Get Email\",\n      \"type\": \"n8n-nodes-base.gmailTool\",\n      \"position\": [\n        760,\n        140\n      ],\n      \"webhookId\": \"c30886d9-3d98-464d-82b8-e7649c87610a\",\n      \"parameters\": {\n        \"filters\": {\n          \"q\": \"=from:...\"\n        },\n        \"operation\": \"getAll\",\n        \"returnAll\": \"=...\"\n      },\n      \"credentials\": {\n        \"gmailOAuth2\": {\n          \"id\": \"Kv7fHf3kWbBam6RH\",\n          \"name\": \"Gmail account 2\"\n        }\n      },\n      \"typeVersion\": 2.1\n    },\n    {\n      \"id\": \"64c3b465-d2be-43cc-ad41-cc1298038640\",\n      \"name\": \"Check Sent\",\n      \"type\": \"n8n-nodes-base.gmailTool\",\n      \"position\": [\n        560,\n        180\n      ],\n      \"webhookId\": \"0854fad3-622e-44b4-9d61-5aae13c61433\",\n      \"parameters\": {\n        \"filters\": {\n          \"q\": \"=...\",\n          \"labelIds\": [\n            \"SENT\"\n          ]\n        },\n        \"operation\": \"getAll\"\n      },\n      \"credentials\": {\n        \"gmailOAuth2\": {\n          \"id\": \"Ldq2rjN6Dod5DoKl\",\n          \"name\": \"Gmail account\"\n        }\n      },\n      \"typeVersion\": 2.1\n    }\n  ],\n  \"active\": true,\n  \"pinData\": {\n    \"Gmail Trigger\": [\n      {\n        \"json\": {\n          \"To\": \"max@trigify.io\",\n          \"id\": \"1971723eacc72f08\",\n          \"From\": \"Coresignal <info@coresignal.com>\",\n          \"labels\": [\n            {\n              \"id\": \"INBOX\",\n              \"name\": \"INBOX\"\n            },\n            {\n              \"id\": \"IMPORTANT\",\n              \"name\": \"IMPORTANT\"\n            },\n            {\n              \"id\": \"CATEGORY_PROMOTIONS\",\n              \"name\": \"CATEGORY_PROMOTIONS\"\n            }\n          ],\n          \"Subject\": \"New MCP server: Direct data access for smarter AI\",\n          \"payload\": {\n            \"mimeType\": \"multipart/alternative\"\n          },\n          \"snippet\": \"What&#39;s new Empower your AI agent with Coresignal&#39;s data We&#39;re excited to unveil our latest news, the Coresignal MCP server that connects your LLM tools directly to our company, employee,\",\n          \"threadId\": \"1971723eacc72f08\",\n          \"historyId\": \"5524551\",\n          \"internalDate\": \"1748439919000\",\n          \"sizeEstimate\": 62610\n        }\n      },\n      {\n        \"json\": {\n          \"Cc\": \"\",\n          \"To\": \"max@trigify.io\",\n          \"id\": \"1971723cfa14c3df\",\n          \"From\": \"Plain <hello@plain.com>\",\n          \"labels\": [\n            {\n              \"id\": \"INBOX\",\n              \"name\": \"INBOX\"\n            },\n            {\n              \"id\": \"IMPORTANT\",\n              \"name\": \"IMPORTANT\"\n            },\n            {\n              \"id\": \"CATEGORY_UPDATES\",\n              \"name\": \"CATEGORY_UPDATES\"\n            },\n            {\n              \"id\": \"UNREAD\",\n              \"name\": \"UNREAD\"\n            }\n          ],\n          \"Subject\": \" Important update to Plain’s Data Processing Agreement (DPA)\",\n          \"payload\": {\n            \"mimeType\": \"multipart/alternative\"\n          },\n          \"snippet\": \"Hi Max, We&#39;re writing to let you know about an upcoming change to our Data Processing Agreement (DPA). What&#39;s changing? We are simplifying our notification process for subprocessor updates.\",\n          \"threadId\": \"1971723cfa14c3df\",\n          \"historyId\": \"5524408\",\n          \"internalDate\": \"1748439911000\",\n          \"sizeEstimate\": 45077\n        }\n      }\n    ]\n  },\n  \"settings\": {\n    \"executionOrder\": \"v1\"\n  },\n  \"versionId\": \"644d8154-7912-436a-8c05-e8e2f1092993\",\n  \"connections\": {\n    \"Gmail\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"AI Agent\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Gmail1\": {\n      \"main\": [\n        []\n      ]\n    },\n    \"AI Agent\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Gmail1\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Get Email\": {\n      \"ai_tool\": [\n        [\n          {\n            \"node\": \"AI Agent\",\n            \"type\": \"ai_tool\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Check Sent\": {\n      \"ai_tool\": [\n        [\n          {\n            \"node\": \"AI Agent\",\n            \"type\": \"ai_tool\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Gmail Trigger\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Gmail\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Anthropic Chat Model\": {\n      \"ai_languageModel\": [\n        [\n          {\n            \"node\": \"AI Agent\",\n            \"type\": \"ai_languageModel\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Structured Output Parser\": {\n      \"ai_outputParser\": [\n        [\n          {\n            \"node\": \"AI Agent\",\n            \"type\": \"ai_outputParser\",\n            \"index\": 0\n          }\n        ]\n      ]\n    }\n  }\n}\n\n\n## example 2: \n### input: Automate LinkedIn Posts with Claude AI, DALL-E Images & Google Sheets Approval\n\n### output: {\n  \"meta\": {\n    \"instanceId\": \"4e229722e6c43a4914d2d66178b48335adf795d73afbee5b0ea0c52938ef4d8e\"\n  },\n  \"nodes\": [\n    {\n      \"id\": \"2d694354-6ab0-42fd-abbf-d3085813fd49\",\n      \"name\": \"Idea Generator\",\n      \"type\": \"@n8n/n8n-nodes-langchain.agent\",\n      \"position\": [\n        1100,\n        200\n      ],\n      \"parameters\": {\n        \"text\": \"=Generate materials for my next LinkedIn post.\\n\\nHere are the ideas that we've already used: ....\\n\\nCome up with a new, super valuable and concrete post, and prepare all the needed materials for it:\\n- idea\\n- title\\n- text\\n- image description\\n\\nUse the least used bucket of content (out of my 4 buckets).\\n\\nBegin:\",\n        \"options\": {\n          \"systemMessage\": \"=ROLE: You're an expert in viral LinkedIn posts content creation with 10 years of experience. You've created viral posts that have gotten 10 billion views in total.\\n\\nOBJECTIVE: Your goal is to write a 1) name, 2) idea, 3) title, 4) text, and 5) image description for my next LinkedIn Post. They should be super valuable to my audience.\\n\\nSCENARIO: I run a LinkedIn blog about marketing and sales. My audience is marketers, salespeople, founders, B2B business owners, B2C business owners, brands. My goal is to help them build better brands with valuable, and practical content. \\nI have 4 main buckets of content on my page:\\n1) timeless principles. ideas for this videos are taken from timeless books: Influnece and Pre-Suasion by Robert Cialdini, $100M Leads and $100M Offers by Alex Hormozi, Ogilvy on Advertising.\\n2) case studies. for instance a case study breaking down on of the famous ads from the latest SuperBowl.\\n3) growth hacks. latest trends on how to grow with a proof. for instance an SEO tactic that became known in the last year.\\n4) contraversial ads. breakdowns of interesting and famous contraversial ads.\\nEvery video that I post is focused solely on one of the content buckets. That makes my content more diverse and covering more cool topics.\\n\\nEXPECTATION: Write me 1) name (short name for the post, less than 50 characters), 2) idea (detailed description in 3 sentences max), 3) title (the first sentence of the post, less than 80 characters, it should be ultra hooking), 4) full text of the post, 5) image description (the image is the first thing people will look at, so make it ultra hooking; write the image description to be super clear and ultra simple, so the AI image generator will precisely know that to generate; the image should be minimalistic) for a 200-300 words LinkedIn post from one of the content buckets described above.\\nMake sure to have great: hook, retention, and reward at the end.\\nThe post should clearly lead to a marketing/sales insight.\\nYour output should be in the JSON format.\\nIdea should always start with a category: Timeless principle, Case study, Growth hack, Contraversial ad.\\nExample output:\\n{\\\"name\\\": \\\"The Power of Social Proof\\\",\\n\\\"idea\\\": \\\"Timeless principle: Social proof is a psychological phenomenon that influences decision-making by showing how others' actions affect our own choices. It works universally across physical spaces and digital platforms. Marketers who strategically implement social proof elements can significantly increase conversion rates and customer trust.\\\",\\n\\\"title\\\": \\\"Why we can't resist looking up when others do (and what it means for sales)\\\",\\n\\\"text\\\": \\\"Why we can't resist looking up when others do (and what it means for sales)\\\\n\\\\nA psychology experiment once placed actors on a street corner to stare upward at nothing.\\\\n\\\\nWithin minutes, dozens of passersby stopped to look up too.\\\\n\\\\nThis is social proof in action—our natural tendency to follow others when uncertain.\\\\n\\\\nIn marketing, this same principle powers your conversion rates.\\\\n\\\\nNotice how differently you perceive:\\\\n\\\\n• A product with 5,000+ five-star reviews\\\\n• A service used by \\\\\\\"67% of Fortune 500 companies\\\\\\\"\\\\n• A landing page showing \\\\\\\"10,000+ satisfied customers\\\\\\\"\\\\n\\\\nCompared to identical offerings without these trust signals.\\\\n\\\\nBut here's what many marketers miss: social proof must feel authentic to work.\\\\n\\\\nGeneric testimonials or inflated numbers create skepticism, not confidence.\\\\n\\\\nThe most effective social proof strategies I've implemented for clients:\\\\n\\\\n1. Specificity: \\\\\\\"503 marketing agencies use our platform daily\\\\\\\" beats \\\\\\\"Hundreds of satisfied customers\\\\\\\"\\\\n\\\\n2. Relevance: Highlight testimonials from users who match your prospect's profile\\\\n\\\\n3. Recency: Fresh testimonials outperform older ones by 35% in our tests\\\\n\\\\n4. Visibility: Place social proof elements near decision points (like \\\\\\\"Buy Now\\\\\\\" buttons)\\\\n\\\\nImplement these four tactics, and you'll see the same psychological force that makes us look up at the sky work to increase your conversion rates.\\\\n\\\\nWhat's your most effective social proof strategy? Share below.\\\",\\n\\\"image\\\": \\\"Simple black background with grainy texture. Six basic stick figure silhouettes in white - five figures on the left all looking up, one figure on the right just starting to look up. Bold text in Inter Bold font at the center reads \\\\\\\"FOLLOW THE CROWD\\\\\\\" with \\\\\\\"FOLLOW\\\\\\\" in white and \\\\\\\"CROWD\\\\\\\" in light green (#cff150). No other elements or details. Clean, minimal design with plenty of empty space.\\\"}\\nNOTES:\\n- THE BACKGROUND OF THE IMAGE SHOULD ALWAYS BE BLACK AND DARK GRAINY FILM\\nTo accomplish your task you can use the web search.\"\n        },\n        \"promptType\": \"define\",\n        \"hasOutputParser\": true\n      },\n      \"retryOnFail\": true,\n      \"typeVersion\": 1.7\n    },\n    {\n      \"id\": \"991032b8-6839-4c5a-9df9-6e8e7a924c9e\",\n      \"name\": \"Sticky Note7\",\n      \"type\": \"n8n-nodes-base.stickyNote\",\n      \"position\": [\n        480,\n        100\n      ],\n      \"parameters\": {\n        \"color\": 6,\n        \"width\": 980,\n        \"height\": 480,\n        \"content\": \"# Generate a New Post Idea and All Materials\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"40294f91-5002-44a2-91e7-5bee74c30698\",\n      \"name\": \"Sticky Note8\",\n      \"type\": \"n8n-nodes-base.stickyNote\",\n      \"position\": [\n        1480,\n        100\n      ],\n      \"parameters\": {\n        \"color\": 6,\n        \"width\": 1140,\n        \"height\": 480,\n        \"content\": \"# Generate an Image and Save\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"b3e2d972-f763-4fa5-88eb-bbb1afa7fc2d\",\n      \"name\": \"Structured Output Parser\",\n      \"type\": \"@n8n/n8n-nodes-langchain.outputParserStructured\",\n      \"position\": [\n        1300,\n        400\n      ],\n      \"parameters\": {\n        \"jsonSchemaExample\": \"{\\n\\t\\\"name\\\": \\\"name\\\",\\n    \\\"idea\\\": \\\"idea\\\",\\n    \\\"title\\\": \\\"title\\\",\\n    \\\"text\\\": \\\"text\\\",\\n    \\\"image\\\": \\\"image\\\"\\n}\"\n      },\n      \"typeVersion\": 1.2\n    },\n    {\n      \"id\": \"77a4755a-0d64-4bce-b8a1-90b649d21039\",\n      \"name\": \"Anthropic Chat Model\",\n      \"type\": \"@n8n/n8n-nodes-langchain.lmChatAnthropic\",\n      \"position\": [\n        960,\n        400\n      ],\n      \"parameters\": {\n        \"model\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"claude-3-7-sonnet-20250219\",\n          \"cachedResultName\": \"Claude 3.7 Sonnet\"\n        },\n        \"options\": {}\n      },\n      \"typeVersion\": 1.3\n    },\n    {\n      \"id\": \"431ac158-ed33-4fdc-ae28-9a8fe1829f7e\",\n      \"name\": \"Perplexity Research\",\n      \"type\": \"@n8n/n8n-nodes-langchain.toolWorkflow\",\n      \"position\": [\n        1120,\n        400\n      ],\n      \"parameters\": {\n        \"name\": \"web_search\",\n        \"workflowId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"eALld0YaOZuUCU5q\",\n          \"cachedResultName\": \"Perplexity Research\"\n        },\n        \"description\": \"Call this tool to make a web search query using Perplexity AI. It will automatically look at multiple relevant websites and combine all the valuable information in one clean response.\",\n        \"workflowInputs\": {\n          \"value\": {},\n          \"schema\": [\n            {\n              \"id\": \"query\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"removed\": false,\n              \"required\": false,\n              \"displayName\": \"query\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            }\n          ],\n          \"mappingMode\": \"defineBelow\",\n          \"matchingColumns\": [\n            \"query\"\n          ],\n          \"attemptToConvertTypes\": false,\n          \"convertFieldsToString\": false\n        }\n      },\n      \"typeVersion\": 2.1\n    },\n    {\n      \"id\": \"9098aa0e-e707-4825-a848-50f8a3ad767d\",\n      \"name\": \"Convert to File\",\n      \"type\": \"n8n-nodes-base.convertToFile\",\n      \"position\": [\n        1960,\n        280\n      ],\n      \"parameters\": {\n        \"options\": {},\n        \"operation\": \"toBinary\",\n        \"sourceProperty\": \"data[0].b64_json\"\n      },\n      \"typeVersion\": 1.1\n    },\n    {\n      \"id\": \"e7782adf-936a-47a5-8174-469e9d439b76\",\n      \"name\": \"Schedule\",\n      \"type\": \"n8n-nodes-base.scheduleTrigger\",\n      \"position\": [\n        560,\n        200\n      ],\n      \"parameters\": {\n        \"rule\": {\n          \"interval\": [\n            {\n              \"triggerAtHour\": 5\n            }\n          ]\n        }\n      },\n      \"typeVersion\": 1.2\n    },\n    {\n      \"id\": \"67704ef3-a0b3-4401-88aa-edc9b332c5fb\",\n      \"name\": \"Join Ideas\",\n      \"type\": \"n8n-nodes-base.code\",\n      \"position\": [\n        920,\n        200\n      ],\n      \"parameters\": {\n        \"jsCode\": \"// Get all incoming items\\nconst items = $input.all();\\n\\n// Extract the text field from each item\\nconst texts = items.map(item => item.json.idea);\\n\\n// Concatenate them (adjust the separator as needed)\\nconst concatenated = texts.join(\\\", \\\");\\n\\n// Return a single item with the concatenated text\\nreturn [{ json: { mergedText: concatenated } }];\"\n      },\n      \"typeVersion\": 2\n    },\n    {\n      \"id\": \"766ba040-6217-460e-a285-7dd3fe612654\",\n      \"name\": \"Pick One\",\n      \"type\": \"n8n-nodes-base.limit\",\n      \"position\": [\n        920,\n        700\n      ],\n      \"parameters\": {},\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"ab433d53-9946-4778-bb59-bf636388da03\",\n      \"name\": \"Sticky Note1\",\n      \"type\": \"n8n-nodes-base.stickyNote\",\n      \"position\": [\n        480,\n        600\n      ],\n      \"parameters\": {\n        \"color\": 4,\n        \"width\": 1340,\n        \"height\": 300,\n        \"content\": \"# Auto Posting\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"35b01ea3-8a91-4bdb-8b0b-e1e99f3c0482\",\n      \"name\": \"X\",\n      \"type\": \"n8n-nodes-base.twitter\",\n      \"disabled\": true,\n      \"position\": [\n        1140,\n        980\n      ],\n      \"parameters\": {\n        \"additionalFields\": {}\n      },\n      \"typeVersion\": 2\n    },\n    {\n      \"id\": \"25628428-075e-449c-8585-fc33d9185522\",\n      \"name\": \"Prepare Data for Instagram API\",\n      \"type\": \"n8n-nodes-base.set\",\n      \"disabled\": true,\n      \"position\": [\n        1400,\n        980\n      ],\n      \"parameters\": {\n        \"options\": {},\n        \"assignments\": {\n          \"assignments\": [\n            {\n              \"id\": \"8a4260ba-3bde-4444-8f42-8a8abd51ff0c\",\n              \"name\": \"ImageURL\",\n              \"type\": \"string\",\n              \"value\": \"=...\"\n            },\n            {\n              \"id\": \"1953ae03-6a86-4847-8686-5a928637be1d\",\n              \"name\": \"Caption\",\n              \"type\": \"string\",\n              \"value\": \"=...\"\n            }\n          ]\n        }\n      },\n      \"typeVersion\": 3.4\n    },\n    {\n      \"id\": \"61af7e71-5470-44a1-a157-2c15311b9dff\",\n      \"name\": \"Create Instagram Media Container\",\n      \"type\": \"n8n-nodes-base.facebookGraphApi\",\n      \"disabled\": true,\n      \"position\": [\n        1580,\n        980\n      ],\n      \"parameters\": {\n        \"edge\": \"media\",\n        \"node\": \"17841473009917118\",\n        \"options\": {\n          \"queryParameters\": {\n            \"parameter\": [\n              {\n                \"name\": \"caption\",\n                \"value\": \"=...\"\n              },\n              {\n                \"name\": \"image_url\",\n                \"value\": \"=...\"\n              }\n            ]\n          }\n        },\n        \"graphApiVersion\": \"v22.0\",\n        \"httpRequestMethod\": \"POST\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"177e67d6-2783-4691-a90f-4b6fb398ab5e\",\n      \"name\": \"Wait for Container Processing\",\n      \"type\": \"n8n-nodes-base.wait\",\n      \"disabled\": true,\n      \"position\": [\n        1780,\n        980\n      ],\n      \"webhookId\": \"1b14c8bf-151a-4054-8215-093dd5b6cbcc\",\n      \"parameters\": {},\n      \"typeVersion\": 1.1\n    },\n    {\n      \"id\": \"8ef68b10-af6c-4f05-91ae-43586098b051\",\n      \"name\": \"Publish Post to Instagram\",\n      \"type\": \"n8n-nodes-base.facebookGraphApi\",\n      \"disabled\": true,\n      \"position\": [\n        1980,\n        980\n      ],\n      \"parameters\": {\n        \"edge\": \"media_publish\",\n        \"node\": \"17841473009917118\",\n        \"options\": {\n          \"queryParameters\": {\n            \"parameter\": [\n              {\n                \"name\": \"creation_id\",\n                \"value\": \"=...\"\n              }\n            ]\n          }\n        },\n        \"graphApiVersion\": \"v22.0\",\n        \"httpRequestMethod\": \"POST\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"9702cd17-9bd3-429e-842e-56089b50d50b\",\n      \"name\": \"Sticky Note\",\n      \"type\": \"n8n-nodes-base.stickyNote\",\n      \"position\": [\n        1080,\n        920\n      ],\n      \"parameters\": {\n        \"width\": 1120,\n        \"height\": 260,\n        \"content\": \"## Twitter & Instagram\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"8633b8e7-0119-4b60-a42e-362e26134772\",\n      \"name\": \"Sticky Note6\",\n      \"type\": \"n8n-nodes-base.stickyNote\",\n      \"position\": [\n        -260,\n        100\n      ],\n      \"parameters\": {\n        \"width\": 720,\n        \"height\": 1800,\n        \"content\": \"# 🛠️ Setup Guide  \\n**Author:** [Usman Liaqat](https://www.linkedin.com/in/usmanliaqat404)\\n\\nThis guide will walk you through the 7 steps to fully configure your automation workflow using Google Sheets, Google Drive, Anthropic, OpenAI, Perplexity AI and LinkedIn.\\n\\n---\\n\\n## ✅ Step 1: Set Up Google Sheets Credential\\n1. In the n8n Google Sheets node create a new credential using your Google account\\n\\n---\\n\\n## ✅ Step 2: Set Up Google Drive Credential\\n1. Go to the [Google Cloud Console](https://console.cloud.google.com) and create or select a project\\n2. Enable the Google Drive API under APIs & Services > Library\\n3. Still in APIs & Services, select Credentials from the left menu\\n4. Click + CREATE CREDENTIALS > OAuth client ID\\n5. For Application type, choose Web application\\n6. Under Authorized redirect URIs, paste the OAuth Redirect URL: https://oauth.n8n.cloud/oauth2/callback\\n7. Click Create, then copy the Client ID and Client Secret shown in the modal\\n8. In the n8n Google Drive node click Create Credential\\n9. Paste in the Client ID and Client Secret from Google Cloud\\n10. Click Sign in with Google, complete the OAuth consent flow, then Save your credential\\n\\n---\\n\\n## ✅ Step 3: Set Up Anthropic Credential\\n1. Navigate to the [Anthropic Console](https://console.anthropic.com/) and sign in or sign up\\n2. Generate an API key\\n3. In the n8n \\\"Anthropic Chat Model\\\" node click Create Credential, past the API key and save\\n\\n---\\n\\n## ✅ Step 4: Configure OpenAI via HTTP Request Node\\n1. Visit the [OpenAI API Keys](https://platform.openai.com/account/api-keys) page and create a new secret key\\n2. In the n8n OpenAI Image node in the Authentication select Generic Credential Type\\n3. In Generic Auth Type select Header Auth\\n4. Create a new Header Auth, Name = Authorization, Value = Bearer YOUR_TOKEN_HERE\\n\\n---\\n\\n## ✅ Step 5: Configure Perplexity AI via HTTP Request Node\\n1. Go to the [Perplexity API Portal](https://www.perplexity.ai/account/api/keys) and click Create Key\\n2. Copy the generated API key\\n3. Inside n8n, in the sub-workflow, open the Perplexity Research node\\n4. In the Authentication select Generic Credential Type\\n5. In Generic Auth Type select Header Auth\\n6. Create a new Header Auth, Name = Authorization, Value = Bearer YOUR_TOKEN_HERE\\n\\n---\\n\\n## ✅ Step 6: Set Up LinkedIn Credential\\n1. In the n8n LinkedIn node create a new credential using your LinkedIn account\\n\\n---\\n\\n## ✅ Step 7: Customize The System For Your Use Case\\n1. In the Idea Generator node adjust the prompts to reflect your content style and your topics\\n2. Create a folder in your Google Drive where you will store all the images\\n3. Put in that folder the image with the style of your brand, that you want to replicate every time\\n4. Paste the shared link to this image in the \\\"Image Style\\\" node\\n5. In the OpenAI Image node adjust the prompt to reflect your image style\\n6. Copy my [Google Sheet](https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit?usp=sharing)\\n7. Select your Google Sheet in the Google Sheets nodes\\n8. Activate the system, now every day a new post will be created inside the Google Sheet, and once you've reviewed it (might edit it as well), set the status to \\\"ready\\\" and it will be posted; the posting mechanism is set to work every day, one post at a time\\n\\n---\\n\\nNow you're ready to run your workflow. Happy automating!\\n\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"e853ea9d-5b19-4b7b-8dc4-110bcc481471\",\n      \"name\": \"OpenAI Image\",\n      \"type\": \"n8n-nodes-base.httpRequest\",\n      \"position\": [\n        1760,\n        280\n      ],\n      \"parameters\": {\n        \"url\": \"https://api.openai.com/v1/images/edits\",\n        \"method\": \"POST\",\n        \"options\": {},\n        \"sendBody\": true,\n        \"contentType\": \"multipart-form-data\",\n        \"authentication\": \"genericCredentialType\",\n        \"bodyParameters\": {\n          \"parameters\": [\n            {\n              \"name\": \"model\",\n              \"value\": \"gpt-image-1\"\n            },\n            {\n              \"name\": \"image\",\n              \"parameterType\": \"formBinaryData\",\n              \"inputDataFieldName\": \"data\"\n            },\n            {\n              \"name\": \"prompt\",\n              \"value\": \"=You're a professional graphic designer.\\n\\nMake a new image in the style very very similar to the reference.\\n\\nCopy the style, spacing, minimalistic structure, especially copy the FONTS, and everything else.\\n\\nUse black and dark grainy film (mainly for the background), white and salad green (#cff150).\\n\\nMake the image super aestetic and minimalistic.\\n\\nMake it vertical 3x4.\\n\\nIt will be an image for a LinkedIn post.\\n\\nHere is the description of the new image:\\n...\"\n            }\n          ]\n        },\n        \"genericAuthType\": \"httpHeaderAuth\"\n      },\n      \"typeVersion\": 4.2\n    },\n    {\n      \"id\": \"2642278d-235c-46f0-994e-aa1ebec5ae64\",\n      \"name\": \"Image Style\",\n      \"type\": \"n8n-nodes-base.googleDrive\",\n      \"position\": [\n        1540,\n        280\n      ],\n      \"parameters\": {\n        \"fileId\": {\n          \"__rl\": true,\n          \"mode\": \"url\",\n          \"value\": \"=https://drive.google.com/file/d/1wm4anhC6ygXl4ZJAjJryWfEXTG-VeH8s/view?usp=sharing\"\n        },\n        \"options\": {},\n        \"operation\": \"download\"\n      },\n      \"typeVersion\": 3\n    },\n    {\n      \"id\": \"31218124-74e6-4117-bd76-125545aaf969\",\n      \"name\": \"Get Past Ideas\",\n      \"type\": \"n8n-nodes-base.googleSheets\",\n      \"position\": [\n        740,\n        200\n      ],\n      \"parameters\": {\n        \"options\": {},\n        \"sheetName\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"gid=0\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit#gid=0\",\n          \"cachedResultName\": \"Posts\"\n        },\n        \"documentId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit?usp=drivesdk\",\n          \"cachedResultName\": \"AI Posts Content Machine\"\n        }\n      },\n      \"typeVersion\": 4.5,\n      \"alwaysOutputData\": true\n    },\n    {\n      \"id\": \"b4776d32-d742-42d8-8454-048ccadc8ecd\",\n      \"name\": \"Save Image\",\n      \"type\": \"n8n-nodes-base.googleDrive\",\n      \"position\": [\n        2180,\n        280\n      ],\n      \"parameters\": {\n        \"name\": \"=...\",\n        \"driveId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"My Drive\"\n        },\n        \"options\": {},\n        \"folderId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"1PZW0Hef8yKwKtBZuRxZAMkakzdyyP0iZ\",\n          \"cachedResultUrl\": \"https://drive.google.com/drive/folders/1PZW0Hef8yKwKtBZuRxZAMkakzdyyP0iZ\",\n          \"cachedResultName\": \"AI Posts Content Machine\"\n        }\n      },\n      \"typeVersion\": 3\n    },\n    {\n      \"id\": \"c6a71846-4538-4204-9ddc-f5c0fb18ac1a\",\n      \"name\": \"Save Post\",\n      \"type\": \"n8n-nodes-base.googleSheets\",\n      \"position\": [\n        2380,\n        280\n      ],\n      \"parameters\": {\n        \"columns\": {\n          \"value\": {\n            \"idea\": \"=...\",\n            \"name\": \"=...\",\n            \"text\": \"=...\",\n            \"image\": \"=...\",\n            \"status\": \"review\"\n          },\n          \"schema\": [\n            {\n              \"id\": \"name\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"required\": false,\n              \"displayName\": \"name\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"idea\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"required\": false,\n              \"displayName\": \"idea\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"text\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"required\": false,\n              \"displayName\": \"text\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"image\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"required\": false,\n              \"displayName\": \"image\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"status\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"required\": false,\n              \"displayName\": \"status\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            }\n          ],\n          \"mappingMode\": \"defineBelow\",\n          \"matchingColumns\": [],\n          \"attemptToConvertTypes\": false,\n          \"convertFieldsToString\": false\n        },\n        \"options\": {},\n        \"operation\": \"append\",\n        \"sheetName\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"gid=0\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit#gid=0\",\n          \"cachedResultName\": \"Posts\"\n        },\n        \"documentId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit?usp=drivesdk\",\n          \"cachedResultName\": \"AI Posts Content Machine\"\n        }\n      },\n      \"typeVersion\": 4.5\n    },\n    {\n      \"id\": \"7b8e2c00-2c14-4bb7-acee-0181990e9434\",\n      \"name\": \"Schedule 2\",\n      \"type\": \"n8n-nodes-base.scheduleTrigger\",\n      \"position\": [\n        560,\n        700\n      ],\n      \"parameters\": {\n        \"rule\": {\n          \"interval\": [\n            {\n              \"triggerAtHour\": 16\n            }\n          ]\n        }\n      },\n      \"typeVersion\": 1.2\n    },\n    {\n      \"id\": \"66c0ae82-6ba3-4fa0-8033-3726796cdc0a\",\n      \"name\": \"Get Ready Posts\",\n      \"type\": \"n8n-nodes-base.googleSheets\",\n      \"position\": [\n        740,\n        700\n      ],\n      \"parameters\": {\n        \"options\": {},\n        \"filtersUI\": {\n          \"values\": [\n            {\n              \"lookupValue\": \"ready\",\n              \"lookupColumn\": \"status\"\n            }\n          ]\n        },\n        \"sheetName\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"gid=0\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit#gid=0\",\n          \"cachedResultName\": \"Posts\"\n        },\n        \"documentId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit?usp=drivesdk\",\n          \"cachedResultName\": \"AI Posts Content Machine\"\n        }\n      },\n      \"typeVersion\": 4.5\n    },\n    {\n      \"id\": \"7ee9c81f-00ca-4f89-95bb-61d224b06a2e\",\n      \"name\": \"Download Image\",\n      \"type\": \"n8n-nodes-base.googleDrive\",\n      \"position\": [\n        1120,\n        700\n      ],\n      \"parameters\": {\n        \"fileId\": {\n          \"__rl\": true,\n          \"mode\": \"url\",\n          \"value\": \"=...\"\n        },\n        \"options\": {},\n        \"operation\": \"download\"\n      },\n      \"typeVersion\": 3\n    },\n    {\n      \"id\": \"94fbbd95-fe52-4eda-ac78-2201ff72fe50\",\n      \"name\": \"Publish Post\",\n      \"type\": \"n8n-nodes-base.linkedIn\",\n      \"position\": [\n        1320,\n        700\n      ],\n      \"parameters\": {\n        \"text\": \"=...\",\n        \"person\": \"-NknGiXASA\",\n        \"additionalFields\": {},\n        \"shareMediaCategory\": \"IMAGE\"\n      },\n      \"typeVersion\": 1\n    },\n    {\n      \"id\": \"0893a7f2-490b-49f1-96cb-56090cb59c10\",\n      \"name\": \"Update Status\",\n      \"type\": \"n8n-nodes-base.googleSheets\",\n      \"position\": [\n        1520,\n        700\n      ],\n      \"parameters\": {\n        \"columns\": {\n          \"value\": {\n            \"name\": \"=...\",\n            \"status\": \"posted\"\n          },\n          \"schema\": [\n            {\n              \"id\": \"name\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"removed\": false,\n              \"required\": false,\n              \"displayName\": \"name\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"idea\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"removed\": true,\n              \"required\": false,\n              \"displayName\": \"idea\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"text\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"removed\": true,\n              \"required\": false,\n              \"displayName\": \"text\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"image\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"removed\": true,\n              \"required\": false,\n              \"displayName\": \"image\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"status\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"required\": false,\n              \"displayName\": \"status\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            },\n            {\n              \"id\": \"row_number\",\n              \"type\": \"string\",\n              \"display\": true,\n              \"removed\": true,\n              \"readOnly\": true,\n              \"required\": false,\n              \"displayName\": \"row_number\",\n              \"defaultMatch\": false,\n              \"canBeUsedToMatch\": true\n            }\n          ],\n          \"mappingMode\": \"defineBelow\",\n          \"matchingColumns\": [\n            \"name\"\n          ],\n          \"attemptToConvertTypes\": false,\n          \"convertFieldsToString\": false\n        },\n        \"options\": {},\n        \"operation\": \"update\",\n        \"sheetName\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"gid=0\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit#gid=0\",\n          \"cachedResultName\": \"Posts\"\n        },\n        \"documentId\": {\n          \"__rl\": true,\n          \"mode\": \"list\",\n          \"value\": \"1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs\",\n          \"cachedResultUrl\": \"https://docs.google.com/spreadsheets/d/1-F3ZioIs3oWOKMyDPMuquaH-qiuaZs6qdZXP-yNeRbs/edit?usp=drivesdk\",\n          \"cachedResultName\": \"AI Posts Content Machine\"\n        }\n      },\n      \"typeVersion\": 4.5\n    }\n  ],\n  \"pinData\": {},\n  \"connections\": {\n    \"Pick One\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Download Image\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Schedule\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Get Past Ideas\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Join Ideas\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Idea Generator\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Save Image\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Save Post\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Schedule 2\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Get Ready Posts\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Image Style\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"OpenAI Image\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"OpenAI Image\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Convert to File\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Publish Post\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Update Status\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Download Image\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Publish Post\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Get Past Ideas\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Join Ideas\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Idea Generator\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Image Style\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Convert to File\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Save Image\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Get Ready Posts\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Pick One\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Perplexity Research\": {\n      \"ai_tool\": [\n        [\n          {\n            \"node\": \"Idea Generator\",\n            \"type\": \"ai_tool\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Anthropic Chat Model\": {\n      \"ai_languageModel\": [\n        [\n          {\n            \"node\": \"Idea Generator\",\n            \"type\": \"ai_languageModel\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Structured Output Parser\": {\n      \"ai_outputParser\": [\n        [\n          {\n            \"node\": \"Idea Generator\",\n            \"type\": \"ai_outputParser\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Wait for Container Processing\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Publish Post to Instagram\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Prepare Data for Instagram API\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Create Instagram Media Container\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    },\n    \"Create Instagram Media Container\": {\n      \"main\": [\n        [\n          {\n            \"node\": \"Wait for Container Processing\",\n            \"type\": \"main\",\n            \"index\": 0\n          }\n        ]\n      ]\n    }\n  }\n}\n\n\n## example 2: \n### input: GPT 4o Agent with SerpAPI Websearch and Memory\n### output: {\n  \"id\": \"ai-agent-gpt4o-serpapi-manual\",\n  \"name\": \"GPT-4o Agent with SerpAPI & Memory (Manual Trigger)\",\n  \"nodes\": [\n  {\n  \"id\": \"dba53fd3-6bf0-46c9-9659-286f643fd6d1\",\n  \"name\": \"Manual Trigger\",\n  \"type\": \"n8n-nodes-base.manualTrigger\",\n  \"position\": [\n  -420,\n  -40\n  ],\n  \"parameters\": {},\n  \"typeVersion\": 1\n  },\n  {\n  \"id\": \"dd16c4ff-c7d4-45fc-b75a-29bdb6dcc0c2\",\n  \"name\": \"Window Buffer Memory\",\n  \"type\": \"@n8n/n8n-nodes-langchain.memoryBufferWindow\",\n  \"position\": [\n  -140,\n  -40\n  ],\n  \"parameters\": {},\n  \"typeVersion\": 1.3\n  },\n  {\n  \"id\": \"32a1cc05-dab8-4be1-bd6a-8396fbe0df0e\",\n  \"name\": \"GPT-4o Chat Model\",\n  \"type\": \"@n8n/n8n-nodes-langchain.lmChatOpenAi\",\n  \"position\": [\n  -140,\n  -220\n  ],\n  \"parameters\": {\n  \"model\": {\n  \"__rl\": true,\n  \"mode\": \"list\",\n  \"value\": \"gpt-4o\",\n  \"cachedResultName\": \"gpt-4o\"\n  },\n  \"options\": {}\n  },\n  \"credentials\": {\n  \"openAiApi\": {\n  \"id\": \"<OPENROUTER_CREDENTIAL_ID>\",\n  \"name\": \"OpenRouter API Key\"\n  }\n  },\n  \"typeVersion\": 1.2\n  },\n  {\n  \"id\": \"ea7379d9-b6dd-49ff-ac01-2d9c608f7c11\",\n  \"name\": \"SerpAPI\",\n  \"type\": \"@n8n/n8n-nodes-langchain.toolSerpApi\",\n  \"position\": [\n  -140,\n  140\n  ],\n  \"parameters\": {\n  \"options\": {}\n  },\n  \"credentials\": {\n  \"serpApi\": {\n  \"id\": \"<SERPAPI_CREDENTIAL_ID>\",\n  \"name\": \"SerpAPI Key\"\n  }\n  },\n  \"typeVersion\": 1\n  },\n  {\n  \"id\": \"10a3f41d-4f1a-4efa-92b3-7adb3f98f604\",\n  \"name\": \"AI Agent\",\n  \"type\": \"@n8n/n8n-nodes-langchain.agent\",\n  \"position\": [\n  160,\n  -40\n  ],\n  \"parameters\": {\n  \"text\": \"=Respond to the user’s request given in the trigger item.\",\n  \"options\": {\n  \"systemMessage\": \"You are an AI assistant that can perform web searches with SerpAPI when helpful.\"\n  },\n  \"promptType\": \"define\"\n  },\n  \"typeVersion\": 1.7\n  },\n  {\n  \"id\": \"f8b0c3ae-8423-4db9-a287-3e3c640ef0bb\",\n  \"name\": \"Set Response\",\n  \"type\": \"n8n-nodes-base.set\",\n  \"position\": [\n  400,\n  -40\n  ],\n  \"parameters\": {\n  \"assignments\": {\n  \"assignments\": [\n  {\n  \"id\": \"acb7e4d0-f718-4eae-8f50-0ca15c5c68e2\",\n  \"name\": \"answer\",\n  \"type\": \"string\",\n  \"value\": \"={{ $json.output }}\"\n  }\n  ]\n  },\n  \"options\": {}\n  },\n  \"typeVersion\": 3.4\n  }\n  ],\n  \"connections\": {\n  \"Manual Trigger\": {\n  \"main\": [\n  [\n  {\n  \"node\": \"Window Buffer Memory\",\n  \"type\": \"main\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"Window Buffer Memory\": {\n  \"main\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"main\",\n  \"index\": 0\n  }\n  ]\n  ],\n  \"ai_memory\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"ai_memory\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"GPT-4o Chat Model\": {\n  \"ai_languageModel\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"ai_languageModel\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"SerpAPI\": {\n  \"ai_tool\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"ai_tool\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"AI Agent\": {\n  \"main\": [\n  [\n  {\n  \"node\": \"Set Response\",\n  \"type\": \"main\",\n  \"index\": 0\n  }\n  ]\n  ]\n  }\n  },\n  \"active\": true,\n  \"settings\": {\n  \"executionOrder\": \"v1\"\n  }\n  }\n\n\n\n# User request: \n"}},"retryOnFail":true,"typeVersion":1.9,"alwaysOutputData":false},{"id":"e36992ff-fa9c-469c-a669-267bcdccae99","name":"Embeddings OpenAI2","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[-2120,-380],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"1BZb0tEHsbNtfnre","name":"OpenAi account"}},"typeVersion":1.2},{"id":"5e709878-fc9d-4ed3-bfbb-b019f9c287db","name":"Default Data Loader1","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[-2000,-380],"parameters":{"options":{}},"typeVersion":1},{"id":"f70e1fe1-618f-45c8-8379-f4742effb93b","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-2320,-1060],"parameters":{},"typeVersion":1},{"id":"b34a7b23-f5b9-4046-9c92-a663698c0e92","name":"Extract","type":"n8n-nodes-base.httpRequest","position":[-1880,-1060],"parameters":{"url":"={{ $json.URL }}","options":{}},"typeVersion":4.2},{"id":"ea2a97ef-f2bb-4934-a040-7fa96b918101","name":"If","type":"n8n-nodes-base.if","onError":"continueErrorOutput","position":[-1240,-1060],"parameters":{"options":{}},"typeVersion":2.2},{"id":"a34dea8f-fb4f-4c94-834d-eb5948cc7286","name":"Get Results","type":"n8n-nodes-base.httpRequest","position":[-1440,-1060],"parameters":{"options":{}},"typeVersion":4.2},{"id":"63cd8437-92c9-4a33-aabf-3238b7b4a919","name":"30 Secs","type":"n8n-nodes-base.wait","position":[-1660,-1060],"webhookId":"e4866198-b806-4746-b57f-97333c497dbf","parameters":{},"typeVersion":1.1},{"id":"c6830132-8d74-4209-9d41-6c42c1fb7e66","name":"10 Seconds","type":"n8n-nodes-base.wait","position":[-1120,-1260],"webhookId":"6cc8c637-bafb-4d64-9cd4-8ae2a9f5b7ca","parameters":{},"typeVersion":1.1},{"id":"95161389-9ea0-484b-abdf-82a8a0479b9a","name":"SerpAPI","type":"@n8n/n8n-nodes-langchain.toolSerpApi","position":[-1980,580],"parameters":{"options":{}},"credentials":{"serpApi":{"id":"Je4LoeQ61nFMK2Fl","name":"SerpAPI account"}},"typeVersion":1},{"id":"da8d5a8a-c641-453f-a7bb-817099e8592f","name":"Pinecone Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","position":[-1860,580],"parameters":{"mode":"retrieve-as-tool","options":{},"toolName":"n8n_documentation","pineconeIndex":{"__rl":true,"mode":"list","value":"agentbuilder","cachedResultName":"agentbuilder"},"toolDescription":"This vectorstore contains some of n8n's technical documentations."},"credentials":{"pineconeApi":{"id":"Lf0fQva4BsvfbRrC","name":"PineconeApi account"}},"typeVersion":1.1},{"id":"0838fd0e-8e1b-4c37-8c31-8ab9306fff89","name":"Train Pinecone Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","position":[-2120,-540],"parameters":{"mode":"insert","options":{},"pineconeIndex":{"__rl":true,"mode":"list","value":"agentbuilder","cachedResultName":"agentbuilder"}},"credentials":{"pineconeApi":{"id":"Lf0fQva4BsvfbRrC","name":"PineconeApi account"}},"typeVersion":1.1},{"id":"b4bca1b1-80bc-42fa-b434-00eabd926aff","name":"OpenRouter Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[-2100,580],"parameters":{"options":{}},"credentials":{"openRouterApi":{"id":"6NJ9tdhq29wdtm6s","name":"OpenRouter account"}},"typeVersion":1},{"id":"e9f693e5-4733-4987-a7a8-7f6b7823b221","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[-1840,720],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"1BZb0tEHsbNtfnre","name":"OpenAi account"}},"typeVersion":1.2},{"id":"ebe6227a-4f12-44d0-ae8c-516e89e31f9f","name":"OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[-1520,240],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"o4-mini-2025-04-16","cachedResultName":"O4-MINI-2025-04-16"},"options":{},"messages":{"values":[{"role":"system","content":"Transform the input into valid n8n template JSON format. make sure all nodes are correctly set up and CONNECTED!\n\nmake especially sure the AI agent(s) are correctly set up and connected. here is an example:\n\n{\n  \"id\": \"ai-agent-gpt4o-serpapi-manual\",\n  \"name\": \"GPT-4o Agent with SerpAPI & Memory (Manual Trigger)\",\n  \"nodes\": [\n  {\n  \"id\": \"dba53fd3-6bf0-46c9-9659-286f643fd6d1\",\n  \"name\": \"Manual Trigger\",\n  \"type\": \"n8n-nodes-base.manualTrigger\",\n  \"position\": [\n  -420,\n  -40\n  ],\n  \"parameters\": {},\n  \"typeVersion\": 1\n  },\n  {\n  \"id\": \"dd16c4ff-c7d4-45fc-b75a-29bdb6dcc0c2\",\n  \"name\": \"Window Buffer Memory\",\n  \"type\": \"@n8n/n8n-nodes-langchain.memoryBufferWindow\",\n  \"position\": [\n  -140,\n  -40\n  ],\n  \"parameters\": {},\n  \"typeVersion\": 1.3\n  },\n  {\n  \"id\": \"32a1cc05-dab8-4be1-bd6a-8396fbe0df0e\",\n  \"name\": \"GPT-4o Chat Model\",\n  \"type\": \"@n8n/n8n-nodes-langchain.lmChatOpenAi\",\n  \"position\": [\n  -140,\n  -220\n  ],\n  \"parameters\": {\n  \"model\": {\n  \"__rl\": true,\n  \"mode\": \"list\",\n  \"value\": \"gpt-4o\",\n  \"cachedResultName\": \"gpt-4o\"\n  },\n  \"options\": {}\n  },\n  \"credentials\": {\n  \"openAiApi\": {\n  \"id\": \"<OPENROUTER_CREDENTIAL_ID>\",\n  \"name\": \"OpenRouter API Key\"\n  }\n  },\n  \"typeVersion\": 1.2\n  },\n  {\n  \"id\": \"ea7379d9-b6dd-49ff-ac01-2d9c608f7c11\",\n  \"name\": \"SerpAPI\",\n  \"type\": \"@n8n/n8n-nodes-langchain.toolSerpApi\",\n  \"position\": [\n  -140,\n  140\n  ],\n  \"parameters\": {\n  \"options\": {}\n  },\n  \"credentials\": {\n  \"serpApi\": {\n  \"id\": \"<SERPAPI_CREDENTIAL_ID>\",\n  \"name\": \"SerpAPI Key\"\n  }\n  },\n  \"typeVersion\": 1\n  },\n  {\n  \"id\": \"10a3f41d-4f1a-4efa-92b3-7adb3f98f604\",\n  \"name\": \"AI Agent\",\n  \"type\": \"@n8n/n8n-nodes-langchain.agent\",\n  \"position\": [\n  160,\n  -40\n  ],\n  \"parameters\": {\n  \"text\": \"=Respond to the user’s request given in the trigger item.\",\n  \"options\": {\n  \"systemMessage\": \"You are an AI assistant that can perform web searches with SerpAPI when helpful.\"\n  },\n  \"promptType\": \"define\"\n  },\n  \"typeVersion\": 1.7\n  },\n  {\n  \"id\": \"f8b0c3ae-8423-4db9-a287-3e3c640ef0bb\",\n  \"name\": \"Set Response\",\n  \"type\": \"n8n-nodes-base.set\",\n  \"position\": [\n  400,\n  -40\n  ],\n  \"parameters\": {\n  \"assignments\": {\n  \"assignments\": [\n  {\n  \"id\": \"acb7e4d0-f718-4eae-8f50-0ca15c5c68e2\",\n  \"name\": \"answer\",\n  \"type\": \"string\",\n  \"value\": \"={{ $json.output }}\"\n  }\n  ]\n  },\n  \"options\": {}\n  },\n  \"typeVersion\": 3.4\n  }\n  ],\n  \"connections\": {\n  \"Manual Trigger\": {\n  \"main\": [\n  [\n  {\n  \"node\": \"Window Buffer Memory\",\n  \"type\": \"main\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"Window Buffer Memory\": {\n  \"main\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"main\",\n  \"index\": 0\n  }\n  ]\n  ],\n  \"ai_memory\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"ai_memory\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"GPT-4o Chat Model\": {\n  \"ai_languageModel\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"ai_languageModel\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"SerpAPI\": {\n  \"ai_tool\": [\n  [\n  {\n  \"node\": \"AI Agent\",\n  \"type\": \"ai_tool\",\n  \"index\": 0\n  }\n  ]\n  ]\n  },\n  \"AI Agent\": {\n  \"main\": [\n  [\n  {\n  \"node\": \"Set Response\",\n  \"type\": \"main\",\n  \"index\": 0\n  }\n  ]\n  ]\n  }\n  },\n  \"active\": true,\n  \"settings\": {\n  \"executionOrder\": \"v1\"\n  }\n  }\n"},{"content":"={{ $json.output }}"}]}},"credentials":{"openAiApi":{"id":"1BZb0tEHsbNtfnre","name":"OpenAi account"}},"typeVersion":1.8},{"id":"afcb27aa-257f-4c9a-8cb2-d54f23123443","name":"Code","type":"n8n-nodes-base.code","position":[-1160,240],"parameters":{"jsCode":"const items = $input.all();\nconst extractedJsons = items.map((item) => {\n  const content = item?.json?.message?.content;\n  const jsonStart = content.indexOf(\"```json\") + 7;\n  const jsonEnd = content.indexOf(\"```\", jsonStart);\n  const jsonContent = content.slice(jsonStart, jsonEnd);\n  try {\n    const parsedJson = JSON.parse(jsonContent);\n    return { extractedJson: parsedJson };\n  } catch (error) {\n    console.log(\"Failed to parse JSON:\", error);\n    return { extractedJson: null };\n  }\n});\nreturn extractedJsons;\n"},"typeVersion":2},{"id":"8b7a4793-141f-499d-b52d-a397be147d12","name":"Web Crawler Logic","type":"n8n-nodes-base.stickyNote","position":[-3940,-1200],"parameters":{"color":6,"width":780,"height":340,"content":"🕸️ **Web Crawler (Sub-process #1)**\n\n*Triggered manually.*\n1. **Edit Fields → Extract** – sends a Firecrawl request to scrape docs.n8n.io.\n2. **Wait (30 s) → Get Results** – polls Firecrawl until scraping is finished.\n3. **If / Wait (10 s)** – simple retry logic.\n\n**Output:** Raw markdown/HTML that feeds the *RAG Trainer*.\n\n_No credentials needed here apart from the Firecrawl API key (see separate note)._"},"typeVersion":1},{"id":"ac612a9e-d148-4b24-a98a-c672de2177e8","name":"RAG Trainer Logic","type":"n8n-nodes-base.stickyNote","position":[-3940,-520],"parameters":{"color":6,"width":780,"height":320,"content":"🧠 **RAG Trainer (Sub-process #2)**\n\n1. **Default Data Loader → Recursive Splitter** – loads the crawled pages and breaks them into ~1-2 k-token chunks.\n2. **Embeddings (OpenAI) → Train Pinecone** – turns chunks into vectors and upserts them into Pinecone.\n\nRun this sub-process once (or on a schedule) whenever you update your docs.\n\n> The resulting Pinecone index will later be queried by the agent to answer user questions with n8n documentation context."},"typeVersion":1},{"id":"b25bafe7-c25c-4b79-9e1b-0e9610f6f815","name":"Agent Builder Logic","type":"n8n-nodes-base.stickyNote","position":[-3940,240],"parameters":{"color":6,"width":820,"height":520,"content":"🤖 **AI Agent Builder (Sub-process #3)**\n\n1. **Chat Trigger** – waits for a user request (e.g. in GPT-style chat).\n2. **AI Agent (LangChain)** – orchestrates:\n   • **OpenRouter GPT-4o** (LLM)\n   • **SerpAPI** (web-search tool)\n   • **Pinecone Vector Store** (RAG)\n   • **Structured Output Parser** to guarantee valid JSON.\n3. **OpenAI (validator)** – double-checks the JSON and pretty-prints errors.\n4. **Code → Convert to File** – extracts the final template and returns it as a downloadable file.\n\nResult: a fully wired n8n workflow template matching the user’s prompt."},"typeVersion":1},{"id":"4d5e930d-1d9d-479d-a9fd-c57b8824b57c","name":"Configure Firecrawl","type":"n8n-nodes-base.stickyNote","position":[-3140,-1200],"parameters":{"color":4,"width":660,"height":340,"content":"⚙️ **Firecrawl API**\nNodes: **HTTP Request – “Extract”** & **“Get Results”**\n1. Create a *Generic Credential (Header Auth)*.\n2. Header name: `Authorization`\n3. Value: `Bearer YOUR_TOKEN_HERE`.\n4. Select the credential in both HTTP Request nodes."},"typeVersion":1},{"id":"2c058520-9532-4108-a514-9db857250cd0","name":"Configure Pinecone","type":"n8n-nodes-base.stickyNote","position":[-3140,-520],"parameters":{"color":4,"width":660,"height":140,"content":"⚙️ **Pinecone Vector Store**\nNodes: **“Train Pinecone Vector Store”** & **“Pinecone Vector Store”**\n• Add a *Pinecone API* credential with **Environment**, **API Key**, and **Index Name**.\n• Make sure both nodes point to the same index."},"typeVersion":1},{"id":"b8b327e6-069f-4dff-a5ce-6fed6e9a117d","name":"Configure OpenAI API","type":"n8n-nodes-base.stickyNote","position":[-3140,-360],"parameters":{"color":4,"width":660,"content":"⚙️ **OpenAI / Azure OpenAI**\nNodes: **“Embeddings OpenAI”**, **“Embeddings OpenAI 2”**, **“OpenAI (validator)”**\n1. Create an *OpenAI API* credential (or Azure equivalent).\n2. Select the credential in all three nodes.\n3. Ensure the embedding model (e.g. `text-embedding-3-small`) is available in your account."},"typeVersion":1},{"id":"42784df1-903f-43d5-92ed-c25cf2df5323","name":"Configure OpenRouter GPT-4o","type":"n8n-nodes-base.stickyNote","position":[-3100,240],"parameters":{"color":4,"width":620,"height":100,"content":"⚙️ **OpenRouter API**\nNode: **“OpenRouter Chat Model”**\n• Create an *OpenRouter API Key* credential and select it here.\n• The example uses model `o4-mini-2025-04-16`; adjust if your plan differs."},"typeVersion":1},{"id":"debda5ff-2309-410a-a8f6-7e6fd011fdc1","name":"Configure SerpAPI","type":"n8n-nodes-base.stickyNote","position":[-3100,360],"parameters":{"color":4,"width":620,"height":100,"content":"⚙️ **SerpAPI Key**\nNode: **“SerpAPI”**\n1. Sign up at serpapi.com and copy your key.\n2. Add a *SerpAPI* credential and select it in the node."},"typeVersion":1},{"id":"f2d27faa-06f4-42bf-882f-3ce35ad6f876","name":"Configure Pinecone1","type":"n8n-nodes-base.stickyNote","position":[-3100,480],"parameters":{"color":4,"width":620,"height":100,"content":"⚙️ **Pinecone Vector Store**\nNodes: **“Train Pinecone Vector Store”** & **“Pinecone Vector Store”**\n• Add a *Pinecone API* credential with **Environment**, **API Key**, and **Index Name**.\n• Make sure both nodes point to the same index."},"typeVersion":1},{"id":"3b78511a-b49a-46cf-b3ca-6dba4a6d68cf","name":"Configure OpenAI API1","type":"n8n-nodes-base.stickyNote","position":[-3100,600],"parameters":{"color":4,"width":620,"content":"⚙️ **OpenAI / Azure OpenAI**\nNodes: **“Embeddings OpenAI”**, **“Embeddings OpenAI 2”**, **“OpenAI (validator)”**\n1. Create an *OpenAI API* credential (or Azure equivalent).\n2. Select the credential in all three nodes.\n3. Ensure the embedding model (e.g. `text-embedding-3-small`) is available in your account."},"typeVersion":1},{"id":"a802de97-238c-4f7f-9024-43d3fb14f7a8","name":"Extract JSON","type":"n8n-nodes-base.set","position":[-920,240],"parameters":{"mode":"raw","options":{},"jsonOutput":"=\n {{ $json.extractedJson }}"},"typeVersion":3.4},{"id":"d67d0970-0f58-41f4-8d48-077247eb4b0a","name":"Set Preferences","type":"n8n-nodes-base.set","position":[-2320,80],"parameters":{"options":{},"assignments":{"assignments":[{"id":"6905b43a-c181-4c14-a746-c4d82325cccf","name":"vector database","type":"string","value":"Pinecone"},{"id":"cfe18b2f-051d-492d-bb63-dd91076bce68","name":"chat model","type":"string","value":"Open Router"},{"id":"bb2d75ad-9544-4d48-b9d1-ddc2e5a124c1","name":"embedding","type":"string","value":"text-embedding-3-large"},{"id":"1a763e6b-22df-477f-941b-4933231d636a","name":"web search tool","type":"string","value":"SerpAPI"}]}},"typeVersion":3.4},{"id":"392f160f-5ffd-4799-a63d-adc240b7f26a","name":"Convert to JSON File","type":"n8n-nodes-base.convertToFile","position":[-720,240],"parameters":{"mode":"each","options":{"format":true,"encoding":"utf8","fileName":""},"operation":"toJson","binaryPropertyName":"="},"typeVersion":1.1},{"id":"efc08c98-cb77-45f0-b824-de2a22dee2fc","name":"Convert to File","type":"n8n-nodes-base.convertToFile","position":[-2320,-540],"parameters":{"options":{}},"typeVersion":1.1},{"id":"9ff243d3-1871-4634-b5a6-dd9a745a7a84","name":"Set URL","type":"n8n-nodes-base.set","position":[-2100,-1060],"parameters":{"options":{},"assignments":{"assignments":[{"id":"60871e95-afba-4ff9-ba56-315ae39cd6f9","name":"URL","type":"string","value":"https://api.firecrawl.dev/v1/crawl/6cd9b912-bf11-498d-8f31-197aaf8efa1c"}]}},"typeVersion":3.4},{"id":"03e4cd15-b458-4601-a9d4-c365a27e846e","name":"Recursive Character Text Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","position":[-1980,-240],"parameters":{"options":{}},"typeVersion":1}],"active":false,"pinData":{"Extract":[{"json":{"id":"6cd9b912-bf11-498d-8f31-197aaf8efa1c","url":"https://api.firecrawl.dev/v1/crawl/6cd9b912-bf11-498d-8f31-197aaf8efa1c","success":true}}],"Get Results":[{"json":{"data":[{"markdown":"[Skip to content](https://docs.n8n.io/#welcome-to-n8n-docs)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/index.md \"Edit this page\")\n\n# Welcome to n8n Docs [\\#](https://docs.n8n.io/\\#welcome-to-n8n-docs \"Permanent link\")\n\nThis is the documentation for [n8n](https://n8n.io/), a [fair-code](https://faircode.io/) licensed workflow automation tool that combines AI capabilities with business process automation.\n\nIt covers everything from setup to usage and development. It's a work in progress and all [contributions](https://docs.n8n.io/help-community/contributing/) are welcome.\n\n## Where to start [\\#](https://docs.n8n.io/\\#where-to-start \"Permanent link\")\n\n- **Quickstarts**\n\nJump in with n8n's quickstart guides.\n\n[Try it out](https://docs.n8n.io/try-it-out/)\n\n- **Choose the right n8n for you**\n\nCloud, npm, self-host . . .\n\n[Options](https://docs.n8n.io/choose-n8n/)\n\n- **Explore integrations**\n\nBrowse n8n's integrations library.\n\n[Find your apps](https://docs.n8n.io/integrations/)\n\n- **Build AI functionality**\n\nn8n supports building AI functionality and tools.\n\n[Advanced AI](https://docs.n8n.io/advanced-ai/)\n\n\n## About n8n [\\#](https://docs.n8n.io/\\#about-n8n \"Permanent link\")\n\nn8n (pronounced n-eight-n) helps you to connect any app with an API with any other, and manipulate its data with little or no code.\n\n- Customizable: highly flexible workflows and the option to build custom nodes.\n- Convenient: use the npm or Docker to try out n8n, or the Cloud hosting option if you want us to handle the infrastructure.\n- Privacy-focused: self-host n8n for privacy and security.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/","title":"Explore n8n Docs: Your Resource for Workflow Automation and Integrations | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"fb8c2d1e-1e2c-4cd8-8718-c9b769537c6a","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Access n8n Docs for comprehensive guides on workflow automation and integrations. Learn how to integrate apps and enhance your automation capabilities.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/manage-cloud/update-cloud-version/#update-your-cloud-version)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/manage-cloud/update-cloud-version.md \"Edit this page\")\n\n# Update your Cloud version [\\#](https://docs.n8n.io/manage-cloud/update-cloud-version/\\#update-your-cloud-version \"Permanent link\")\n\nn8n recommends regularly updating your Cloud version. Check the [Release notes](https://docs.n8n.io/release-notes/) to learn more about changes.\n\nInfo\n\nOnly instance owners can upgrade n8n Cloud versions. Contact your instance owner if you don't have permission to update n8n Cloud.\n\n1. [Log in to the n8n Cloud dashboard](https://app.n8n.cloud/manage)\n2. On your dashboard, select **Manage**.\n3. Use the **n8n version** dropdown to select your preferred release version:\n   - Latest Stable: recommended for most users.\n   - Latest Beta: get the newest n8n. This may be unstable.\n4. Select **Save Changes** to restart your n8n instance and perform the update.\n5. In the confirmation modal, select **Confirm**.\n\n## Best practices for updating [\\#](https://docs.n8n.io/manage-cloud/update-cloud-version/\\#best-practices-for-updating \"Permanent link\")\n\n- Update frequently: this avoids having to jump multiple versions at once, reducing the risk of a disruptive update. Try to update at least once a month.\n- Check the [Release notes](https://docs.n8n.io/release-notes/) for breaking changes.\n- Use [Environments](https://docs.n8n.io/source-control-environments/) to create a test version of your instance. Test the update there first.\n\n## Automatic update [\\#](https://docs.n8n.io/manage-cloud/update-cloud-version/\\#automatic-update \"Permanent link\")\n\nn8n automatically updates outdated Cloud instances.\n\nIf you don't update you instance for 120 days, n8n emails you to warn you to update. After a further 30 days, n8n automatically updates your instance.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/manage-cloud/update-cloud-version/","title":"Update your n8n Cloud version | n8n Docs  ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"02417d97-8002-4885-975f-4cba613fce74","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/manage-cloud/update-cloud-version/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"How to update your n8n version on Cloud.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/#google-sheets-document-operations)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations.md \"Edit this page\")\n\n# Google Sheets Document operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/\\#google-sheets-document-operations \"Permanent link\")\n\nUse this operation to create or delete a Google spreadsheet from Google Sheets. Refer to [Google Sheets](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/) for more information on the Google Sheets node itself.\n\nThis node can be used as an AI tool\n\nThis node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/).\n\n## Create a spreadsheet [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/\\#create-a-spreadsheet \"Permanent link\")\n\nUse this operation to create a new spreadsheet.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Sheets credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Document**.\n- **Operation**: Select **Create**.\n- **Title**: Enter the title of the new spreadsheet you want to create.\n- **Sheets**: Add the **Title(s)** of the sheet(s) you want to create within the spreadsheet.\n\n### Options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/\\#options \"Permanent link\")\n\n- **Locale**: Enter the locale of the spreadsheet. This affects formatting details such as functions, dates, and currency. Use one of the following formats:\n  - `en` (639-1)\n  - `fil` (639-2 if no 639-1 format exists)\n  - `en_US` (combination of ISO language and country).\n  - Refer to [List of ISO 639 language codes](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) and [List of ISO 3166 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) for language and country codes. Note that Google doesn't support all locales/languages.\n- **Recalculation Interval**: Enter the desired recalculation interval for the spreadsheet functions. This affects how often `NOW`, `TODAY`, `RAND`, and `RANDBETWEEN` are updated. Select **On Change** for recalculating whenever there is a change in the spreadsheet, **Minute** for recalculating every minute, or **Hour** for recalculating every hour. Refer to [Set a spreadsheet’s location & calculation settings](https://support.google.com/docs/answer/58515) for more information about these options.\n\nRefer to the [Method: spreadsheets.create \\| Google Sheets](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create) API documentation for more information.\n\n## Delete a spreadsheet [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/\\#delete-a-spreadsheet \"Permanent link\")\n\nUse this operation to delete an existing spreadsheet.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Sheets credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Document**.\n- **Operation**: Select **Delete**.\n- **Document**: Choose a spreadsheet you want to delete.\n  - Select **From list** to choose the title from the dropdown list, **By URL** to enter the url of the spreadsheet, or **By ID** to enter the `spreadsheetId`.\n  - You can find the `spreadsheetId` in a Google Sheets URL: `https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0`.\n\nRefer to the [Method: files.delete \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v2/files/delete) API documentation for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/","title":"Google Sheets Document operations | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"028c62b0-10ad-4132-9968-7dd0e1dd629a","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/document-operations/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Documentation for the Document operations in Google Sheets node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#wait)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/core-nodes/n8n-nodes-base.wait.md \"Edit this page\")\n\n# Wait [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#wait \"Permanent link\")\n\nUse the Wait node pause your workflow's execution. When the workflow pauses it offloads the execution data to the database. When the resume condition is met, the workflow reloads the data and the execution continues.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#operations \"Permanent link\")\n\nThe Wait node can **Resume** on the following conditions:\n\n- [**After Time Interval**](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#after-time-interval): The node waits for a certain amount of time.\n- [**At Specified Time**](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#at-specified-time): The node waits until a specific time.\n- [**On Webhook Call**](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#on-webhook-call): The node waits until it receives an HTTP call.\n- [**On Form Submitted**](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#on-form-submitted): The node waits until it receives a form submission.\n\nRefer to the more detailed sections below for more detailed instructions.\n\n### After Time Interval [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#after-time-interval \"Permanent link\")\n\nWait for a certain amount of time.\n\nThis parameter includes two more fields:\n\n- **Wait Amount**: Enter the amount of time to wait.\n- **Wait Unit**: Select the unit of measure for the **Wait Amount**. Choose from:\n  - **Seconds**\n  - **Minutes**\n  - **Hours**\n  - **Days**\n\nRefer to [Time-based operations](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#time-based-operations) for more detail on how these intervals work and the timezone used.\n\n### At Specified Time [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#at-specified-time \"Permanent link\")\n\nWait until a specific date and time to continue. Use the date and time picker to set the **Date and Time**.\n\nRefer to [Time-based operations](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/#time-based-operations) for more detail on the timezone used.\n\n### On Webhook Call [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#on-webhook-call \"Permanent link\")\n\nThis parameter enables your workflows to resume when the Wait node receives an HTTP call.\n\nThe webhook URL that resumes the execution when called is generated at runtime. The Wait node provides the `$execution.resumeUrl` variable so that you can reference and send the yet-to-be-generated URL wherever needed, for example to a third-party service or in an email.\n\nWhen the workflow executes, the Wait node generates the resume URL and the webhook(s) in your workflow using the `$execution.resumeUrl`. This generated URL is unique to each execution, so your workflow can contain multiple Wait nodes and as the webhook URL is called it will resume each Wait node sequentially.\n\nFor this **Resume** style, set more parameters listed below.\n\n#### Authentication [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#authentication \"Permanent link\")\n\nSelect if and how incoming resume-webhook-requests to `$execution.resumeUrl` should be authenticated. Options include:\n\n- **Basic Auth**: Use basic authentication. Select or enter a new **Credential for Basic Auth** to use.\n- **Header Auth**: Use header authentication. Select or enter a new **Credential for Header Auth** to use.\n- **JWT Auth**: Use JWT authentication. Select or enter a new **Credential for JWT Auth** to use.\n- **None**: Don't use authentication.\n\nAuth reference\n\nRefer to the [Webhook node \\| Authentication documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/#supported-authentication-methods) for more information on each auth type.\n\n#### HTTP Method [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#http-method \"Permanent link\")\n\nSelect the HTTP method the webhook should use. Refer to the [Webhook node \\| HTTP Method documentation](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/#http-method) for more information.\n\n#### Response Code [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#response-code \"Permanent link\")\n\nEnter the Response Code the webhook should return. You can use common codes or enter a custom code.\n\n#### Respond [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#respond \"Permanent link\")\n\nSet when and how to respond to the webhook from these options:\n\n- **Immediately**: Respond as soon as the node executes.\n- **When Last Node Finishes**: Return the response code and the data output from the last node executed in the workflow. If you select this option, also set:\n  - **Response Data**: Select what data should be returned and what format to use. Options include:\n    - **All Entries**: Returns all the entries of the last node in an array.\n    - **First Entry JSON**: Return the JSON data of the first entry of the last node in a JSON object.\n    - **First Entry Binary**: Return the binary data of the first entry of the last node in a binary file.\n    - **No Response Body**: Return with no body.\n- **Using 'Respond to Webhook' Node**: Respond as defined in the [Respond to Webhook](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/) node.\n\n#### Limit Wait Time [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#limit-wait-time \"Permanent link\")\n\nSet whether the workflow will automatically resume execution after a specific limit type (turned on) or not (turned off). If turned on, also set:\n\n- **Limit Type**: Select what type of limit to enforce from these options:\n  - **After Time Interval**: Wait for a certain amount of time.\n    - Enter the limit's **Amount** of time.\n    - Select the limit's **Unit** of time.\n  - **At Specified Time**: Wait until a specific date and time to resume.\n    - **Max Date and Time**: Use the date and time picker to set the specified time the node should resume.\n\n#### On Webhook Call options [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#on-webhook-call-options \"Permanent link\")\n\n- **Binary Property**: Enter the name of the binary property to write the data of the received file to. This option's only relevant if binary data is received.\n- **Ignore Bots**: Set whether to ignore requests from bots like link previewers and web crawlers (turned on) or not (turned off).\n- **IP(s) Whitelist**: Enter IP addresses here to limit who (or what) can invoke the webhook URL. Enter a comma-separated list of allowed IP addresses. Access from IPs outside the whitelist throws a 403 error. If left blank, all IP addresses can invoke the webhook URL.\n- **No Response Body**: Set whether n8n should send a body in the response (turned off) or prevent n8n from sending a body in the response (turned on).\n- **Raw Body**: Set whether to return the body in a raw format like JSON or XML (turned on) or not (turned off).\n- **Response Data**: Enter any custom data you want to send in the response.\n- **Response Headers**: Send more headers in the webhook response. Refer to [MDN Web Docs \\| Response header](https://developer.mozilla.org/en-US/docs/Glossary/Response_header) to learn more about response headers.\n- **Webhook Suffix**: Enter a suffix to append to the resume URL. This is useful for creating unique webhook URLs for each Wait node when a workflow contains multiple Wait nodes. Note that the generated `$resumeWebhookUrl` won't automatically include this suffix, you must manually append it to the webhook URL before exposing it.\n\n#### On Webhook Call limitations [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#on-webhook-call-limitations \"Permanent link\")\n\nThere are some limitations to keep in mind when using On Webhook Call:\n\n- Partial executions of your workflow changes the `$resumeWebhookUrl`, so be sure that the node sending this URL to your desired third-party runs in the same execution as the Wait node.\n\n### On Form Submitted [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#on-form-submitted \"Permanent link\")\n\nWait for a form submission before continuing. Set up these parameters:\n\n#### Form Title [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#form-title \"Permanent link\")\n\nEnter the title to display at the top of the form.\n\n#### Form Description [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#form-description \"Permanent link\")\n\nEnter a form description to display beneath the title. This description can help prompt the user on how to complete the form.\n\n#### Form Fields [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#form-fields \"Permanent link\")\n\nSet up each field you want to appear on your form using these parameters:\n\n- **Field Label**: Enter the field label you want to appear in the form.\n- **Field Type**: Select the type of field to display in the form. Choose from:\n  - **Date**\n  - **Dropdown List**: Enter each dropdown options in the **Field Options**.\n    - **Multiple Choice**: Select whether the user can select a single dropdown option (turned off) or multiple dropdown options (turned on)\n  - **Number**\n  - **Password**\n  - **Text**\n  - **Textarea**\n- **Required Field**: Set whether the user must complete this field in order to submit the form (turned on) or if the user can submit the form without completing it (turned off).\n\n#### Respond When [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#respond-when \"Permanent link\")\n\nSet when to respond to the form submission. Choose from:\n\n- **Form Is Submitted**: Respond as soon as this node receives the form submission.\n- **Workflow Finishes**: Respond when the last node of this workflow finishes.\n- **Using 'Respond to Webhook' Node**: Respond when the [Respond to Webhook](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.respondtowebhook/) node executes.\n\n#### Limit Wait Time [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#limit-wait-time_1 \"Permanent link\")\n\nSet whether the workflow will automatically resume execution after a specific limit type (turned on) or not (turned off).\n\nIf turned on, also set:\n\\\\* **Limit Type**: Select what type of limit to enforce from these options:\n\\\\* **After Time Interval**: Wait for a certain amount of time.\n\\\\* Enter the limit's **Amount** of time.\n\\\\* Select the limit's **Unit** of time.\n\\\\* **At Specified Time**: Wait until a specific date and time to resume.\n\\\\* **Max Date and Time**: Use the date and time picker to set the specified time the node should resume.\n\n#### On Form Response options [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#on-form-response-options \"Permanent link\")\n\n- **Form Response**: Choose how and what you want the form to **Respond With** from these options:\n  - **Form Submitted Text**: The form displays whatever text is entered in **Text to Show** after a user fills out the form. Use this option if you want to display a confirmation message.\n  - **Redirect URL**: The form will redirect the user to the **URL to Redirect to** after they fill out the form. This must be a valid URL.\n- **Webhook Suffix**: Enter a suffix to append to the resume URL. This is useful for creating unique webhook URLs for each Wait node when a workflow contains multiple Wait nodes. Note that the generated `$resumeWebhookUrl` won't automatically include this suffix, you must manually append it to the webhook URL before exposing it.\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#templates-and-examples \"Permanent link\")\n\n**Scrape business emails from Google Maps without the use of any third party APIs**\n\nby Akram Kadri\n\n[View template details](https://n8n.io/workflows/2567-scrape-business-emails-from-google-maps-without-the-use-of-any-third-party-apis/)\n\n**Fully Automated AI Video Generation & Multi-Platform Publishing**\n\nby Juan Carlos Cavero Gracia\n\n[View template details](https://n8n.io/workflows/3442-fully-automated-ai-video-generation-and-multi-platform-publishing/)\n\n**Respond to WhatsApp Messages with AI Like a Pro!**\n\nby Jimleuk\n\n[View template details](https://n8n.io/workflows/2466-respond-to-whatsapp-messages-with-ai-like-a-pro/)\n\n[Browse Wait integration templates](https://n8n.io/integrations/wait/), or [search all templates](https://n8n.io/workflows/)\n\n## Time-based operations [\\#](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/\\#time-based-operations \"Permanent link\")\n\nFor the time-based resume operations, note that:\n\n- For wait times less than 65 seconds, the workflow doesn't offload execution data to the database. Instead, the process continues to run and the execution resumes after the specified interval passes.\n- The n8n server time is always used regardless of the timezone setting. Workflow timezone settings, and any changes made to them, don't affect the Wait node interval or specified time.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/","title":"Wait | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"03e2002e-d504-46af-8bcd-d8d9b44bf620","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Documentation for the Wait node in n8n, a workflow automation platform. Includes guidance on usage, and links to examples.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/#rundeck-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.rundeck.md \"Edit this page\")\n\n# Rundeck node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/\\#rundeck-node \"Permanent link\")\n\nUse the Rundeck node to automate work in Rundeck, and integrate Rundeck with other applications. n8n has built-in support for executing jobs and getting metadata.\n\nOn this page, you'll find a list of operations the Rundeck node supports and links to more resources.\n\nCredentials\n\nRefer to [Rundeck credentials](https://docs.n8n.io/integrations/builtin/credentials/rundeck/) for guidance on setting up authentication.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/\\#operations \"Permanent link\")\n\n- **Job**\n  - Execute a job\n  - Get metadata of a job\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/\\#templates-and-examples \"Permanent link\")\n\n[Browse Rundeck integration templates](https://n8n.io/integrations/rundeck/), or [search all templates](https://n8n.io/workflows/)\n\n## What to do if your operation isn't supported [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/\\#what-to-do-if-your-operation-isnt-supported \"Permanent link\")\n\nIf this node doesn't support the operation you want to do, you can use the [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.\n\nYou can use the credential you created for this service in the HTTP Request node:\n\n1. In the HTTP Request node, select **Authentication** \\> **Predefined Credential Type**.\n2. Select the service you want to connect to.\n3. Select your credential.\n\nRefer to [Custom API operations](https://docs.n8n.io/integrations/custom-operations/) for more information.\n\n## Find the job ID [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/\\#find-the-job-id \"Permanent link\")\n\n1. Access your Rundeck dashboard.\n2. Open the project that contains the job you want to use with n8n.\n3. In the sidebar, select **JOBS**.\n4. Under **All Jobs**, select the name of the job you want to use with n8n.\n5. In the top left corner, under the name of the job, copy the string that's displayed in smaller font below the job name. This is your job ID.\n6. Paste this job ID in the **Job Id** field in n8n.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/","title":"Rundeck node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"04baa8aa-a85a-497a-b2e0-c959e27616af","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.rundeck/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the Rundeck node in n8n. Follow technical documentation to integrate Rundeck node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.splunk/#splunk-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.splunk.md \"Edit this page\")\n\n# Splunk node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.splunk/\\#splunk-node \"Permanent link\")\n\nUse the Splunk node to automate work in Splunk, and integrate Splunk with other applications. n8n has built-in support for a wide range of Splunk features, including getting fired alerts reports, as well as deleting and getting search configuration.\n\nOn this page, you'll find a list of operations the Splunk node supports and links to more resources.\n\nCredentials\n\nRefer to [Splunk credentials](https://docs.n8n.io/integrations/builtin/credentials/splunk/) for guidance on setting up authentication.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.splunk/\\#operations \"Permanent link\")\n\n- Fired Alert\n  - Get a fired alerts report\n- Search Configuration\n  - Delete a search configuration\n  - Get a search configuration\n  - Get many search configurations\n- Search Job\n  - Create a search job\n  - Delete a search job\n  - Get a search job\n  - Get many search jobs\n- Search Result\n  - Get many search results\n- User\n  - Create a user\n  - Delete a user\n  - Get a user\n  - Get many users\n  - Update a user\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.splunk/\\#templates-and-examples \"Permanent link\")\n\n[Browse Splunk integration templates](https://n8n.io/integrations/splunk/), or [search all templates](https://n8n.io/workflows/)\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.splunk/","title":"Splunk node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0543f5da-daab-463d-af79-1c1564443aeb","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.splunk/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the Splunk node in n8n. Follow technical documentation to integrate Splunk node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/courses/level-one/chapter-3/#automating-a-real-world-use-case)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/courses/level-one/chapter-3.md \"Edit this page\")\n\n# Automating a (Real-world) Use Case [\\#](https://docs.n8n.io/courses/level-one/chapter-3/\\#automating-a-real-world-use-case \"Permanent link\")\n\nMeet Nathan 🙋. Nathan works as an Analytics Manager at ABCorp. His job is to support the ABCorp team with reporting and analytics. Being a true jack of all trades, he also handles several miscellaneous initiatives.\n\nSome things that Nathan does are repetitive and mind-numbing. He wants to automate some of these tasks so that he doesn't burn out. As an **Automation Expert**, you are meeting with Nathan today to help him understand how he can offload some of his responsibilities to n8n.\n\n## Understanding the scenario [\\#](https://docs.n8n.io/courses/level-one/chapter-3/\\#understanding-the-scenario \"Permanent link\")\n\n**You 👩‍🔧:** Nice to meet you, Nathan. Glad to be doing this! What's a repetitive task that's error-prone and that you'd like to get off your plate first?\n\n**Nathan 🙋:** Thanks for coming in! The most annoying one's gotta be the weekly sales reporting.\n\nI have to collect sales data from our legacy data warehouse, which manages data from the main business processes of an organization, such as sales or production. Now, each sales order can have the status Processing or Booked. I have to calculate the sum of all the Booked orders and announce them in the company Discord every Monday. Then I have to create a spreadsheet of all the Processing sales so that the Sales Managers can review them and check if they need to follow up with customers.\n\nThis manual work is tough and requires high attention to detail to make sure that all the numbers are right. Inevitably, I lose my focus and mistype a number or I don't get it done on time. I've been criticized once by my manager for miscalculating the data.\n\n**You 👩‍🔧:** Oh no! Doesn't the data warehouse have a way to export the data?\n\n**Nathan 🙋:** The data warehouse was written in-house ages ago. It doesn't have a CSV export but they recently added a couple of API endpoints that expose this data, if that helps.\n\n**You 👩‍🔧:** Perfect! That's a good start. If you have a generic API, we can add some custom code and a couple of services to make an automated workflow. This gig has n8n written all over it. Let's get started!\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/courses/level-one/chapter-3/","title":"Automating a (real-world) use case | n8n Docs  ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0715ecec-3b92-4dab-bdcd-508582245108","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/courses/level-one/chapter-3/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Documentation for n8n, a workflow automation platform.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/#customerio-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.customerio.md \"Edit this page\")\n\n# Customer.io node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/\\#customerio-node \"Permanent link\")\n\nUse the Customer.io node to automate work in Customer.io, and integrate Customer.io with other applications. n8n has built-in support for a wide range of Customer.io features, including creating and updating customers, tracking events, and getting campaigns.\n\nOn this page, you'll find a list of operations the Customer.io node supports and links to more resources.\n\nCredentials\n\nRefer to [Customer.io credentials](https://docs.n8n.io/integrations/builtin/credentials/customerio/) for guidance on setting up authentication.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/\\#operations \"Permanent link\")\n\n- Customer\n  - Create/Update a customer.\n  - Delete a customer.\n- Event\n  - Track a customer event.\n  - Track an anonymous event.\n- Campaign\n  - Get\n  - Get All\n  - Get Metrics\n- Segment\n  - Add Customer\n  - Remove Customer\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/\\#templates-and-examples \"Permanent link\")\n\n[Browse Customer.io integration templates](https://n8n.io/integrations/customerio/), or [search all templates](https://n8n.io/workflows/)\n\n## What to do if your operation isn't supported [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/\\#what-to-do-if-your-operation-isnt-supported \"Permanent link\")\n\nIf this node doesn't support the operation you want to do, you can use the [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.\n\nYou can use the credential you created for this service in the HTTP Request node:\n\n1. In the HTTP Request node, select **Authentication** \\> **Predefined Credential Type**.\n2. Select the service you want to connect to.\n3. Select your credential.\n\nRefer to [Custom API operations](https://docs.n8n.io/integrations/custom-operations/) for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/","title":"Customer.io node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"074e2b8c-1082-4805-a806-181e74650ee6","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.customerio/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the Customer.io node in n8n. Follow technical documentation to integrate Customer.io node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/#pagerduty-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty.md \"Edit this page\")\n\n# PagerDuty node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/\\#pagerduty-node \"Permanent link\")\n\nUse the PagerDuty node to automate work in PagerDuty, and integrate PagerDuty with other applications. n8n has built-in support for a wide range of PagerDuty features, including creating incident notes, as well as updating, and getting all log entries and users.\n\nOn this page, you'll find a list of operations the PagerDuty node supports and links to more resources.\n\nCredentials\n\nRefer to [PagerDuty credentials](https://docs.n8n.io/integrations/builtin/credentials/pagerduty/) for guidance on setting up authentication.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/\\#operations \"Permanent link\")\n\n- Incident\n  - Create an incident\n  - Get an incident\n  - Get all incidents\n  - Update an incident\n- Incident Note\n  - Create an incident note\n  - Get all incident's notes\n- Log Entry\n  - Get a log entry\n  - Get all log entries\n- User\n  - Get a user\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/\\#templates-and-examples \"Permanent link\")\n\n**Manage custom incident response in PagerDuty and Jira**\n\nby tanaypant\n\n[View template details](https://n8n.io/workflows/353-manage-custom-incident-response-in-pagerduty-and-jira/)\n\n**Incident Response Workflow - Part 3**\n\nby tanaypant\n\n[View template details](https://n8n.io/workflows/355-incident-response-workflow-part-3/)\n\n**Incident Response Workflow - Part 2**\n\nby tanaypant\n\n[View template details](https://n8n.io/workflows/354-incident-response-workflow-part-2/)\n\n[Browse PagerDuty integration templates](https://n8n.io/integrations/pagerduty/), or [search all templates](https://n8n.io/workflows/)\n\n## What to do if your operation isn't supported [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/\\#what-to-do-if-your-operation-isnt-supported \"Permanent link\")\n\nIf this node doesn't support the operation you want to do, you can use the [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.\n\nYou can use the credential you created for this service in the HTTP Request node:\n\n1. In the HTTP Request node, select **Authentication** \\> **Predefined Credential Type**.\n2. Select the service you want to connect to.\n3. Select your credential.\n\nRefer to [Custom API operations](https://docs.n8n.io/integrations/custom-operations/) for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/","title":"PagerDuty node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"07be3348-ea24-4d34-aa1e-2bc0bdba60cd","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pagerduty/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the PagerDuty node in n8n. Follow technical documentation to integrate PagerDuty node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/#google-slides-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.googleslides.md \"Edit this page\")\n\n# Google Slides node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/\\#google-slides-node \"Permanent link\")\n\nUse the Google Slides node to automate work in Google Slides, and integrate Google Slides with other applications. n8n has built-in support for a wide range of Google Slides features, including creating presentations, and getting pages.\n\nOn this page, you'll find a list of operations the Google Slides node supports and links to more resources.\n\nCredentials\n\nRefer to [Google credentials](https://docs.n8n.io/integrations/builtin/credentials/google/) for guidance on setting up authentication.\n\nThis node can be used as an AI tool\n\nThis node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/).\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/\\#operations \"Permanent link\")\n\n- Page\n  - Get a page\n  - Get a thumbnail\n- Presentation\n  - Create a presentation\n  - Get a presentation\n  - Get presentation slides\n  - Replace text in a presentation\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/\\#templates-and-examples \"Permanent link\")\n\n**Dynamically replace images in Google Slides via API**\n\nby Emmanuel Bernard\n\n[View template details](https://n8n.io/workflows/2244-dynamically-replace-images-in-google-slides-via-api/)\n\n**Get all the slides from a presentation and get thumbnails of pages**\n\nby Harshil Agrawal\n\n[View template details](https://n8n.io/workflows/1035-get-all-the-slides-from-a-presentation-and-get-thumbnails-of-pages/)\n\n**Export new deals from HubSpot to Slack and Airtable**\n\nby Lorena\n\n[View template details](https://n8n.io/workflows/1225-export-new-deals-from-hubspot-to-slack-and-airtable/)\n\n[Browse Google Slides integration templates](https://n8n.io/integrations/google-slides/), or [search all templates](https://n8n.io/workflows/)\n\n## What to do if your operation isn't supported [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/\\#what-to-do-if-your-operation-isnt-supported \"Permanent link\")\n\nIf this node doesn't support the operation you want to do, you can use the [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.\n\nYou can use the credential you created for this service in the HTTP Request node:\n\n1. In the HTTP Request node, select **Authentication** \\> **Predefined Credential Type**.\n2. Select the service you want to connect to.\n3. Select your credential.\n\nRefer to [Custom API operations](https://docs.n8n.io/integrations/custom-operations/) for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/","title":"Google Slides node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"09d525a9-0b42-401a-830a-11e505d95a9d","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googleslides/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the Google Slides node in n8n. Follow technical documentation to integrate Google Slides node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#postgres-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.postgres/index.md \"Edit this page\")\n\n# Postgres node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#postgres-node \"Permanent link\")\n\nUse the Postgres node to automate work in Postgres, and integrate Postgres with other applications. n8n has built-in support for a wide range of Postgres features, including executing queries, as well as inserting and updating rows in a database.\n\nOn this page, you'll find a list of operations the Postgres node supports and links to more resources.\n\nCredentials\n\nRefer to [Postgres credentials](https://docs.n8n.io/integrations/builtin/credentials/postgres/) for guidance on setting up authentication.\n\nThis node can be used as an AI tool\n\nThis node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/).\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#operations \"Permanent link\")\n\n- [**Delete**](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#delete): Delete an entire table or rows in a table\n- [**Execute Query**](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#execute-query): Execute an SQL query\n- [**Insert**](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#insert): Insert rows in a table\n- [**Insert or Update**](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#insert-or-update): Insert or update rows in a table\n- [**Select**](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#select): Select rows from a table\n- [**Update**](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#update): Update rows in a table\n\n### Delete [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#delete \"Permanent link\")\n\nUse this operation to delete an entire table or rows in a table.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Postgres credential](https://docs.n8n.io/integrations/builtin/credentials/postgres/).\n- **Operation**: Select **Delete**.\n- **Schema**: Choose the schema that contains the table you want to work on. Select **From list** to choose the schema from the dropdown list or **By Name** to enter the schema name.\n- **Table**: Choose the table that you want to work on. Select **From list** to choose the table from the dropdown list or **By Name** to enter the table name.\n- **Command**: The deletion action to take:\n  - **Truncate**: Removes the table's data but preserves the table's structure.\n    - **Restart Sequences**: Whether to reset auto increment columns to their initial values as part of the Truncate process.\n  - **Delete**: Delete the rows that match the \"Select Rows\" condition. If you don't select anything, Postgres deletes all rows.\n    - **Select Rows**: Define a **Column**, **Operator**, and **Value** to match rows on.\n    - **Combine Conditions**: How to combine the conditions in \"Select Rows\". **AND** requires all conditions to be true, while **OR** requires at least one condition to be true.\n  - **Drop**: Deletes the table's data and structure permanently.\n\n#### Delete options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#delete-options \"Permanent link\")\n\n- **Cascade**: Whether to also drop all objects that depend on the table, like views and sequences. Available if using **Truncate** or **Drop** commands.\n- **Connection Timeout**: The number of seconds to try to connect to the database.\n- **Delay Closing Idle Connection**: The number of seconds to wait before considering idle connections eligible for closing.\n- **Query Batching**: The way to send queries to the database:\n  - **Single Query**: A single query for all incoming items.\n  - **Independently**: Execute one query per incoming item of the execution.\n  - **Transaction**: Execute all queries in a transaction. If a failure occurs, Postgres rolls back all changes.\n- **Output Large-Format Numbers As**: The format to output `NUMERIC` and `BIGINT` columns as:\n  - **Numbers**: Use this for standard numbers.\n  - **Text**: Use this if you expect numbers longer than 16 digits. Without this, numbers may be incorrect.\n\n### Execute Query [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#execute-query \"Permanent link\")\n\nUse this operation to execute an SQL query.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Postgres credential](https://docs.n8n.io/integrations/builtin/credentials/postgres/).\n- **Operation**: Select **Execute Query**.\n- **Query**: The SQL query to execute. You can use n8n [expressions](https://docs.n8n.io/code/expressions/) and tokens like `$1`, `$2`, and `$3` to build [prepared statements](https://www.postgresql.org/docs/current/sql-prepare.html) to use with [query parameters](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#use-query-parameters).\n\n#### Execute Query options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#execute-query-options \"Permanent link\")\n\n- **Connection Timeout**: The number of seconds to try to connect to the database.\n- **Delay Closing Idle Connection**: The number of seconds to wait before considering idle connections eligible for closing.\n- **Query Batching**: The way to send queries to the database:\n  - **Single Query**: A single query for all incoming items.\n  - **Independently**: Execute one query per incoming item of the execution.\n  - **Transaction**: Execute all queries in a transaction. If a failure occurs, Postgres rolls back all changes.\n- **Query Parameters**: A comma-separated list of values that you want to use as [query parameters](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/#use-query-parameters).\n- **Output Large-Format Numbers As**: The format to output `NUMERIC` and `BIGINT` columns as:\n  - **Numbers**: Use this for standard numbers.\n  - **Text**: Use this if you expect numbers longer than 16 digits. Without this, numbers may be incorrect.\n- **Replace Empty Strings with NULL**: Whether to replace empty strings with NULL in input. This may be useful when working with data exported from spreadsheet software.\n\n### Insert [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#insert \"Permanent link\")\n\nUse this operation to insert rows in a table.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Postgres credential](https://docs.n8n.io/integrations/builtin/credentials/postgres/).\n- **Operation**: Select **Insert**.\n- **Schema**: Choose the schema that contains the table you want to work on. Select **From list** to choose the schema from the dropdown list or **By Name** to enter the schema name.\n- **Table**: Choose the table that you want to work on. Select **From list** to choose the table from the dropdown list or **By Name** to enter the table name.\n- **Mapping Column Mode**: How to map column names to incoming data:\n  - **Map Each Column Manually**: Select the values to use for each column.\n  - **Map Automatically**: Automatically map incoming data to matching column names in Postgres. The incoming data field names must match the column names in Postgres for this to work. If necessary, consider using the [edit fields (set) node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set/) before this node to adjust the format as needed.\n\n#### Insert options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#insert-options \"Permanent link\")\n\n- **Connection Timeout**: The number of seconds to try to connect to the database.\n- **Delay Closing Idle Connection**: The number of seconds to wait before considering idle connections eligible for closing.\n- **Query Batching**: The way to send queries to the database:\n  - **Single Query**: A single query for all incoming items.\n  - **Independently**: Execute one query per incoming item of the execution.\n  - **Transaction**: Execute all queries in a transaction. If a failure occurs, Postgres rolls back all changes.\n- **Output Columns**: Choose which columns to output. You can select from a list of available columns or specify IDs using [expressions](https://docs.n8n.io/code/expressions/).\n- **Output Large-Format Numbers As**: The format to output `NUMERIC` and `BIGINT` columns as:\n  - **Numbers**: Use this for standard numbers.\n  - **Text**: Use this if you expect numbers longer than 16 digits. Without this, numbers may be incorrect.\n- **Skip on Conflict**: Whether to skip the row if the insert violates a unique or exclusion constraint instead of throwing an error.\n- **Replace Empty Strings with NULL**: Whether to replace empty strings with NULL in input. This may be useful when working with data exported from spreadsheet software.\n\n### Insert or Update [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#insert-or-update \"Permanent link\")\n\nUse this operation to insert or update rows in a table.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Postgres credential](https://docs.n8n.io/integrations/builtin/credentials/postgres/).\n- **Operation**: Select **Insert or Update**.\n- **Schema**: Choose the schema that contains the table you want to work on. Select **From list** to choose the schema from the dropdown list or **By Name** to enter the schema name.\n- **Table**: Choose the table that you want to work on. Select **From list** to choose the table from the dropdown list or **By Name** to enter the table name.\n- **Mapping Column Mode**: How to map column names to incoming data:\n  - **Map Each Column Manually**: Select the values to use for each column.\n  - **Map Automatically**: Automatically map incoming data to matching column names in Postgres. The incoming data field names must match the column names in Postgres for this to work. If necessary, consider using the [edit fields (set) node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set/) before this node to adjust the format as needed.\n\n#### Insert or Update options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#insert-or-update-options \"Permanent link\")\n\n- **Connection Timeout**: The number of seconds to try to connect to the database.\n- **Delay Closing Idle Connection**: The number of seconds to wait before considering idle connections eligible for closing.\n- **Query Batching**: The way to send queries to the database:\n  - **Single Query**: A single query for all incoming items.\n  - **Independently**: Execute one query per incoming item of the execution.\n  - **Transaction**: Execute all queries in a transaction. If a failure occurs, Postgres rolls back all changes.\n- **Output Columns**: Choose which columns to output. You can select from a list of available columns or specify IDs using [expressions](https://docs.n8n.io/code/expressions/).\n- **Output Large-Format Numbers As**: The format to output `NUMERIC` and `BIGINT` columns as:\n  - **Numbers**: Use this for standard numbers.\n  - **Text**: Use this if you expect numbers longer than 16 digits. Without this, numbers may be incorrect.\n- **Replace Empty Strings with NULL**: Whether to replace empty strings with NULL in input. This may be useful when working with data exported from spreadsheet software.\n\n### Select [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#select \"Permanent link\")\n\nUse this operation to select rows in a table.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Postgres credential](https://docs.n8n.io/integrations/builtin/credentials/postgres/).\n- **Operation**: Select **Select**.\n- **Schema**: Choose the schema that contains the table you want to work on. Select **From list** to choose the schema from the dropdown list or **By Name** to enter the schema name.\n- **Table**: Choose the table that you want to work on. Select **From list** to choose the table from the dropdown list or **By Name** to enter the table name.\n- **Return All**: Whether to return all results or only up to a given limit.\n- **Limit**: The maximum number of items to return when **Return All** is disabled.\n- **Select Rows**: Set the conditions to select rows. Define a **Column**, **Operator**, and **Value** to match rows on. If you don't select anything, Postgres selects all rows.\n- **Combine Conditions**: How to combine the conditions in **Select Rows**. **AND** requires all conditions to be true, while **OR** requires at least one condition to be true.\n- **Sort**: Choose how to sort the selected rows. Choose a **Column** from a list or by ID and a sort **Direction**.\n\n#### Select options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#select-options \"Permanent link\")\n\n- **Connection Timeout**: The number of seconds to try to connect to the database.\n- **Delay Closing Idle Connection**: The number of seconds to wait before considering idle connections eligible for closing.\n- **Query Batching**: The way to send queries to the database:\n  - **Single Query**: A single query for all incoming items.\n  - **Independently**: Execute one query per incoming item of the execution.\n  - **Transaction**: Execute all queries in a transaction. If a failure occurs, Postgres rolls back all changes.\n- **Output Columns**: Choose which columns to output. You can select from a list of available columns or specify IDs using [expressions](https://docs.n8n.io/code/expressions/).\n- **Output Large-Format Numbers As**: The format to output `NUMERIC` and `BIGINT` columns as:\n  - **Numbers**: Use this for standard numbers.\n  - **Text**: Use this if you expect numbers longer than 16 digits. Without this, numbers may be incorrect.\n\n### Update [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#update \"Permanent link\")\n\nUse this operation to update rows in a table.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Postgres credential](https://docs.n8n.io/integrations/builtin/credentials/postgres/).\n- **Operation**: Select **Update**.\n- **Schema**: Choose the schema that contains the table you want to work on. Select **From list** to choose the schema from the dropdown list or **By Name** to enter the schema name.\n- **Table**: Choose the table that you want to work on. Select **From list** to choose the table from the dropdown list or **By Name** to enter the table name.\n- **Mapping Column Mode**: How to map column names to incoming data:\n  - **Map Each Column Manually**: Select the values to use for each column.\n  - **Map Automatically**: Automatically map incoming data to matching column names in Postgres. The incoming data field names must match the column names in Postgres for this to work. If necessary, consider using the [edit fields (set) node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set/) before this node to adjust the format as needed.\n\n#### Update options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#update-options \"Permanent link\")\n\n- **Connection Timeout**: The number of seconds to try to connect to the database.\n- **Delay Closing Idle Connection**: The number of seconds to wait before considering idle connections eligible for closing.\n- **Query Batching**: The way to send queries to the database:\n  - **Single Query**: A single query for all incoming items.\n  - **Independently**: Execute one query per incoming item of the execution.\n  - **Transaction**: Execute all queries in a transaction. If a failure occurs, Postgres rolls back all changes.\n- **Output Columns**: Choose which columns to output. You can select from a list of available columns or specify IDs using [expressions](https://docs.n8n.io/code/expressions/).\n- **Output Large-Format Numbers As**: The format to output `NUMERIC` and `BIGINT` columns as:\n  - **Numbers**: Use this for standard numbers.\n  - **Text**: Use this if you expect numbers longer than 16 digits. Without this, numbers may be incorrect.\n- **Replace Empty Strings with NULL**: Whether to replace empty strings with NULL in input. This may be useful when working with data exported from spreadsheet software.\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#templates-and-examples \"Permanent link\")\n\n**Chat with Postgresql Database**\n\nby KumoHQ\n\n[View template details](https://n8n.io/workflows/2859-chat-with-postgresql-database/)\n\n**Generate Instagram Content from Top Trends with AI Image Generation**\n\nby mustafa kendigüzel\n\n[View template details](https://n8n.io/workflows/2803-generate-instagram-content-from-top-trends-with-ai-image-generation/)\n\n**HR & IT Helpdesk Chatbot with Audio Transcription**\n\nby Felipe Braga\n\n[View template details](https://n8n.io/workflows/2752-hr-and-it-helpdesk-YOUR_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE-with-audio-transcription/)\n\n[Browse Postgres integration templates](https://n8n.io/integrations/postgres/), or [search all templates](https://n8n.io/workflows/)\n\n## Related resources [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#related-resources \"Permanent link\")\n\nn8n provides a trigger node for Postgres. You can find the trigger node docs [here](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.postgrestrigger/).\n\n## Use query parameters [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#use-query-parameters \"Permanent link\")\n\nWhen creating a query to run on a Postgres database, you can use the **Query Parameters** field in the **Options** section to load data into the query. n8n sanitizes data in query parameters, which prevents SQL injection.\n\nFor example, you want to find a person by their email address. Given the following input data:\n\n|     |     |\n| --- | --- |\n| ```<br> 1<br> 2<br> 3<br> 4<br> 5<br> 6<br> 7<br> 8<br> 9<br>10<br>11<br>12<br>``` | ```<br>[<br>    {<br>        \"email\": \"alex@example.com\",<br>        \"name\": \"Alex\",<br>        \"age\": 21 <br>    },<br>    {<br>        \"email\": \"jamie@example.com\",<br>        \"name\": \"Jamie\",<br>        \"age\": 33 <br>    }<br>]<br>``` |\n\nYou can write a query like:\n\n|     |     |\n| --- | --- |\n| ```<br>1<br>``` | ```<br>SELECT * FROM $1:name WHERE email = $2;<br>``` |\n\nThen in **Query Parameters**, provide the field values to use. You can provide fixed values or expressions. For this example, use expressions so the node can pull the email address from each input item in turn:\n\n|     |     |\n| --- | --- |\n| ```<br>1<br>2<br>``` | ```<br>// users is an example table name<br>{{ [ 'users', $json.email ] }} <br>``` |\n\n## Common issues [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/\\#common-issues \"Permanent link\")\n\nFor common questions or issues and suggested solutions, refer to [Common issues](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/common-issues/).\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/","title":"Postgres node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0a351698-619b-46ed-8deb-600bd4730043","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.postgres/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the Postgres node in n8n. Follow technical documentation to integrate Postgres node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/source-control-environments/create-environments/#tutorial-create-environments-with-source-control)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/source-control-environments/create-environments.md \"Edit this page\")\n\n# Tutorial: Create environments with source control [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#tutorial-create-environments-with-source-control \"Permanent link\")\n\nFeature availability\n\n- Available on Enterprise.\n- You need to be an n8n instance owner, admin, or project owner to set up source control, and to send work to and from Git.\n\nThis tutorial walks through the process of setting up environments end-to-end. You'll create two environments: development and production. It uses GitHub as the Git provider. The process is similar for other providers.\n\nn8n has built its environments feature on top of Git, a version control software. You link an n8n instance to a Git branch, and use a push-pull pattern to move work between environments. You should have some understanding of environments and Git. If you need more information on these topics, refer to:\n\n- [Environments in n8n](https://docs.n8n.io/source-control-environments/understand/environments/): the purpose of environments, and how they work in n8n.\n- [Git and n8n](https://docs.n8n.io/source-control-environments/understand/git/): Git concepts and source control in n8n.\n\n## Choose your source control pattern [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#choose-your-source-control-pattern \"Permanent link\")\n\nBefore setting up source control and environments, you need to plan your environments, and how they relate to Git branches. n8n supports different [Branch patterns](https://docs.n8n.io/source-control-environments/understand/patterns/). For environments, you need to choose between two patterns: multi-instance, multi-branch, or multi-instance, single-branch. This tutorial covers both patterns.\n\nRecommendation: don't push and pull to the same n8n instance\n\nYou can push work from an instance to a branch, and pull to the same instance. n8n doesn't recommend this. To reduce the risk of merge conflicts and overwriting work, try to create a process where work goes in one direction: either to Git, or from Git, but not both.\n\n### Multiple instances, multiple branches [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#multiple-instances-multiple-branches \"Permanent link\")\n\n[![Diagram](https://docs.n8n.io/_images/source-control-environments/vc-multi-multi.png)](https://docs.n8n.io/_images/source-control-environments/vc-multi-multi.png)\n\nThe advantages of this pattern are:\n\n- An added safety layer to prevent changes getting into your production environment by mistake. You have to do a pull request in GitHub to copy work between environments.\n- It supports more than two instances.\n\nThe disadvantage is more manual steps to copy work between environments.\n\n### Multiple instances, one branch [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#multiple-instances-one-branch \"Permanent link\")\n\n[![Diagram](https://docs.n8n.io/_images/source-control-environments/vc-multi-one.png)](https://docs.n8n.io/_images/source-control-environments/vc-multi-one.png)\n\nThe advantage of this pattern is that work is instantly available to other environments when you push from one instance.\n\nThe disadvantages are:\n\n- If you push by mistake, there is a risk the work will make it into your production instance. If you [use a GitHub Action to automate pulls](https://docs.n8n.io/source-control-environments/create-environments/#optional-use-a-github-action-to-automate-pulls) to production, you must either use the multi-instance, multi-branch pattern, or be careful to never push work that you don't want in production.\n- Pushing and pulling to the same instance can cause data loss as changes are overridden when performing these actions. You should set up processes to ensure content flows in one direction.\n\n## Set up your repository [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#set-up-your-repository \"Permanent link\")\n\nOnce you've chosen your pattern, you need to set up your GitHub repository.\n\n[Multi-branch](https://docs.n8n.io/source-control-environments/create-environments/#__tabbed_1_1)[Single-branch](https://docs.n8n.io/source-control-environments/create-environments/#__tabbed_1_2)\n\n1. [Create a new repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository).\n   - Make sure the repository is private, unless you want your workflows, tags, and variable and credential stubs exposed to the internet.\n   - Create the new repository with a README so you can immediately create branches.\n2. Create one branch named `production` and another named `development`. Refer to [Creating and deleting branches within your repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository) for guidance.\n\n[Create a new repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository).\n\n- Make sure the repository is private, unless you want your workflows, tags, and variable and credential stubs exposed to the internet.\n- Create the new repository with a README. This creates the `main` branch, which you'll connect to.\n\n## Connect your n8n instances to your repository [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#connect-your-n8n-instances-to-your-repository \"Permanent link\")\n\nCreate two n8n instances, one for development, one for production.\n\n### Configure Git in n8n [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#configure-git-in-n8n \"Permanent link\")\n\n1. Go to **Settings** \\> **Environments**.\n2. In **Git repository URL** enter the SSH URL for your repository.\n3. n8n supports ED25519 and RSA public key algorithms. ED25519 is the default. Select **RSA** under **SSH Key** if your git host requires RSA.\n4. Copy the SSH key.\n\n### Set up a deploy key [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#set-up-a-deploy-key \"Permanent link\")\n\nSet up SSH access by creating a deploy key for the repository using the SSH key from n8n. The key must have write access. Refer to [GitHub \\| Managing deploy keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys) for guidance.\n\n### Connect n8n and configure your instance [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#connect-n8n-and-configure-your-instance \"Permanent link\")\n\n[Multi-branch](https://docs.n8n.io/source-control-environments/create-environments/#__tabbed_2_1)[Single-branch](https://docs.n8n.io/source-control-environments/create-environments/#__tabbed_2_2)\n\n1. In **Settings** \\> **Environments** in n8n, select **Connect**. n8n connects to your Git repository.\n2. Under **Instance settings**, choose which branch you want to use for the current n8n instance. Connect the production branch to the production instance, and the development branch to the development instance.\n3. Production instance only: select **Protected instance** to prevent users editing workflows in this instance.\n4. Select **Save settings**.\n\n1. In **Settings** \\> **Environments** in n8n, select **Connect**.\n2. Under **Instance settings**, select the main branch.\n3. Production instance only: select **Protected instance** to prevent users editing workflows in this instance.\n4. Select **Save settings**.\n\n## Push work from development [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#push-work-from-development \"Permanent link\")\n\nIn your development instance, create a few workflows, tags, variables, and credentials.\n\nTo push work to Git:\n\n1. Select **Push**![Push icon](https://docs.n8n.io/_images/source-control-environments/push-icon.png) in the main menu.\nView screenshot\n\n\n\n[![Pull and push buttons when menu is closed](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-closed.png)](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-closed.png) Pull and push buttons when menu is closed\n\n\n\n\n\n\n\n[![Pull and push buttons when menu is open](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-open.png)](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-open.png) Pull and push buttons when menu is open\n\n2. In the **Commit and push changes** modal, select which workflows you want to push. You can filter by status (new, modified, deleted) and search for workflows. n8n automatically pushes tags, and variable and credential stubs.\n\n3. Enter a commit message. This should be a one sentence description of the changes you're making.\n4. Select **Commit and Push**. n8n sends the work to Git, and displays a success message on completion.\n\n## Pull work to production [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#pull-work-to-production \"Permanent link\")\n\nYour work is now in GitHub. If you're using a multi-branch setup, it's on the development branch. If you chose the single-branch setup, it's on main.\n\n[Multi-branch](https://docs.n8n.io/source-control-environments/create-environments/#__tabbed_3_1)[Single-branch](https://docs.n8n.io/source-control-environments/create-environments/#__tabbed_3_2)\n\n1. In GitHub, create a pull request to merge development into production.\n2. Merge the pull request.\n3. In your production instance, select **Pull**![Pull icon](https://docs.n8n.io/_images/source-control-environments/pull-icon.png) in the main menu.\n\nIn your production instance, select **Pull**![Pull icon](https://docs.n8n.io/_images/source-control-environments/pull-icon.png) in the main menu.\n\nView screenshot\n\n[![Pull and push buttons when menu is closed](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-closed.png)](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-closed.png) Pull and push buttons when menu is closed\n\n[![Pull and push buttons when menu is open](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-open.png)](https://docs.n8n.io/_images/source-control-environments/pull-push-menu-open.png) Pull and push buttons when menu is open\n\n### Optional: Use a GitHub Action to automate pulls [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#optional-use-a-github-action-to-automate-pulls \"Permanent link\")\n\nIf you want to avoid logging in to your production instance to pull, you can use a [GitHub Action](https://docs.github.com/en/actions/creating-actions/about-custom-actions) and the [n8n API](https://docs.n8n.io/api/) to automatically pull every time you push new work to your production or main branch.\n\nA GitHub Action example:\n\n|     |     |\n| --- | --- |\n| ```<br> 1<br> 2<br> 3<br> 4<br> 5<br> 6<br> 7<br> 8<br> 9<br>10<br>11<br>12<br>13<br>14<br>15<br>16<br>``` | ```<br>name: CI<br>on:<br>  # Trigger the workflow on push or pull request events for the \"production\" branch<br>  push:<br>    branches: [ \"production\" ]<br>  # Allows you to run this workflow manually from the Actions tab<br>  workflow_dispatch:<br>jobs:<br>  run-pull:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - name: PULL<br>\t\t\t\t# Use GitHub secrets to protect sensitive information<br>        run: ><br>          curl --location '${{ secrets.INSTANCE_URL }}/version-control/pull' --header<br>          'Content-Type: application/json' --header 'X-N8N-API-KEY: ${{ secrets.INSTANCE_API_KEY }}'<br>``` |\n\n## Next steps [\\#](https://docs.n8n.io/source-control-environments/create-environments/\\#next-steps \"Permanent link\")\n\nLearn more about:\n\n- [Environments in n8n](https://docs.n8n.io/source-control-environments/understand/environments/) and [Git and n8n](https://docs.n8n.io/source-control-environments/understand/git/)\n- [Source control patterns](https://docs.n8n.io/source-control-environments/understand/patterns/)\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/source-control-environments/create-environments/","title":"Tutorial - Create environments with source control | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0a824627-fd22-429d-976a-5f983b328f8c","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/source-control-environments/create-environments/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"How to use n8n's source control feature to create environments.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/user-management/saml/managing/#manage-users-with-saml)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/user-management/saml/managing.md \"Edit this page\")\n\n# Manage users with SAML [\\#](https://docs.n8n.io/user-management/saml/managing/\\#manage-users-with-saml \"Permanent link\")\n\nThere are some user management tasks that are affected by SAML.\n\n## Exempt users from SAML [\\#](https://docs.n8n.io/user-management/saml/managing/\\#exempt-users-from-saml \"Permanent link\")\n\nYou can allow users to log in without using SAML. To do this:\n\n1. Go to **Settings** \\> **Users**.\n2. Select the menu icon by the user you want to exempt from SAML.\n3. Select **Allow Manual Login**.\n\n## Deleting users [\\#](https://docs.n8n.io/user-management/saml/managing/\\#deleting-users \"Permanent link\")\n\nIf you remove a user from your IdP, they remain logged in to n8n. You need to manually remove them from n8n as well. Refer to [Manage users](https://docs.n8n.io/user-management/manage-users/) for guidance on deleting users.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/user-management/saml/managing/","title":"Manage users with SAML | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0bd567d9-6db9-46bf-b8f4-0d4c94e581e1","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/user-management/saml/managing/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"How to manage users and user logins with SAML enabled.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/#npm-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.npm.md \"Edit this page\")\n\n# npm node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/\\#npm-node \"Permanent link\")\n\nUse the npm node to automate work in npm, and integrate npm with other applications.\n\nOn this page, you'll find a list of operations the npm node supports and links to more resources.\n\nCredentials\n\nRefer to [npm credentials](https://docs.n8n.io/integrations/builtin/credentials/npm/) for guidance on setting up authentication.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/\\#operations \"Permanent link\")\n\n- Package\n  - Get Package Metadata\n  - Get Package Versions\n  - Search for Packages\n- Distribution Tag\n  - Get All Tags\n  - Update a Tag\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/\\#templates-and-examples \"Permanent link\")\n\n[Browse npm integration templates](https://n8n.io/integrations/npm/), or [search all templates](https://n8n.io/workflows/)\n\n## Related resources [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/\\#related-resources \"Permanent link\")\n\nRefer to [npm's documentation](https://docs.npmjs.com/) for more information about the service.\n\n## What to do if your operation isn't supported [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/\\#what-to-do-if-your-operation-isnt-supported \"Permanent link\")\n\nIf this node doesn't support the operation you want to do, you can use the [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.\n\nYou can use the credential you created for this service in the HTTP Request node:\n\n1. In the HTTP Request node, select **Authentication** \\> **Predefined Credential Type**.\n2. Select the service you want to connect to.\n3. Select your credential.\n\nRefer to [Custom API operations](https://docs.n8n.io/integrations/custom-operations/) for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/","title":"npm node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0c1a16c5-a6ab-400c-9dde-45e10ddc730b","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.npm/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the npm node in n8n. Follow technical documentation to integrate npm node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations/#google-calendar-calendar-operations)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations.md \"Edit this page\")\n\n# Google Calendar Calendar operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations/\\#google-calendar-calendar-operations \"Permanent link\")\n\nUse this operation to check availability in a calendar in Google Calendar. Refer to [Google Calendar](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/) for more information on the Google Calendar node itself.\n\n## Availability [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations/\\#availability \"Permanent link\")\n\nUse this operation to check if a time-slot is available in a calendar.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Calendar credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Calendar**.\n- **Operation**: Select **Availability**.\n- **Calendar**: Choose a calendar you want to check against. Select **From list** to choose the title from the dropdown list or **By ID** to enter a calendar ID.\n- **Start Time**: The start time for the time-slot you want to check. By default, uses an expression evaluating to the current time ( `{{ $now }}`).\n- **End Time**: The end time for the time-slot you want to check. By default, uses an expression evaluating to an hour from now ( `{{ $now.plus(1, 'hour') }}`).\n\n### Options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations/\\#options \"Permanent link\")\n\n- **Output Format**: Select the format for the availability information:\n  - **Availability**: Returns if there are already events overlapping with the given time slot or not.\n  - **Booked Slots**: Returns the booked slots.\n  - **RAW**: Returns the RAW data from the API.\n- **Timezone**: The timezone used in the response. By default, uses the n8n timezone.\n\nRefer to the [Freebusy: query \\| Google Calendar](https://developers.google.com/calendar/api/v3/reference/freebusy/query) API documentation for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations/","title":"Google Calendar Calendar operations | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0c50013d-5d1d-4428-bbd0-b1ca6d84df63","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar/calendar-operations/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Documentation for the Calendar operations in Google Calendar node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/#deepl-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.deepl.md \"Edit this page\")\n\n# DeepL node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/\\#deepl-node \"Permanent link\")\n\nUse the DeepL node to automate work in DeepL, and integrate DeepL with other applications. n8n has built-in support for a wide range of DeepL features, including translating languages.\n\nOn this page, you'll find a list of operations the DeepL node supports and links to more resources.\n\nCredentials\n\nRefer to [DeepL credentials](https://docs.n8n.io/integrations/builtin/credentials/deepl/) for guidance on setting up authentication.\n\nThis node can be used as an AI tool\n\nThis node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/).\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/\\#operations \"Permanent link\")\n\n- Language\n  - Translate data\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/\\#templates-and-examples \"Permanent link\")\n\n**Translate PDF documents from Google drive folder with DeepL**\n\nby Milorad Filipovic\n\n[View template details](https://n8n.io/workflows/2179-translate-pdf-documents-from-google-drive-folder-with-deepl/)\n\n**Translate cocktail instructions using DeepL**\n\nby Harshil Agrawal\n\n[View template details](https://n8n.io/workflows/998-translate-cocktail-instructions-using-deepl/)\n\n**Real-time Chat Translation with DeepL**\n\nby Ghufran Ridhawi\n\n[View template details](https://n8n.io/workflows/4532-real-time-chat-translation-with-deepl/)\n\n[Browse DeepL integration templates](https://n8n.io/integrations/deepl/), or [search all templates](https://n8n.io/workflows/)\n\n## What to do if your operation isn't supported [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/\\#what-to-do-if-your-operation-isnt-supported \"Permanent link\")\n\nIf this node doesn't support the operation you want to do, you can use the [HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/) to call the service's API.\n\nYou can use the credential you created for this service in the HTTP Request node:\n\n1. In the HTTP Request node, select **Authentication** \\> **Predefined Credential Type**.\n2. Select the service you want to connect to.\n3. Select your credential.\n\nRefer to [Custom API operations](https://docs.n8n.io/integrations/custom-operations/) for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/","title":"DeepL node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0c5bcd16-d6c3-401e-9cdf-78504f893725","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.deepl/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the DeepL node in n8n. Follow technical documentation to integrate DeepL node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/help-community/help/#get-help-with-n8n)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/help-community/help.md \"Edit this page\")\n\n# Get help with n8n [\\#](https://docs.n8n.io/help-community/help/\\#get-help-with-n8n \"Permanent link\")\n\nIf you need more help with n8n, you can ask for support in the [forum](https://community.n8n.io/). This is the best source of answers, as both the n8n support team and community members can help.\n\nIf your Cloud instance is having issues, or if you're an enterprise customer who needs support, you can contact [help@n8n.io](mailto:help@n8n.io).\n\n## Use the About n8n debug tool [\\#](https://docs.n8n.io/help-community/help/\\#use-the-about-n8n-debug-tool \"Permanent link\")\n\nWhether you're posting to the forum or emailing customer support, you'll get help faster if you provide details about your n8n instance in your first post or email.\n\nThe fastest way to do this is to use the **About n8n** debug tool:\n\n1. Open the left-side panel.\n2. Select **Help**.\n3. Select **About n8n**.\n4. The **About n8n** modal opens to display your current information.\n5. Select **Copy debug information** to copy your information.\n6. n8n recommends pasting this information into your forum post or support email.\n\nDon't see **Copy debug**?\n\nThe **Copy debug** option is available beginning in n8n version 1.49.0.\n\nIf you're using an earlier version of n8n, n8n recommends manually providing this information:\n\n- n8n version\n- Database\n- n8n EXECUTIONS\\_PROCESS setting\n- Running n8n via (Docker, npm, n8n cloud)\n- Operating system\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/help-community/help/","title":"Where to get help | n8n Docs  ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0cf69e5a-e09e-4cc5-8e3f-2cfee93d53d2","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/help-community/help/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"How to get help and support with n8n.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/#mqtt-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.mqtt.md \"Edit this page\")\n\n# MQTT node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/\\#mqtt-node \"Permanent link\")\n\nUse the MQTT node to automate work in MQTT, and integrate MQTT with other applications. n8n supports transporting messages with MQTT.\n\nOn this page, you'll find a list of operations the MQTT node supports and links to more resources.\n\nCredentials\n\nRefer to [MQTT credentials](https://docs.n8n.io/integrations/builtin/credentials/mqtt/) for guidance on setting up authentication.\n\nThis node can be used as an AI tool\n\nThis node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/).\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/\\#operations \"Permanent link\")\n\nUse the MQTT node to send a message. You can set the message topic, and choose whether to send the node input data as part of the message.\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/\\#templates-and-examples \"Permanent link\")\n\n**IOT Button Remote / Spotify Control Integration with MQTT**\n\nby Hubschrauber\n\n[View template details](https://n8n.io/workflows/2383-iot-button-remote-spotify-control-integration-with-mqtt/)\n\n**Receive messages for a MQTT queue**\n\nby Harshil Agrawal\n\n[View template details](https://n8n.io/workflows/657-receive-messages-for-a-mqtt-queue/)\n\n**Send location updates of the ISS to a topic in MQTT**\n\nby Harshil Agrawal\n\n[View template details](https://n8n.io/workflows/1069-send-location-updates-of-the-iss-to-a-topic-in-mqtt/)\n\n[Browse MQTT integration templates](https://n8n.io/integrations/mqtt/), or [search all templates](https://n8n.io/workflows/)\n\n## Related resources [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/\\#related-resources \"Permanent link\")\n\nn8n provides a trigger node for MQTT. You can find the trigger node docs [here](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.mqtttrigger/).\n\nRefer to [MQTT's documentation](https://mqtt.org/getting-started/) for more information about the service.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/","title":"MQTT node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0d37926f-134e-4942-b007-af928557f462","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.mqtt/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the MQTT node in n8n. Follow technical documentation to integrate MQTT node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.matrix/#matrix-node)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.matrix.md \"Edit this page\")\n\n# Matrix node [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.matrix/\\#matrix-node \"Permanent link\")\n\nUse the Matrix node to automate work in Matrix, and integrate Matrix with other applications. n8n has built-in support for a wide range of Matrix features, including getting current user's account information, sending media and messages to a room, and getting room members and messages.\n\nOn this page, you'll find a list of operations the Matrix node supports and links to more resources.\n\nCredentials\n\nRefer to [Matrix credentials](https://docs.n8n.io/integrations/builtin/credentials/matrix/) for guidance on setting up authentication.\n\n## Operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.matrix/\\#operations \"Permanent link\")\n\n- Account\n  - Get current user's account information\n- Event\n  - Get single event by ID\n- Media\n  - Send media to a chat room\n- Message\n  - Send a message to a room\n  - Gets all messages from a room\n- Room\n  - New chat room with defined settings\n  - Invite a user to a room\n  - Join a new room\n  - Kick a user from a room\n  - Leave a room\n- Room Member\n  - Get all members\n\n## Templates and examples [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.matrix/\\#templates-and-examples \"Permanent link\")\n\n[Browse Matrix integration templates](https://n8n.io/integrations/matrix/), or [search all templates](https://n8n.io/workflows/)\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.matrix/","title":"Matrix node documentation | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0e654909-5b31-42b1-b620-a23ff2fdd31f","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.matrix/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Learn how to use the Matrix node in n8n. Follow technical documentation to integrate Matrix node into your workflows.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}},{"markdown":"[Skip to content](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/#google-drive-shared-drive-operations)\n\n[Edit this page](https://github.com/n8n-io/n8n-docs/edit/main/docs/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations.md \"Edit this page\")\n\n# Google Drive Shared Drive operations [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#google-drive-shared-drive-operations \"Permanent link\")\n\nUse this operation to create, delete, get, and update shared drives in Google Drive. Refer to [Google Drive](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/) for more information on the Google Drive node itself.\n\nThis node can be used as an AI tool\n\nThis node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the [AI tool parameters documentation](https://docs.n8n.io/advanced-ai/examples/using-the-fromai-function/).\n\n## Create a shared drive [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#create-a-shared-drive \"Permanent link\")\n\nUse this operation to create a new shared drive.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Drive credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Shared Drive**.\n- **Operation**: Select **Create**.\n- **Name**: The name to use for the new shared drive.\n\n### Options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#options \"Permanent link\")\n\n- **Capabilities**: The capabilities to set for the new shared drive (see [REST Resources: drives \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v3/drives) for more details):\n  - **Can Add Children**: Whether the current user can add children to folders in this shared drive.\n  - **Can Change Copy Requires Writer Permission Restriction**: Whether the current user can change the `copyRequiresWriterPermission` restriction on this shared drive.\n  - **Can Change Domain Users Only Restriction**: Whether the current user can change the `domainUsersOnly` restriction on this shared drive.\n  - **Can Change Drive Background**: Whether the current user can change the background on this shared drive.\n  - **Can Change Drive Members Only Restriction**: Whether the current user can change the `driveMembersOnly` restriction on this shared drive.\n  - **Can Comment**: Whether the current user can comment on files in this shared drive.\n  - **Can Copy**: Whether the current user can copy files in this shared drive.\n  - **Can Delete Children**: Whether the current user can delete children from folders in this shared drive.\n  - **Can Delete Drive**: Whether the current user can delete this shared drive. This operation may still fail if there are items not in the trash in the shared drive.\n  - **Can Download**: Whether the current user can download files from this shared drive.\n  - **Can Edit**: Whether the current user can edit files from this shared drive.\n  - **Can List Children**: Whether the current user can list the children of folders in this shared drive.\n  - **Can Manage Members**: Whether the current user can add, remove, or change the role of members of this shared drive.\n  - **Can Read Revisions**: Whether the current user can read the revisions resource of files in this shared drive.\n  - **Can Rename Drive**: Whether the current user can rename this shared drive.\n  - **Can Share**: Whether the current user can share files or folders in this shared drive.\n  - **Can Trash Children**: Whether the current user can trash children from folders in this shared drive.\n- **Color RGB**: The color of this shared drive as an RGB hex string.\n- **Hidden**: Whether to hide this shared drive in the default view.\n- **Restrictions**: Restrictions to add to this shared drive (see [REST Resources: drives \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v3/drives) for more details):\n  - **Admin Managed Restrictions**: When enabled, restrictions here will override the similarly named fields to true for any file inside of this shared drive.\n  - **Copy Requires Writer Permission**: Whether the options to copy, print, or download files inside this shared drive should be disabled for readers and commenters.\n  - **Domain Users Only**: Whether to restrict access to this shared drive and items inside this shared drive to users of the domain to which this shared drive belongs.\n  - **Drive Members Only**: Whether to restrict access to items inside this shared drive to its members.\n\nRefer to the [Method: drives.insert \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v2/drives/insert) API documentation for more information.\n\n## Delete a shared drive [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#delete-a-shared-drive \"Permanent link\")\n\nUse this operation to delete a shared drive.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Drive credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Shared Drive**.\n- **Operation**: Select **Delete**.\n- **Shared Drive**: Choose the shared drive want to delete.\n  - Select **From list** to choose the title from the dropdown list, **By URL** to enter the URL of the drive, or **By ID** to enter the `driveId`.\n  - You can find the `driveId` in the URL for the shared Google Drive: `https://drive.google.com/drive/u/0/folders/driveID`.\n\nRefer to the [Method: drives.delete \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v2/drives/delete) API documentation for more information.\n\n## Get a shared drive [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#get-a-shared-drive \"Permanent link\")\n\nUse this operation to get a shared drive.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Drive credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Shared Drive**.\n- **Operation**: Select **Get**.\n- **Shared Drive**: Choose the shared drive want to get.\n  - Select **From list** to choose the title from the dropdown list, **By URL** to enter the URL of the drive, or **By ID** to enter the `driveId`.\n  - You can find the `driveId` in the URL for the shared Google Drive: `https://drive.google.com/drive/u/0/folders/driveID`.\n\n### Options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#options_1 \"Permanent link\")\n\n- **Use Domain Admin Access**: Whether to issue the request as a domain administrator. When enabled, grants the requester access if they're an administrator of the domain to which the shared drive belongs.\n\nRefer to the [Method: drives.get \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v2/drives/get) API documentation for more information.\n\n## Get many shared drives [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#get-many-shared-drives \"Permanent link\")\n\nUse this operation to get many shared drives.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Drive credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Shared Drive**.\n- **Operation**: Select **Get Many**.\n- **Return All**: Choose whether to return all results or only up to a given limit.\n- **Limit**: The maximum number of items to return when **Return All** is disabled.\n- **Shared Drive**: Choose the shared drive want to get.\n  - Select **From list** to choose the title from the dropdown list, **By URL** to enter the URL of the drive, or **By ID** to enter the `driveId`.\n  - You can find the `driveId` in the URL for the shared Google Drive: `https://drive.google.com/drive/u/0/folders/driveID`.\n\n### Options [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#options_2 \"Permanent link\")\n\n- **Query**: The query string to use to search for shared drives. See [Search for shared drives \\| Google Drive](https://developers.google.com/drive/api/guides/search-shareddrives) for more information.\n- **Use Domain Admin Access**: Whether to issue the request as a domain administrator. When enabled, grants the requester access if they're an administrator of the domain to which the shared drive belongs.\n\nRefer to the [Method: drives.get \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v2/drives/get) API documentation for more information.\n\n## Update a shared drive [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#update-a-shared-drive \"Permanent link\")\n\nUse this operation to update a shared drive.\n\nEnter these parameters:\n\n- **Credential to connect with**: Create or select an existing [Google Drive credentials](https://docs.n8n.io/integrations/builtin/credentials/google/).\n- **Resource**: Select **Shared Drive**.\n- **Operation**: Select **Update**.\n- **Shared Drive**: Choose the shared drive you want to update.\n  - Select **From list** to choose the drive from the dropdown list, **By URL** to enter the URL of the drive, or **By ID** to enter the `driveId`.\n  - You can find the `driveId` in the URL for the shared Google Drive: `https://drive.google.com/drive/u/0/folders/driveID`.\n\n### Update Fields [\\#](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/\\#update-fields \"Permanent link\")\n\n- **Color RGB**: The color of this shared drive as an RGB hex string.\n- **Name**: The updated name for the shared drive.\n- **Restrictions**: Restrictions for this shared drive (see [REST Resources: drives \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v3/drives) for more details):\n  - **Admin Managed Restrictions**: When enabled, restrictions here will override the similarly named fields to true for any file inside of this shared drive.\n  - **Copy Requires Writer Permission**: Whether the options to copy, print, or download files inside this shared drive should be disabled for readers and commenters.\n  - **Domain Users Only**: Whether to restrict access to this shared drive and items inside this shared drive to users of the domain to which this shared drive belongs.\n  - **Drive Members Only**: Whether to restrict access to items inside this shared drive to its members.\n\nRefer to the [Method: drives.update \\| Google Drive](https://developers.google.com/drive/api/reference/rest/v2/drives/update) API documentation for more information.\n\nWas this page helpful?\n\n\n\n\n\n\nThanks for your feedback!\n\n\n\n\n\n\nThanks for your feedback! Help us improve this page by submitting an issue or a fix in our [GitHub repo](https://github.com/n8n-io/n8n-docs).\n\n\nBack to top","metadata":{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/","title":"Google Drive Shared Drive operations | n8n Docs ","favicon":"https://docs.n8n.io/_images/favicon.ico","language":"en","scrapeId":"0e7c0710-06ac-4ade-8f3d-d20f78ac7da0","viewport":"width=device-width,initial-scale=1","generator":"mkdocs-1.6.1, mkdocs-material-9.6.2+insiders-4.53.15","proxyUsed":"basic","sourceURL":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/shared-drive-operations/","statusCode":200,"contentType":"text/html; charset=UTF-8","description":"Documentation for the Shared Drive operations in Google Drive node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information.","ahrefs-site-verification":"b13556bca44be7ae858f67ddbdd71eaa177d9389a88eb295244299a87292d60a"}}],"next":"https://api.firecrawl.dev/v1/crawl/6cd9b912-bf11-498d-8f31-197aaf8efa1c?skip=20","total":467,"status":"scraping","success":true,"completed":20,"expiresAt":"2025-06-06T16:09:41.000Z","creditsUsed":467}}]},"settings":{"executionOrder":"v1"},"versionId":"c3f351d9-a5ae-4a18-9d2d-fc28242e81d3","connections":{"If":{"main":[[{"node":"10 Seconds","type":"main","index":0}],[{"node":"Convert to File","type":"main","index":0}]]},"Code":{"main":[[{"node":"Extract JSON","type":"main","index":0}]]},"OpenAI":{"main":[[{"node":"Code","type":"main","index":0}]]},"30 Secs":{"main":[[{"node":"Get Results","type":"main","index":0}]]},"Extract":{"main":[[{"node":"30 Secs","type":"main","index":0}]]},"SerpAPI":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Set URL":{"main":[[{"node":"Extract","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"OpenAI","type":"main","index":0}]]},"10 Seconds":{"main":[[{"node":"Get Results","type":"main","index":0}]]},"Get Results":{"main":[[{"node":"If","type":"main","index":0}]]},"Extract JSON":{"main":[[{"node":"Convert to JSON File","type":"main","index":0}]]},"Convert to File":{"main":[[{"node":"Train Pinecone Vector Store","type":"main","index":0}]]},"Set Preferences":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Pinecone Vector Store","type":"ai_embedding","index":0}]]},"Embeddings OpenAI2":{"ai_embedding":[[{"node":"Train Pinecone Vector Store","type":"ai_embedding","index":0}]]},"Convert to JSON File":{"main":[[]]},"Default Data Loader1":{"ai_document":[[{"node":"Train Pinecone Vector Store","type":"ai_document","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Pinecone Vector Store":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Recursive Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader1","type":"ai_textSplitter","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Set URL","type":"main","index":0}]]}}}


name: Generate AI Avatar Videos with HeyGen and Google Sheets Integration
author_name: Sagar
author_username: sagarmasand9
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-06-18T16:47:19.959Z
updated_at: 2025-06-18T16:47:19.959Z
url: https://n8n.io/workflows/5027
scraped_at: 2025-07-06 21:16:30
description:
  This template streamlines your AI Avatar Video Automation workflow by connecting Google sheets for Voice Text & AI Avatar Video Link storage, using HTTP Nodes for connecting Heygen API & AI Avatar/Voice Id for automated Video generation.

  Pre-requisites
  Before setting up this workflow, ensure you have:

  A Google account with access to Google Sheets

  A Heygen Account with API access in account's settings.



  n8n.io account with workflow access

  Setup Instructions

  Configure Data Source
  Create a Google Sheet with the following columns: Script/Voice Text & Final AI Avatar Video Link.

  Connect Google Sheet
  Add your Google sheet credentials in the “Google Sheet” node
  Specify the folder path where your columns are stored.

  Configure the node to retrieve files based on filenames from your Google Sheet

  Set Up HTTP Node with Heygen API Credentials

  Configure the node to generate AI Video based on Script/Voice Text.


  Configure HTTP Node 2
  Connect Heygen API Credentials
  Set up the API node to Get the AI Avatar Video Link.

  then finally setup Google sheet node again to get & upload the final AI Avatar video link in the column "the Final AI Avatar Video Link"

  Workflow Automation Setup
  Configure the scheduler node to run at your preferred frequency
  Set up error handling to notify you of any posting failures


  Execution Instructions
  After completing all connections, test the workflow.

  Monitor the execution in the n8n dashboard to ensure proper functioning

  View the “Executions” tab to track successful  and troubleshoot any errors.

  This template saves hours of manual AI Avatar video Creation Process. use this without the daily manual effort.


  Details
  Nodes used in workflow
  Manual Trigger Node
  Google Sheet Node 1
  HTTP Node 1
  HTTP Node 2
  Google Sheets Node 2

workflow_json:
  {"meta":{"instanceId":"de145373c7ed10b34e35f8898916fdf37d53e7782c6f05bbe7b831e31042db96","templateCredsSetupCompleted":true},"nodes":[{"id":"43bde8be-dd80-43d5-93fa-bbed038d1fc0","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-660,80],"parameters":{},"typeVersion":1},{"id":"6530a519-264d-41ef-87db-280c425f481f","name":"Get Video","type":"n8n-nodes-base.httpRequest","position":[440,80],"parameters":{"url":"https://api.heygen.com/v2/avatar/avatar_id/details","options":{},"sendHeaders":true,"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"video_id","value":"={{ $json.data.video_id }}"}]}},"credentials":{"httpHeaderAuth":{"id":"hHUxPUb01H0Ij0se","name":"Header Auth account"}},"typeVersion":4.2},{"id":"dcc4ed71-81da-4fe2-a865-cdda8a81ab2d","name":"creating Video","type":"n8n-nodes-base.httpRequest","position":[80,80],"parameters":{"url":"https://api.heygen.com/v2/video/generate","method":"POST","options":{},"jsonBody":"{\n  \"video_inputs\": [\n    {\n      \"character\": {\n        \"type\": \"avatar\",\n        \"avatar_id\": \"84c521ab0e4b4527a33423e1b813ea0c\",\n        \"avatar_style\": \"normal\"\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": \"hey, this is sagar and it is my avatar\",\n        \"voice_id\": \"2aa0fed15bbf424bb3a4f9c9537ab058\",\n        \"speed\": 1.1\n      }\n    }\n  ],\n  \"dimension\": {\n    \"width\": 1280,\n    \"height\": 720\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"accept","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"hHUxPUb01H0Ij0se","name":"Header Auth account"}},"typeVersion":4.2},{"id":"5c6f7c73-3301-4e62-9cc2-1a4181e03fd4","name":"Google Sheets","type":"n8n-nodes-base.googleSheets","position":[-280,80],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit#gid=0","cachedResultName":"New Script Uploaded"},"documentId":{"__rl":true,"mode":"list","value":"1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit?usp=drivesdk","cachedResultName":"New Script"}},"credentials":{"googleSheetsOAuth2Api":{"id":"K7LQI1nT7J8NyxSW","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"3f5f9b1d-7854-4814-b0af-8b630032e00f","name":"Google Sheets1","type":"n8n-nodes-base.googleSheets","position":[820,80],"parameters":{"columns":{"value":{"Final Video":"={{ $json.data.video_url }}"},"schema":[{"id":"New Script","type":"string","display":true,"removed":true,"required":false,"displayName":"New Script","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Final Video","type":"string","display":true,"removed":false,"required":false,"displayName":"Final Video","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["New Script"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit#gid=0","cachedResultName":"New Script Uploaded"},"documentId":{"__rl":true,"mode":"list","value":"1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1xqIDGIYCCHlZyfWYMMHBisz4YggRKycygWzBfYaYI08/edit?usp=drivesdk","cachedResultName":"New Script"}},"credentials":{"googleSheetsOAuth2Api":{"id":"K7LQI1nT7J8NyxSW","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"eb08b935-e956-4756-9fd5-b0a196524535","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-720,260],"parameters":{"color":4,"width":255,"height":239,"content":"👈\nSet up Manual Trigger Node.\n\nthis trigger will be activated.\n\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"},"typeVersion":1},{"id":"b372533b-4de6-48d1-bb53-3a1a364da590","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-720,-100],"parameters":{"color":3,"width":272,"height":140,"content":"### Your AI Avatar Videos Automation Agent with Google Sheets, HTTP Nodes (Easy to set-up in 5 steps only)"},"typeVersion":1},{"id":"f0de3751-d50f-4ca6-b2e4-0e9c38d21557","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[0,260],"parameters":{"color":5,"width":275,"height":359,"content":"👈\nSet up HTTP Node.\n\nMethod : Post\nURL : https://api.heygen.com/v2/video/generate\n\nFor Set up Authentication credentials (open & check the node parameters.)\n\nThis node will create AI Video with your video id and voice id using json code.\n\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"},"typeVersion":1},{"id":"cab8d398-fe34-4f64-b325-fe6ce1ad8406","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-360,260],"parameters":{"width":275,"height":279,"content":"👈\nSet up Google Sheets Node.\n\nSet up credentials.\n\nCreate a new sheet in Google Sheets (e.g., AI Avatar Script).\n\nCreate 2 columns: Script/voice text, Final Video Link.\n\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"},"typeVersion":1},{"id":"e046ae61-1f98-4eff-8a6a-d445623520d7","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[360,260],"parameters":{"color":3,"width":275,"height":359,"content":"👈\nSet up HTTP Node.\n\nuse given cURL json code.\n\nMethod : Get\nURL : https://api.heygen.com/v2/avatar/avatar_id/details\n\nFor Set up Authentication credentials (open & check the node parameters.)\n\nput parameter name: video-id  & paste value: video_id from past http node. his node will create AI Video with your video id and voice id using json code.\n\n\nOutput : Your AI Avatar Video Link\nFollow the steps (YouTube video): https://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL\n"},"typeVersion":1},{"id":"99a5275c-3f72-4a75-94eb-276e620a6545","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[740,260],"parameters":{"width":275,"height":359,"content":"👈\nSet up Google Sheets Node.\n\nSet up credentials.\n\nuse given sheet in Google Sheets (e.g., AI Avatar Script).\n\nconnect the sheet parametr with Your AI Avatar Video Link in the - Final Video Link.\n\nOutput your AI Avatar video link will be uploaded in your google sheet - just open the sheet and download the video.\nFollow the steps (YouTube video):\nhttps://youtu.be/llm60n03x3c?si=vO4jU6EZms-ZpDvL"},"typeVersion":1}],"pinData":{},"connections":{"Get Video":{"main":[[{"node":"Google Sheets1","type":"main","index":0}]]},"Google Sheets":{"main":[[{"node":"creating Video","type":"main","index":0}]]},"creating Video":{"main":[[{"node":"Get Video","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Google Sheets","type":"main","index":0}]]}}}


name: Basic RAG chat
author_name: JustinLee
author_username: justin
categories: []
created_at: 2025-06-18T16:55:03.909Z
updated_at: 2025-06-18T16:55:03.909Z
url: https://n8n.io/workflows/5028
scraped_at: 2025-07-06 21:16:30
description:
  This workflow demonstrates a simple Retrieval-Augmented Generation (RAG) pipeline in n8n, split into two main sections:

  🔹 Part 1: Load Data into Vector Store
  Reads files from disk (or Google Drive).

  Splits content into manageable chunks using a recursive text splitter.

  Generates embeddings using the Cohere Embedding API.

  Stores the vectors into an In-Memory Vector Store (for simplicity; can be replaced with Pinecone, Qdrant, etc.).

  🔹 Part 2: Chat with the Vector Store
  Takes user input from a chat UI or trigger node.

  Embeds the query using the same Cohere embedding model.

  Retrieves similar chunks from the vector store via similarity search.

  Uses Groq-hosted LLM to generate a final answer based on the context.

  🛠️ Technologies Used:
  📦 Cohere Embedding API

  ⚡ Groq LLM for fast inference

  🧠 n8n for orchestrating and visualizing the flow

  🧲 In-Memory Vector Store (for prototyping)

  🧪 Usage:
  Upload or point to your source documents.

  Embed them and populate the vector store.

  Ask questions through the chat trigger node.

  Receive context-aware responses based on retrieved content.

nodes_used:
  ["@n8n/n8n-nodes-langchain.chainRetrievalQa","@n8n/n8n-nodes-langchain.embeddingsCohere","@n8n/n8n-nodes-langchain.retrieverVectorStore","@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","@n8n/n8n-nodes-langchain.vectorStoreInMemory","@n8n/n8n-nodes-langchain.documentDefaultDataLoader","@n8n/n8n-nodes-langchain.lmChatGroq"]

workflow_json:
  {"nodes":[{"id":"3bc2f88b-c14e-4ee5-84ce-dc16a54aa12b","name":"Recursive Character Text Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","position":[-580,320],"parameters":{"options":{"splitCode":"markdown"},"chunkOverlap":50},"typeVersion":1},{"id":"6bd91468-17db-4918-a232-87fb295a30c2","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1240,-140],"parameters":{"color":7,"width":978.0454109366399,"height":806.6556079800943,"content":"### Load data into database\nFetch file from Google Drive, split it into chunks and insert into Pinecone index"},"typeVersion":1},{"id":"3af4e8e9-0503-470e-b449-4551191fb405","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[0,-160],"parameters":{"color":7,"width":795.4336844920119,"height":849.4411596574598,"content":"### Chat with database\nEmbed the incoming chat message and use it retrieve relevant chunks from the vector store. These are passed to the model to formulate an answer "},"typeVersion":1},{"id":"6f94ec58-4fca-40ee-a1a0-012998093589","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[-580,200],"parameters":{"options":{},"dataType":"binary"},"typeVersion":1},{"id":"3e145342-458d-4222-a707-9fee78e91c4d","name":"Question and Answer Chain","type":"@n8n/n8n-nodes-langchain.chainRetrievalQa","position":[60,-20],"parameters":{"options":{}},"typeVersion":1.2},{"id":"7f2b288a-a002-4cd3-93c0-b2a0e491699c","name":"Vector Store Retriever","type":"@n8n/n8n-nodes-langchain.retrieverVectorStore","position":[240,200],"parameters":{},"typeVersion":1},{"id":"ca930ba7-b45d-47d8-9f36-9db3a25ee77a","name":"When clicking 'Test Workflow' button","type":"n8n-nodes-base.manualTrigger","position":[-1420,-20],"parameters":{},"typeVersion":1},{"id":"90782052-5df2-4f1e-84fc-c47095a81852","name":"When clicking 'Chat' button below","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-140,-20],"webhookId":"066b342b-f2b6-401e-b560-12f5d23b6103","parameters":{},"typeVersion":1},{"id":"712dc9d3-af2d-4436-9315-78f66f748b91","name":"Read/Write Files from Disk","type":"n8n-nodes-base.readWriteFile","position":[-1200,-20],"parameters":{"options":{},"fileSelector":"/tmp/external_data/news.txt"},"typeVersion":1,"alwaysOutputData":true},{"id":"1cd768c1-fcc0-480a-8b33-fbe714788b32","name":"In-Memory Vector Store1","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","position":[240,380],"parameters":{},"typeVersion":1},{"id":"2393e667-7e4f-4392-9a7e-b2b4d74d46e8","name":"In-Memory Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","position":[-980,-20],"parameters":{"mode":"insert","clearStore":true},"typeVersion":1},{"id":"e53f51f3-04f3-46ef-aebd-e0b32b415101","name":"Embeddings Cohere","type":"@n8n/n8n-nodes-langchain.embeddingsCohere","position":[-940,300],"parameters":{"modelName":"embed-multilingual-v3.0"},"credentials":{"cohereApi":{"id":"rXh87ikYuJfDKuCk","name":"CohereApi account"}},"typeVersion":1},{"id":"cf1333b6-b69b-4ff1-bfc3-d3d579585efb","name":"Groq Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGroq","notes":"使用繁體中文","position":[100,220],"parameters":{"model":"llama-3.3-70b-versatile","options":{}},"credentials":{"groqApi":{"id":"dznjL979E8j0L4Zc","name":"Groq account"}},"typeVersion":1},{"id":"e49cfb2e-5eca-4b43-973d-4bf7285b5d94","name":"Embeddings Cohere1","type":"@n8n/n8n-nodes-langchain.embeddingsCohere","position":[340,560],"parameters":{"modelName":"embed-multilingual-v3.0"},"credentials":{"cohereApi":{"id":"rXh87ikYuJfDKuCk","name":"CohereApi account"}},"typeVersion":1}],"connections":{"Groq Chat Model":{"ai_languageModel":[[{"node":"Question and Answer Chain","type":"ai_languageModel","index":0}]]},"Embeddings Cohere":{"ai_embedding":[[{"node":"In-Memory Vector Store","type":"ai_embedding","index":0}]]},"Embeddings Cohere1":{"ai_embedding":[[{"node":"In-Memory Vector Store1","type":"ai_embedding","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"In-Memory Vector Store","type":"ai_document","index":0}]]},"Vector Store Retriever":{"ai_retriever":[[{"node":"Question and Answer Chain","type":"ai_retriever","index":0}]]},"In-Memory Vector Store1":{"ai_vectorStore":[[{"node":"Vector Store Retriever","type":"ai_vectorStore","index":0}]]},"Read/Write Files from Disk":{"main":[[{"node":"In-Memory Vector Store","type":"main","index":0}]]},"Recursive Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader","type":"ai_textSplitter","index":0}]]},"When clicking 'Chat' button below":{"main":[[{"node":"Question and Answer Chain","type":"main","index":0}]]},"When clicking 'Test Workflow' button":{"main":[[{"node":"Read/Write Files from Disk","type":"main","index":0}]]}}}


name: AI Text-to-Image for Telegram (Gemini + Hugging Face FLUX)
author_name: Malik Hashir
author_username: malikx
categories: []
created_at: 2025-06-18T19:49:11.964Z
updated_at: 2025-06-18T19:49:11.964Z
url: https://n8n.io/workflows/5031
scraped_at: 2025-07-06 21:16:30
description:
  Turn text prompts into stunning AI-generated images—automatically!

  What it does?

  This workflow lets your Telegram bot:

  Receive a user’s image description (e.g., "a cyberpunk cat wearing sunglasses").
  Refine the prompt using AI (Gemini/OpenAI) for better results.
  Generate the image via Hugging Face’s free API (no costs!).
  Send the final image back to the user—all in seconds!

  How It Works?
  Telegram Trigger**
  Listens for user messages (e.g., “/image a futuristic cityscape”).

  AI Prompt Refinement**
  Uses Google Gemini (or OpenAI) to optimize the input for the image model.

  AI Image Generation**
  Calls Hugging Face’s Together API (free tier) to create the image.
  Supports models like black-forest-labs/FLUX.1-schnell.

  Auto-Delivery**
  Downloads the image and sends it in the Telegram chat.

  Setup Guide (3 Minutes!)

  1. Prerequisites

  An n8n instance (cloud/self-hosted).
  A Telegram bot token (get it from @BotFather).
  A Hugging Face API token (free: https://huggingface.co/).

  2. Installation

  Import the JSON template into n8n.
  Replace placeholders:
  Telegram API token (in the Telegram nodes).
  Hugging Face API token (in the HTTP Request node).

  (Optional) Swap Gemini for OpenAI if preferred.

  3. Done!

  Activate the workflow—your bot is now ready to create stunning images! Simply send a command like:
  “Hey, generate an image of a warrior standing on top of a mountain.”

  You can keep your prompt casual or get as detailed as you like. The AI will interpret your request and craft a full, descriptive prompt for image generation. For example:
  “Generate an image of a warrior wearing tattered clothes, chest out, standing on a snowy mountain.”

  Why Use This Template?
  100% Free – Uses Hugging Face’s free tier (no OpenAI costs).
  No Coding – Fully visual n8n workflow.
  Customizable – Swap AI models (Gemini/OpenAI) or image APIs.
  Instant Results – Users get images in seconds.

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.telegram","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatGoogleGemini"]

workflow_json:
  {"meta":{"instanceId":"d04643ba872bb0fb252ed2c8197858d58cc47dd3c15ff6d08b19addd679e927b","templateCredsSetupCompleted":true},"nodes":[{"id":"c81aef50-92fc-461e-9dae-45fb936f1fb6","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","position":[-460,-220],"webhookId":"1eb2042d-f833-49eb-b69c-115cf5c4e729","parameters":{},"typeVersion":1.2},{"id":"c753e481-79f5-4171-a7db-895c423154a2","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-180,-220],"parameters":{},"typeVersion":1.9},{"id":"2fda98bd-bc78-45dd-ad82-047904965df1","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[-80,80],"parameters":{},"typeVersion":1},{"id":"f69e1aee-4bce-4eaf-afce-0dcff517e779","name":"Telegram","type":"n8n-nodes-base.telegram","position":[1060,-180],"webhookId":"12236037-3950-42b7-9121-83076bcb24f7","parameters":{},"typeVersion":1.2},{"id":"f0fc7c0c-609b-4714-be3e-40423a1a5e9f","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-580,-500],"parameters":{"content":""},"typeVersion":1},{"id":"6031ea65-9875-4c7c-ac8c-812546c0bd08","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-200,0],"parameters":{"content":""},"typeVersion":1},{"id":"435da6ad-401f-4912-b943-4d93722e696e","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[180,-700],"parameters":{"content":""},"typeVersion":1},{"id":"fcccddcb-6af2-4a88-99c6-c43077527d2f","name":"HTTP Request (Huggingface)","type":"n8n-nodes-base.httpRequest","position":[540,-180],"parameters":{},"typeVersion":4.2},{"id":"15aab548-038b-4349-9233-4c7ed03ea843","name":"HTTP Request(download_image)","type":"n8n-nodes-base.httpRequest","position":[840,-180],"parameters":{},"typeVersion":4.2}],"pinData":{},"connections":{"AI Agent":{"main":[[{"node":"HTTP Request (Huggingface)","type":"main","index":0}]]},"Telegram Trigger":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"HTTP Request (Huggingface)":{"main":[[{"node":"HTTP Request(download_image)","type":"main","index":0}]]},"HTTP Request(download_image)":{"main":[[{"node":"Send Image (back to the chat via telegram)","type":"main","index":0}]]}}}


name: Create AI Generated Videos 4x cheaper than veo3 with Google Sheets & Fal.AI
author_name: Maximiliano Rojas-Delgado
author_username: maxr
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","@n8n/n8n-nodes-langchain.openAi"]
categories: []
created_at: 2025-06-18T22:02:00.703Z
updated_at: 2025-06-18T22:02:00.703Z
url: https://n8n.io/workflows/5034
scraped_at: 2025-07-06 21:16:30
description:
  Turn Your Ideas into Videos—Right from Google Sheets!

  This workflow helps you make cool 5-second videos using Fal.AI and Kling 2.1, just by typing your idea into a Google Sheet. You can even choose if you want your video to have sound or not. It’s super easy—no tech skills needed! 

  And the best?
  4x Cheaper than Veo3 model with similar quality!

  Why use this?

  Just type your idea in a sheet—no fancy tools or uploads.

  Get a video link back in the same sheet.

  Works with or without sound—your choice!

  How does it work?

  You write your idea, pick the video shape, and say if you want sound (true or false) in the Google Sheet.

  n8n reads your idea and asks Fal.AI to make your video.

  When your video is ready, the link shows up in your sheet.

  What do you need?

  A Google account and Google Sheets connected with service account (check this link for reference)

  A copy of the following Google Spreadsheet:
  Spreadsheet to copy

  An OpenAI API key

  A Fal.AI account with some money in it

  That’s it! Just add your ideas and let the workflow make the videos for you. Have fun creating!

  if you have any questions, just contact me at max@nervoai.com

workflow_json:
  {"id":"wGQOrU5qak5K99FT","meta":{"instanceId":"d59922ccaab8f9a216dbe3eacc226c7a17998a61f6c4177822cd8e33edb224d7"},"name":"Create AI Generated Videos 4x cheaper than veo3 with Google Sheets & Fal.AI","tags":[{"id":"I8yfdg9mSqeqo4nX","name":"creator","createdAt":"2025-06-11T19:44:30.157Z","updatedAt":"2025-06-11T19:44:30.157Z"},{"id":"fElGhCk9TINqseuM","name":"templates","createdAt":"2025-06-11T19:44:28.283Z","updatedAt":"2025-06-11T19:44:28.283Z"}],"nodes":[{"id":"7beb408f-128b-4e4c-8d03-e5625fbcb2eb","name":"Wait 5s","type":"n8n-nodes-base.wait","position":[340,620],"webhookId":"150069ed-885b-497f-a32a-09e7088136e6","parameters":{},"typeVersion":1.1},{"id":"77d6a74f-b704-40f2-b054-fbf91c93726a","name":"Check if video is ready","type":"n8n-nodes-base.if","position":[160,620],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ac50759b-e2f3-4efd-a2af-f28b7d209b45","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.status }}","rightValue":"COMPLETED"}]}},"typeVersion":2.2},{"id":"cd94d480-3562-4ce3-aff0-9caf5dee9f72","name":"Get video url","type":"n8n-nodes-base.httpRequest","position":[20,940],"parameters":{"url":"={{ $json.response_url }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"Key <YOUR_API_KEY>"}]}},"typeVersion":4.2},{"id":"a5864945-030e-4d80-83cb-2f558399d8bf","name":"Submit Request to generate video","type":"n8n-nodes-base.httpRequest","position":[340,300],"parameters":{"url":"https://queue.fal.run/fal-ai/kling-video/v2.1/master/text-to-video","method":"POST","options":{},"jsonBody":"={\n  \"prompt\": \"{{ $json.prompt }}\",\n  \"aspect_ratio\": \"9:16\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"},{"name":"authorization","value":"Key <YOUR_API_KEY>"}]}},"typeVersion":4.2},{"id":"00f339c8-f6e3-42b3-aa56-abe34268c68a","name":"Set variables for Video generation","type":"n8n-nodes-base.set","position":[0,300],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4807c116-ed98-4a0e-8dba-aab1dd2ee971","name":"prompt","type":"string","value":"={{ $json.message.content }}"},{"id":"32437b05-fa7a-4f3b-bad0-fc7201cc7371","name":"ratio","type":"string","value":"={{ $('Google Sheets Trigger').item.json.Ratio }}"}]}},"typeVersion":3.4},{"id":"88429b78-fe9f-42ca-81e1-0b364703ab2a","name":"Check video status","type":"n8n-nodes-base.httpRequest","position":[0,620],"parameters":{"url":"=https://queue.fal.run/fal-ai/kling-video/requests/{{ $json.request_id }}/status","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"Key <YOUR_API_KEY>"}]}},"typeVersion":4.2},{"id":"26e74f30-575f-407a-99ee-f75daad9a2e4","name":"Google Sheets Trigger","type":"n8n-nodes-base.googleSheetsTrigger","position":[0,-20],"parameters":{"event":"rowAdded","options":{},"pollTimes":{"item":[{"mode":"everyMinute"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1VGhoJU-qHzav53pTUSPtX6PNVPrRp9e38E34AmHoWvg/edit#gid=0","cachedResultName":"Results"},"documentId":{"__rl":true,"mode":"list","value":"1VGhoJU-qHzav53pTUSPtX6PNVPrRp9e38E34AmHoWvg","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1VGhoJU-qHzav53pTUSPtX6PNVPrRp9e38E34AmHoWvg/edit?usp=drivesdk","cachedResultName":"Instantly create Kling 2.1 AI Generated Videos 4x cheaper than veo3"}},"credentials":{"googleSheetsTriggerOAuth2Api":{"id":"CUMqe7iFy7F1KIF9","name":"Google Sheets account NervoAI"}},"typeVersion":1},{"id":"57f0306d-3b12-4717-afc6-c548863c2f7f","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-900,-120],"parameters":{"color":5,"width":820,"height":1220,"content":"## Create AI Generated Videos 4x cheaper than veo3 with Google Sheets & Fal.AI\n\nEasily generate 5-second videos using Fal.AI’s Kling 2.1 model—just add a row to your Google Sheet with your idea, the video ratio, and whether you want audio (true/false).\n\nHere’s what Fal.AI charges:\n\n1s video: $0.28\n\n5s video (default): $1.40\n\nHere are the execution times:\n\n5s video (default): 6 minutes\n\n**Step 1: Connect Google Sheets**\n\nAdd your Google service account credentials and make sure Google Sheets API is enabled in your Google Cloud project.\n\nCopy the shared template sheet in the description.\nif you can't find it, you need to create a sheet with the following columns:\n- Idea\n- Ratio\n- Prompt Generated\n- Video Generated\n\nDouble-check that your n8n Google Sheets nodes are linked to the correct spreadsheet.\n\n**Step 2: Connect OpenAI**\n\nGet your OpenAI API key.\n\nAdd your OpenAI credentials in n8n.\n\n**Step 3: Set Up Fal.ai**\n\nSign up at fal.ai and top up your account.\n\nGrab your API key from the Fal.ai dashboard.\n\nIn n8n, update the \"Submit Request to generate video,\" \"Check video status,\" and \"Get video url\" nodes. Replace the authorization header with your API key: 'Key <YOUR_API_KEY>'\n\n**Step 4: View Results in the Sheet**\n\nOnce your sheet updates, you’ll see the prompt used and the video URL.\n\n** Troubleshoot**\nIf the “Audio” column shows as a boolean instead of text and gives error generating the video, enter it as '=\"true\"' or '=\"false\"' in the spreadsheet.\n\nif any other issue, please contact me at max@nervoai.com\n\n\nThat’s it! You’re ready to create Veo 3 videos straight from Google Sheets.\n"},"typeVersion":1},{"id":"774b9b76-4cd8-4d5a-8b8b-587ee1cae464","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-40,-140],"parameters":{"color":3,"width":540,"height":300,"content":"## Stage 1: Trigger & Prompt Generation\nStarts the workflow when a new row is added in Google Sheets, then when the workflow is actioned, it generates a prompt for the Kling 2.1 video model based on the sheet data."},"typeVersion":1},{"id":"169699a3-6208-4586-8c3c-a3df7f3cdaf2","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-40,180],"parameters":{"color":6,"width":540,"height":300,"content":"## Stage 2: Prepare & Submit Video Request\nSets up all necessary variables for video creation and sends a request to Fal.AI to generate the video."},"typeVersion":1},{"id":"739cdf63-5e11-4364-b4f8-3b65e962ce3e","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-40,500],"parameters":{"width":540,"height":300,"content":"## Stage 3: Monitor Video Status\nChecks the status of the video generation. Waits and repeatedly checks every 5 seconds until the video is ready."},"typeVersion":1},{"id":"49c27097-de0e-4516-8ee0-8936507d7455","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-40,820],"parameters":{"color":4,"width":540,"height":300,"content":"## Stage 4: Retrieve & Update Results\nGets the final video URL and updates the Google Sheet with the video link and the prompt used."},"typeVersion":1},{"id":"9dc75bc3-25a7-4c3c-bb65-8372acb2703b","name":"Update sheet with video url and prompt used in Kling 2.1","type":"n8n-nodes-base.googleSheets","position":[340,940],"parameters":{"columns":{"value":{"Idea":"={{ $('Google Sheets Trigger').item.json.Idea }}","Video Generated":"={{ $json.video.url }}","Prompt Generated":"={{ $('Generate prompt for Kling 2.1 model').item.json.message.content }}"},"schema":[{"id":"Idea","type":"string","display":true,"removed":false,"required":false,"displayName":"Idea","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Ratio","type":"string","display":true,"required":false,"displayName":"Ratio","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Audio","type":"string","display":true,"required":false,"displayName":"Audio","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Prompt Generated","type":"string","display":true,"required":false,"displayName":"Prompt Generated","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Video Generated","type":"string","display":true,"required":false,"displayName":"Video Generated","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"string","display":true,"removed":true,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["Idea"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/100ur8DnU_q2YIAx15ccMfEWC43Di_G7hj19csjxg73A/edit#gid=0","cachedResultName":"Results"},"documentId":{"__rl":true,"mode":"list","value":"1VGhoJU-qHzav53pTUSPtX6PNVPrRp9e38E34AmHoWvg","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1VGhoJU-qHzav53pTUSPtX6PNVPrRp9e38E34AmHoWvg/edit?usp=drivesdk","cachedResultName":"Instantly create Kling 2.1 AI Generated Videos 4x cheaper than veo3"}},"credentials":{"googleSheetsOAuth2Api":{"id":"f8o05SKiFZmuFhu9","name":"Google Sheets account nervoAI"}},"typeVersion":4.6},{"id":"5267ac1d-36ad-449a-9f5f-cae01a090b33","name":"Generate prompt for Kling 2.1 model","type":"@n8n/n8n-nodes-langchain.openAi","position":[180,-20],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4.1-nano-2025-04-14","cachedResultName":"GPT-4.1-NANO-2025-04-14"},"options":{},"messages":{"values":[{"role":"assistant","content":"=You are a creative prompt engineer for Kling 2.1 video generation model. For any concept provided, craft a detailed, visually immersive prompt that specifies the subject, setting, lighting, mood, era or style, object details, composition, and background elements. Use evocative, sensory-rich language and guide the model to produce authentic, high-quality images. Match the style and depth of the following example:\n\nA casual street interview on a busy New York City sidewalk in the afternoon. The interviewer holds a plain, unbranded microphone and asks: Have you seen Google's new Veo3 model It is a super good model. Person replies: Yeah I saw it, it's already available on fal. It's crazy good.\n\nRespond only with the crafted prompt."},{"content":"=the input is: {{ $json.Idea }}"}]}},"credentials":{"openAiApi":{"id":"6iZ86Vz38pnHnAuF","name":"OpenAi account"}},"typeVersion":1.8}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"4a9e4bf8-ae9b-40c8-aeed-8a61fbc383a6","connections":{"Wait 5s":{"main":[[{"node":"Check video status","type":"main","index":0}]]},"Get video url":{"main":[[{"node":"Update sheet with video url and prompt used in Kling 2.1","type":"main","index":0}]]},"Check video status":{"main":[[{"node":"Check if video is ready","type":"main","index":0}]]},"Google Sheets Trigger":{"main":[[{"node":"Generate prompt for Kling 2.1 model","type":"main","index":0}]]},"Check if video is ready":{"main":[[{"node":"Get video url","type":"main","index":0}],[{"node":"Wait 5s","type":"main","index":0}]]},"Submit Request to generate video":{"main":[[{"node":"Check video status","type":"main","index":0}]]},"Set variables for Video generation":{"main":[[{"node":"Submit Request to generate video","type":"main","index":0}]]},"Generate prompt for Kling 2.1 model":{"main":[[{"node":"Set variables for Video generation","type":"main","index":0}]]}}}


