AutomationFlowsAI & RAG › Build Custom Workflows with GPT-4o, RAG, and Web Search

Build Custom Workflows with GPT-4o, RAG, and Web Search

Original n8n title: Build Custom Workflows Automatically with Gpt-4o, Rag, and Web Search

ByFranz @agents-by-franz on n8n.io

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…

Chat trigger trigger★★★★★ complexityAI-powered33 nodesChat TriggerAgentOpenAI EmbeddingsDocument Default Data LoaderHTTP RequestTool Serp ApiPinecone Vector StoreOpenRouter Chat
AI & RAG Trigger: Chat trigger Nodes: 33 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5024 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "M7saccCy1gO4g2zr",
  "meta": {
    "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
      ],
      "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 `user@example.com`)** 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):** `user@example.com`\\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 `user@example.com` 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 `user@example.com`.\\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 `user@example.com` 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\": \"user@example.com\",\n          \"id\": \"1971723eacc72f08\",\n          \"From\": \"Coresignal <user@example.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\": \"user@example.com\",\n          \"id\": \"1971723cfa14c3df\",\n          \"From\": \"Plain <user@example.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\u2019s 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\u2014our 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\u2022 A product with 5,000+ five-star reviews\\\\n\u2022 A service used by \\\\\\\"67% of Fortune 500 companies\\\\\\\"\\\\n\u2022 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\": \"# \ud83d\udee0\ufe0f 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## \u2705 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## \u2705 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## \u2705 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## \u2705 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## \u2705 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## \u2705 Step 6: Set Up LinkedIn Credential\\n1. In the n8n LinkedIn node create a new credential using your LinkedIn account\\n\\n---\\n\\n## \u2705 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\u2019s 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5e709878-fc9d-4ed3-bfbb-b019f9c287db",
      "name": "Default Data Loader1",
      "type": 

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

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…

Source: https://n8n.io/workflows/5024/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow acts as a 24/7 sales agent, engaging leads across WhatsApp, Instagram, Facebook, Telegram, and your website. It intelligently transcribes audio messages, answers questions using a knowle

Chat Trigger, Memory Postgres Chat, Tool Workflow +20
AI & RAG

• Create a Google Drive folder to watch. • Connect your Google Drive account in n8n and authorize access. • Point the Google Drive Trigger node to this folder (new/modified files trigger the flow).

Agent, Chat Trigger, Memory Buffer Window +14
AI & RAG

The workflow operates through a three-step process that handles incoming chat messages with intelligent tool orchestration: Message Trigger: The node triggers whenever a user message arrives and passe

Chat Trigger, Memory Postgres Chat, OpenAI Embeddings +16
AI & RAG

Advanced Ai Demo Presented At Ai Developers 14 Meetup. Uses slack, stickyNote, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi. Chat trigger; 39 nodes.

Slack, Text Splitter Recursive Character Text Splitter, OpenAI Embeddings +14
AI & RAG

Advanced Ai Demo (Presented At Ai Developers #14 Meetup). Uses slack, stickyNote, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi. Chat trigger; 39 nodes.

Slack, Text Splitter Recursive Character Text Splitter, OpenAI Embeddings +14