# templates

name: Daily Auto-Archive for Gmail Messages
author_name: Niranjan G
author_username: niranjan
nodes_used: ["n8n-nodes-base.gmail"]
categories: []
created_at: 2025-06-05T06:28:09.689Z
updated_at: 2025-06-05T06:28:09.689Z
url: https://n8n.io/workflows/4679
scraped_at: 2025-06-19 22:48:51
description:
  Who is this for?

  Professionals, solopreneurs, or productivity enthusiasts who want to keep their Gmail inbox clean and organized without manual effort.

  What problem does this solve?

  Manually archiving emails clutters your time and slows you down. This workflow automates inbox cleanup by removing the "INBOX" label from messages received over 24 hours ago. A perfect companion to AI-based labeling workflows, this keeps your inbox light and relevant.

  What this workflow does

  Triggers every day at 4 AM
  Fetches Gmail messages from the INBOX that are older than 24 hours
  Processes them one by one using the Split Out node
  Removes the INBOX label, effectively archiving the messages

  Setup

  Connect your Gmail account using OAuth2 credentials.
  Customize the Schedule Trigger node to adjust the run time.
  Modify the Gmail filter if you want to archive unread or labeled emails instead.

  How to customize this workflow to your needs

  Schedule different frequencies (e.g. twice a day or weekly).

  🔄 Pairs Well With

  This complements the Intelligent Email Organization with AI-Powered Content Classification workflow.

  Use that to label emails smartly using AI, and this one to auto-archive them for a clean, clutter-free inbox.

workflow_json:
  {"meta":{"instanceId":"c62c01f3e843893075a10f252ec7d6d69e5ab593af019f50055d506cb3081b99","templateCredsSetupCompleted":true},"nodes":[{"id":"61682ff7-397d-4ecb-a98f-91d45d5a07a1","name":"Daily Trigger at 4AM","type":"n8n-nodes-base.scheduleTrigger","position":[-140,160],"parameters":{"rule":{"interval":[{"triggerAtHour":4}]}},"typeVersion":1.2},{"id":"84a83cf9-63fc-40cf-bfa6-bc01ad67b3b7","name":"Fetch Gmail Inbox Emails","type":"n8n-nodes-base.gmail","position":[80,160],"webhookId":"57a7df32-d350-4e67-b106-f7b5b8b39f08","parameters":{"filters":{"labelIds":"={{ [\"INBOX\"] }}","receivedBefore":"={{ new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString() }}"},"operation":"getAll","returnAll":true},"credentials":{"gmailOAuth2":{"id":"T6a7nzYASeRq8gwp","name":"Gmail account [abc@mail.com]"}},"typeVersion":2.1},{"id":"29939c36-30d1-499a-9c1b-9d3e4c4c9ba5","name":"Split Each Email","type":"n8n-nodes-base.splitOut","position":[300,160],"parameters":{"options":{},"fieldToSplitOut":"id"},"typeVersion":1},{"id":"316ad247-78c2-4fbb-b420-94bb8fb354f3","name":"Archive Message (Remove INBOX Label)","type":"n8n-nodes-base.gmail","position":[520,160],"webhookId":"44a7f451-9ebb-4a08-86b2-1c4cb8600bcc","parameters":{"labelIds":["INBOX"],"messageId":"={{ $json.id }}","operation":"removeLabels"},"credentials":{"gmailOAuth2":{"id":"T6a7nzYASeRq8gwp","name":"Gmail account [abc@mail.com]"}},"typeVersion":2.1}],"pinData":{},"connections":{"Split Each Email":{"main":[[{"node":"Archive Message (Remove INBOX Label)","type":"main","index":0}]]},"Daily Trigger at 4AM":{"main":[[{"node":"Fetch Gmail Inbox Emails","type":"main","index":0}]]},"Fetch Gmail Inbox Emails":{"main":[[{"node":"Split Each Email","type":"main","index":0}]]},"Archive Message (Remove INBOX Label)":{"main":[[]]}}}


name: Automatic Gmail Message Categorization with GPT-4 Content Analysis & Labels
author_name: Henry
author_username: henry
categories: []
created_at: 2025-06-05T07:45:08.946Z
updated_at: 2025-06-05T07:45:08.946Z
url: https://n8n.io/workflows/4680
scraped_at: 2025-06-19 22:50:42
description:
  Who is this for?

  This workflow is ideal for Gmail users and teams who receive a high volume of emails and want to streamline inbox management. It suits professionals seeking to organize messages automatically, including sales teams, project managers, support staff, and anyone who benefits from automated email categorization.

  What problem is this workflow solving? / Use case

  Manually labeling emails is time-consuming and can lead to inconsistent organization. This automated n8n workflow uses Gmail and OpenAI to analyze incoming messages and apply the appropriate labels, such as "Quotation", "Inquiry", "Project progress", and "Notification", based on content—improving productivity and ensuring important messages are prioritized.

  What this workflow does

  The workflow retrieves new Gmail messages, analyzes their content with OpenAI, and automatically assigns pre-defined Gmail labels that match the email’s intent. This ensures emails are sorted efficiently using AI-powered content analysis and Gmail’s labeling system.

  Setup

  Ensure Gmail labels (e.g., "Quotation", "Inquiry") are created in your Gmail account.
  Connect your Gmail and OpenAI accounts as credentials in n8n.
  Import the workflow into your n8n instance and update node configurations to match your Gmail label names.

  How to customize this workflow to your needs

  Edit or add Gmail labels both in your Gmail account and within the workflow logic.
  Adjust the prompt or parameters sent to OpenAI to better match your categorization style.
  Expand or refine the list of label categories to fit your team’s or business’s requirements.

nodes_used:
  ["n8n-nodes-base.gmail","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.outputParserStructured"]

workflow_json:
  {"id":"Yc9bgOEvpyO1En1Z","meta":{"instanceId":"1af8a0dc0d2f537b7c08209af728c271b5a03806bdf309bedf99d668f2608ee6","templateCredsSetupCompleted":true},"name":"Intelligent Gmail Labeling: Categorize Emails by Content Intent Using OpenAI","tags":[],"nodes":[{"id":"7697a77b-7dc8-40e7-b8e2-859c724ed6d5","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[2380,40],"parameters":{"width":452.48413953150185,"height":347.0476323933831,"content":"### Aggregate labels and update to message\nCreate array of label IDs and add to the desired email message in Gmail."},"typeVersion":1},{"id":"013c142d-eb86-4d62-bab3-9dc77fba7b3b","name":"Gmail trigger","type":"n8n-nodes-base.gmailTrigger","position":[720,200],"parameters":{"simple":false,"filters":{},"options":{},"pollTimes":{"item":[{"mode":"everyMinute"}]}},"credentials":{"gmailOAuth2":{"id":"2pW13S2GyP5GCdoP","name":"Gmail account"}},"typeVersion":1.2},{"id":"78cf0980-b4ec-4ed0-9b49-014e4d5d63d3","name":"Get message content","type":"n8n-nodes-base.gmail","position":[980,200],"webhookId":"b773894c-18c6-454d-9271-6de10be1b7c4","parameters":{"simple":false,"options":{},"messageId":"={{ $json.id }}","operation":"get"},"credentials":{"gmailOAuth2":{"id":"2pW13S2GyP5GCdoP","name":"Gmail account"}},"typeVersion":2.1},{"id":"1f07bb8a-0e12-47fd-bf4f-751befeea37c","name":"Assign labels for message","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[1240,200],"parameters":{"text":"={{ $('Gmail trigger').item.json.text }}","messages":{"messageValues":[{"message":"=As an AI Assistant, your task is to categorize the message according to the following labels\n\nQuotation - email on discussing new opportunities to work with existing / new client on a new project\nProject progress - email on discussing and confirming specifications, schedule and progress of projects\nInquiry - email about product / service support\nNotification - email that doesn't require response\n\nOne email can have more than one label. Return only label names in JSON format, nothing else. Do not make things up."}]},"promptType":"define","hasOutputParser":true},"typeVersion":1.5},{"id":"c0f1e702-25b5-4887-b112-7d0d1c239ea1","name":"JSON Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1460,420],"parameters":{"schemaType":"manual","inputSchema":"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"labels\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\"Inquiry\", \"Quotation\", \"Project progress\", \"Notification\"]\n      }\n    }\n  },\n  \"required\": [\"labels\"]\n}"},"typeVersion":1.2},{"id":"979aad50-8e34-471e-9016-c412e470c81b","name":"Set label values","type":"n8n-nodes-base.set","position":[1620,200],"parameters":{"options":{},"assignments":{"assignments":[{"id":"72d11a72-6693-447c-b7ca-4ba1a3579075","name":"labels","type":"array","value":"={{ $json.output.labels }}"}]}},"typeVersion":3.4},{"id":"48e80f97-1679-40a5-860d-124d32c82316","name":"Get all labels","type":"n8n-nodes-base.gmail","position":[1840,80],"webhookId":"dec6f574-f47c-4b5d-86b9-2b0f6c957145","parameters":{"resource":"label","returnAll":true},"credentials":{"gmailOAuth2":{"id":"2pW13S2GyP5GCdoP","name":"Gmail account"}},"typeVersion":2.1},{"id":"e29e712a-7940-4ca3-9a82-525ac7d5f7bf","name":"Split out assigned labels","type":"n8n-nodes-base.splitOut","position":[1840,280],"parameters":{"options":{},"fieldToSplitOut":"labels"},"typeVersion":1},{"id":"95886e13-3412-4c27-8510-873bbaced52b","name":"Merge corresponding labels","type":"n8n-nodes-base.merge","position":[2180,140],"parameters":{"mode":"combine","options":{},"advanced":true,"mergeByFields":{"values":[{"field1":"name","field2":"labels"}]}},"typeVersion":3.1},{"id":"329cf5ff-7933-4c5e-bb63-cbb77689a194","name":"Aggregate label IDs","type":"n8n-nodes-base.aggregate","position":[2440,140],"parameters":{"options":{},"fieldsToAggregate":{"fieldToAggregate":[{"renameField":true,"outputFieldName":"label_ids","fieldToAggregate":"id"}]}},"typeVersion":1},{"id":"952aad99-6ae7-4639-8132-f51b1065468e","name":"Add labels to message","type":"n8n-nodes-base.gmail","position":[2640,140],"webhookId":"4f345fc9-2afd-478b-be3b-d3d28f0fbc82","parameters":{"labelIds":"={{ $json.label_ids }}","messageId":"={{ $('Gmail trigger').item.json[\"id\"] }}","operation":"addLabels"},"credentials":{"gmailOAuth2":{"id":"2pW13S2GyP5GCdoP","name":"Gmail account"}},"typeVersion":2.1},{"id":"11244a40-d6df-475b-b900-bf8d386077d6","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[20,-140],"parameters":{"color":4,"width":580,"height":1041,"content":"## Intelligent Gmail Labeling: Categorize Emails by Content Intent Using OpenAI\n\n## Who is this for?\n\nThis workflow is ideal for Gmail users and teams who receive a high volume of emails and want to streamline inbox management. It suits professionals seeking to organize messages automatically, including sales teams, project managers, support staff, and anyone who benefits from automated email categorization.\n\n## What problem is this workflow solving? / Use case\n\nManually labeling emails is time-consuming and can lead to inconsistent organization. This automated n8n workflow uses Gmail and OpenAI to analyze incoming messages and apply the appropriate labels, such as \"Quotation\", \"Inquiry\", \"Project progress\", and \"Notification\", based on content—improving productivity and ensuring important messages are prioritized.\n\n## What this workflow does\n\nThe workflow retrieves new Gmail messages, analyzes their content with OpenAI, and automatically assigns pre-defined Gmail labels that match the email’s intent. This ensures emails are sorted efficiently using AI-powered content analysis and Gmail’s labeling system.\n\n## Setup\n\n- Ensure Gmail labels (e.g., \"Quotation\", \"Inquiry\") are created in your Gmail account.\n- Connect your Gmail and OpenAI accounts as credentials in n8n.\n- Import the workflow into your n8n instance and update node configurations to match your Gmail label names.\n\n## How to customize this workflow to your needs\n\n- Edit or add Gmail labels both in your Gmail account and within the workflow logic.\n- Adjust the prompt or parameters sent to OpenAI to better match your categorization style.\n- Expand or refine the list of label categories to fit your team’s or business’s requirements.\n"},"typeVersion":1},{"id":"1eca85f0-bfa4-431e-90e2-0ffe25844bdd","name":"Sticky Note13","type":"n8n-nodes-base.stickyNote","position":[660,20],"parameters":{"width":238,"height":349,"content":"### Gmail Trigger\nGet new incoming message from Gmail. \n\n⚠️ Set up the time (polling) interval based on your needs."},"typeVersion":1},{"id":"a5dd9b23-0fd8-42a8-a334-2a0640750c52","name":"Sticky Note14","type":"n8n-nodes-base.stickyNote","position":[1400,400],"parameters":{"width":241.53974014153226,"height":319.3323098457962,"content":"###\n\n\n\n\n\n\n\n\n\n\n### JSON schema\nEdit JSON schema and label names according to your needs.\n\n⚠️ **Label names in system prompt and JSON schema should be the same.**"},"typeVersion":1},{"id":"c6a7af89-e307-4363-8d96-83c0f7c0e7b8","name":"Sticky Note15","type":"n8n-nodes-base.stickyNote","position":[2120,40],"parameters":{"width":226.14233872620645,"height":347.0476323933831,"content":"### Merge labels\nCombine labels retrieved from Gmail account and assigned by AI together."},"typeVersion":1},{"id":"afb1a124-f880-4d6c-987e-dabf2c3fb882","name":"Sticky Note16","type":"n8n-nodes-base.stickyNote","position":[920,20],"parameters":{"width":238.4602598584674,"height":348.5873725349161,"content":"### Get message content\nBased on Gmail message ID retrieve body content of the email and pass it to AI chain."},"typeVersion":1},{"id":"44b4c579-538f-45fe-9cde-627ac7364013","name":"Sticky Note17","type":"n8n-nodes-base.stickyNote","position":[1180,20],"parameters":{"width":378.57661273793565,"height":348.5873725349161,"content":"### Assign labels\nLet the AI decide which labels suit the best content of the message.\n\n⚠️ **Remember to edit system prompt** - modify label names and instructions according to your needs."},"typeVersion":1},{"id":"e866b876-20a4-4a19-bd07-56c69eed82af","name":"OpenAI GPT-4 Based","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1220,420],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4-turbo-preview","cachedResultName":"gpt-4-turbo-preview"},"options":{"temperature":0,"responseFormat":"json_object"}},"credentials":{"openAiApi":{"id":"8cWUJS0NExv35YHi","name":"OpenAi account"}},"typeVersion":1.2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"01528b99-a1ee-48df-b42f-c3717974161c","connections":{"JSON Parser":{"ai_outputParser":[[{"node":"Assign labels for message","type":"ai_outputParser","index":0}]]},"Gmail trigger":{"main":[[{"node":"Get message content","type":"main","index":0}]]},"Get all labels":{"main":[[{"node":"Merge corresponding labels","type":"main","index":0}]]},"Set label values":{"main":[[{"node":"Split out assigned labels","type":"main","index":0},{"node":"Get all labels","type":"main","index":0}]]},"OpenAI GPT-4 Based":{"ai_languageModel":[[{"node":"Assign labels for message","type":"ai_languageModel","index":0}]]},"Aggregate label IDs":{"main":[[{"node":"Add labels to message","type":"main","index":0}]]},"Get message content":{"main":[[{"node":"Assign labels for message","type":"main","index":0}]]},"Assign labels for message":{"main":[[{"node":"Set label values","type":"main","index":0}]]},"Split out assigned labels":{"main":[[{"node":"Merge corresponding labels","type":"main","index":1}]]},"Merge corresponding labels":{"main":[[{"node":"Aggregate label IDs","type":"main","index":0}]]}}}


name: Slack-OpenAI Assistant Integration for Direct Messages & @mentions
author_name: Bartosz
author_username: supbarty
categories: []
created_at: 2025-06-05T08:34:30.153Z
updated_at: 2025-06-05T08:34:30.153Z
url: https://n8n.io/workflows/4683
scraped_at: 2025-06-19 22:50:28
description:
  Getting AI assistance in Slack requires switching between apps and losing conversation context. Teams waste time copying messages to ChatGPT, losing the flow of their work discussions. This workflow brings OpenAI Assistant directly into your Slack workspace, responding to direct messages and @mentions while maintaining conversation memory and context.

  How it works?

  This workflow creates an intelligent Slack bot powered by OpenAI Assistant that responds naturally to team communications. It handles both direct messages and @mentions, maintains conversation history, and provides contextual responses without leaving your Slack workspace.
  Listen for Slack events - detects direct messages and @mentions while filtering out bot responses to prevent loops
  Process message types - handles both assistant mode (DMs) and public channel @mentions
  Set typing indicator - shows customizable "thinking" status for natural conversation flow
  Generate AI response - uses your configured OpenAI Assistant with custom instructions and knowledge base
  Maintain conversation memory - tracks context across up to 5 recent messages per session
  Reply intelligently - responds in threads for @mentions, direct messages for DMs

  Who is it for?

  Teams and organizations wanting to integrate AI assistance directly into their Slack workflows. Perfect for customer support teams, internal help desks, or any group that needs quick access to AI-powered responses without leaving their communication platform.

  Setup

  Setup takes approximately 20-25 minutes and requires configuring Slack app permissions with proper bot user filtering, OpenAI Assistant credentials, and customizing response behavior. The workflow includes built-in loop prevention and conversation threading for organized discussions.

  What's included?

  Your purchase includes comprehensive implementation support: detailed step-by-step walkthrough with screen recording, complete Slack app configuration guide with required scopes and permissions, OpenAI Assistant setup tutorial, conversation memory configuration, and access to our tech support forum for troubleshooting any implementation challenges.

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.slack","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"lmNh18di1V7RK6CU","meta":{"instanceId":"28bd95de2c15632ac4fbb9a674b8e7a0156e242a724a5996b55587928eb6fb92","templateCredsSetupCompleted":true},"name":"Messaging OpenAI Assistant via Slack (direct messages and @mentions)","tags":[{"id":"nxrsK8AuqtblfrtR","name":"💪 Official template","createdAt":"2025-05-23T14:32:31.457Z","updatedAt":"2025-05-23T14:32:31.457Z"}],"nodes":[{"id":"1b13f888-f10a-473d-be57-c2aa78d0d5ca","name":"What type of event?","type":"n8n-nodes-base.switch","position":[-60,-140],"parameters":{},"typeVersion":3.2},{"id":"31f486c1-595b-4807-81a3-132812157348","name":"Is subtype assistant_app_thread?","type":"n8n-nodes-base.if","position":[160,-340],"parameters":{},"typeVersion":2.2},{"id":"d6ce3d5a-f796-429d-a540-6d0754584cb7","name":"Ignore","type":"n8n-nodes-base.noOp","position":[380,-440],"parameters":{},"typeVersion":1},{"id":"84647328-c093-4ffb-8b69-0e64886949f8","name":"Set variables","type":"n8n-nodes-base.set","position":[-280,-140],"parameters":{},"typeVersion":3.4},{"id":"571ffcae-d95c-4ef3-b555-79c777ee0e6c","name":"New message or app mention","type":"n8n-nodes-base.slackTrigger","position":[-500,-140],"parameters":{},"typeVersion":1},{"id":"e186d855-efa5-447e-97a8-1f6d935a4863","name":"Generate response","type":"@n8n/n8n-nodes-langchain.openAi","position":[600,-120],"parameters":{},"typeVersion":1.8},{"id":"7241f01b-f1b9-464c-9eaf-f13377c5413d","name":"Remove citations from output","type":"n8n-nodes-base.code","position":[980,-120],"parameters":{},"typeVersion":2},{"id":"bf6f05b3-7a43-4830-a787-b4504e8ed20b","name":"Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[800,80],"parameters":{},"typeVersion":1.3},{"id":"a7381bb1-2a7d-419a-8957-a4d3e4483ff9","name":"Reply to direct message or @mention in thread","type":"n8n-nodes-base.slack","position":[1200,-120],"webhookId":"fa744121-41f8-4539-9ba2-be6861d7a78c","parameters":{},"typeVersion":2.3},{"id":"dc8b03f2-b78f-4146-b9f5-00795c324cbc","name":"Set status and typing animation [Slack]","type":"n8n-nodes-base.httpRequest","position":[380,-220],"parameters":{},"typeVersion":4.2}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"96ba907d-b147-412e-acd3-dc370d7a29b8","connections":{"Memory":{"ai_memory":[[{"node":"Generate response","type":"ai_memory","index":0}]]},"Set variables":{"main":[[{"node":"What type of event?","type":"main","index":0}]]},"Generate response":{"main":[[{"node":"Remove citations from output","type":"main","index":0}]]},"What type of event?":{"main":[[{"node":"Is subtype assistant_app_thread?","type":"main","index":0}],[{"node":"Generate response","type":"main","index":0}]]},"New message or app mention":{"main":[[{"node":"Set variables","type":"main","index":0}]]},"Remove citations from output":{"main":[[{"node":"Reply to direct message or @mention in thread","type":"main","index":0}]]},"Is subtype assistant_app_thread?":{"main":[[{"node":"Ignore","type":"main","index":0}],[{"node":"Set status and typing animation [Slack]","type":"main","index":0}]]},"Set status and typing animation [Slack]":{"main":[[{"node":"Generate response","type":"main","index":0}]]}}}


name: AI-Powered Meta Ads Analysis & Creation with Gemini, GPT-4.1 Mini & Ads Manager
author_name: Daniel Setzermann
author_username: danielsetzermann
categories: []
created_at: 2025-06-05T09:09:39.117Z
updated_at: 2025-06-05T09:09:39.117Z
url: https://n8n.io/workflows/4684
scraped_at: 2025-06-19 22:49:07
description:
  AI-Powered Meta Ads Creation & Analysis Workflow

  Overview

  This comprehensive n8n workflow automates the entire Meta (Facebook/Instagram) advertising process, from asset analysis to ad creation. It combines AI-powered content analysis with automated ad deployment, streamlining the creation of high-converting social media advertisements.

  Key Features

  🤖 AI-Powered Asset Analysis
  Video Analysis**: Uses Google Gemini to analyze video content, extracting transcripts, scene descriptions, hooks, offers, and branding elements
  Image Analysis**: Employs GPT-4.1 Mini to analyze static images, identifying visual elements, USPs, and marketing potential
  Structured Output**: Generates detailed descriptions and creative insights for informed ad creation

  ✍️ Automated Ad Copy Generation
  Creates 3 variations each of primary text, headlines, and link descriptions
  Optimized for Meta's character limits and best practices
  Maintains brand voice and messaging consistency
  Leverages AI analysis to create compelling, conversion-focused copy

  🎯 Meta Ads Manager Integration
  Video Ads**: Uploads videos, creates ad creatives with multiple text variations
  Image Ads**: Supports both single and multi-image campaigns (1:1 and 9:16 formats)
  Asset Feed Optimization**: Implements placement-specific customization rules
  Automated Preview Generation**: Creates ad previews for different placements

  📊 Smart Workflow Management
  Google Drive Integration**: Monitors designated folders for new creative assets
  Google Sheets Tracking**: Maintains comprehensive records of all assets and campaigns
  Status Management**: Tracks processing stages and prevents duplicate work
  Error Handling**: Includes retry logic and status checking for reliable operation

  Workflow Components

  Asset Discovery & Processing
  Google Drive Trigger: Monitors specified folder for new image/video files
  File Analysis: Extracts metadata, dimensions, and file specifications
  Asset Registration: Logs all assets in Google Sheets for tracking

  AI Analysis Pipeline
  Content Type Detection: Automatically identifies videos vs. images
  Video Processing:
     Uploads to Google Gemini for analysis
     Generates comprehensive content breakdown
     Extracts all marketing-relevant elements
  Image Processing:
     Analyzes visual content with GPT-4.1 Mini
     Identifies key messaging and visual elements
     Creates detailed creative descriptions

  Ad Copy Creation
  AI Agent Processing: Transforms analysis into marketing copy
  Multi-Variant Generation: Creates 3 versions of each text element
  Platform Optimization: Ensures compliance with Meta's requirements
  Quality Assurance: Structured output validation

  Meta Ads Deployment
  Asset Upload: Pushes images/videos to Meta Ads Manager
  Creative Assembly: Builds ad creatives with generated copy variations
  Campaign Creation: Sets up ads with proper targeting and placement rules
  Status Tracking: Updates spreadsheet with campaign IDs and status

  Setup Requirements

  Required Credentials
  Meta Developer Account**: App access token for Meta Graph API
  Google Drive OAuth**: For file monitoring and asset access
  Google Sheets OAuth**: For workflow tracking and management
  Google Gemini API**: For video analysis capabilities
  OpenAI API**: For image analysis and copy generation

  Configuration Steps
  Google Drive Setup: 
     Create dedicated folder for creative assets
     Configure folder monitoring in the trigger node
  Google Sheets Template:
     Use provided template for asset and campaign tracking
     Configure account settings and campaign parameters
  Meta Developer Setup:
     Create Meta App and obtain access tokens
     Set up ad account permissions
  API Credentials:
     Configure all required authentication credentials
     Test connections before activation

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.googleDrive","n8n-nodes-base.facebookGraphApi","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.outputParserStructured"]

workflow_json:
  {"id":"HSkxJKrT4lRkab16","meta":{"instanceId":"0aee4372a556f3e4774323f4ed89755880cea473443f0948966509bbf55dec04","templateCredsSetupCompleted":true},"name":"Analyze Meta Ads, Create Ad Texts & Upload Image & Video Ads to Meta Ads Manager","tags":[],"nodes":[{"id":"6205a675-8533-458b-a0db-1298740d5161","name":"Upload Ad Video","type":"n8n-nodes-base.facebookGraphApi","position":[2340,1980],"parameters":{},"typeVersion":1},{"id":"fe523d79-a5c5-43d4-a6b0-e89c190d9007","name":"Get Video Preview Image","type":"n8n-nodes-base.facebookGraphApi","position":[2740,1980],"parameters":{},"typeVersion":1},{"id":"49f08c36-3494-4304-8542-67ff1deb244e","name":"Analyze Video with Gemini","type":"n8n-nodes-base.httpRequest","position":[2740,1020],"parameters":{},"typeVersion":4.2},{"id":"c638cf41-7820-4bf0-a253-dd9387a5ed32","name":"Gemini - Generate Upload URL","type":"n8n-nodes-base.httpRequest","position":[1300,1120],"parameters":{},"typeVersion":4.2},{"id":"4025ddce-afd4-4526-9a94-b59cbaa5837a","name":"Gemini - Upload File","type":"n8n-nodes-base.httpRequest","position":[1720,1120],"parameters":{},"typeVersion":4.2},{"id":"c116efd1-ac34-46bd-ae31-4650cc369f25","name":"Download from Google Drive","type":"n8n-nodes-base.googleDrive","position":[1520,1120],"parameters":{},"typeVersion":3},{"id":"cd25f2c2-5697-44d7-919b-1ef23505d124","name":"Create Asset","type":"n8n-nodes-base.googleSheets","position":[2380,780],"parameters":{},"typeVersion":4.5},{"id":"55aae2bf-e57b-4e06-baca-9ca3ca99d8b5","name":"Get All Rows","type":"n8n-nodes-base.googleSheets","position":[2640,780],"parameters":{},"executeOnce":true,"typeVersion":4.5},{"id":"5dc2e330-814b-43c7-9228-7c412a4bd4a3","name":"AI Description is Empty","type":"n8n-nodes-base.filter","position":[2880,780],"parameters":{},"typeVersion":2.2},{"id":"b402bfd8-7e64-4220-b5e8-7e88b765d896","name":"Check State","type":"n8n-nodes-base.httpRequest","position":[2340,1120],"parameters":{},"typeVersion":4.2},{"id":"e81071cf-e86a-42f0-ac80-13432e6b2097","name":"If","type":"n8n-nodes-base.if","position":[2540,1120],"parameters":{},"typeVersion":2.2},{"id":"0719ebaf-3c86-4d46-b5f3-9ed00c53936e","name":"Wait 2 Seconds","type":"n8n-nodes-base.wait","position":[2720,1220],"webhookId":"34306fcb-9f52-44cd-8343-333bb6032833","parameters":{},"typeVersion":1.1},{"id":"110d630e-0e17-42b9-998a-a224fa844b54","name":"Wait 3 Seconds","type":"n8n-nodes-base.wait","position":[2140,1120],"webhookId":"4451f2eb-68a3-420f-9c07-833308375076","parameters":{},"typeVersion":1.1},{"id":"48520a4b-7a8b-41e5-8c43-329c20870bc9","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[2960,1020],"parameters":{},"typeVersion":1.8},{"id":"57fa5985-8551-42a6-bd47-9519589a3bf7","name":"Video or Image","type":"n8n-nodes-base.switch","position":[3300,780],"parameters":{},"typeVersion":3.2},{"id":"649afa30-f30a-4c09-94ed-923f34515fd8","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[2940,1220],"parameters":{},"typeVersion":1.2},{"id":"ab605d41-39a5-4a97-ab2f-8b1b52a5d846","name":"Get File Metadata","type":"n8n-nodes-base.httpRequest","position":[3100,780],"parameters":{},"typeVersion":4.2},{"id":"e571a88e-ca16-4572-ad6c-62f068504fb1","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[3160,1220],"parameters":{},"typeVersion":1.2},{"id":"29dc39cb-f783-4f94-868e-e5e6a40a73b2","name":"Get Ads to Process","type":"n8n-nodes-base.googleSheets","position":[1260,2020],"parameters":{},"typeVersion":4.5},{"id":"7d39fa34-bca9-45f1-b88f-76480317de39","name":"Get Settings","type":"n8n-nodes-base.googleSheets","position":[1260,2300],"parameters":{},"typeVersion":4.5},{"id":"304aafc4-5bd0-44f5-b20e-a38e5baefa75","name":"Merge","type":"n8n-nodes-base.merge","position":[1720,2160],"parameters":{},"typeVersion":3.1},{"id":"618ec524-d237-4495-8a51-0333069784e3","name":"AI Agent1","type":"@n8n/n8n-nodes-langchain.agent","position":[2960,1440],"parameters":{},"typeVersion":1.8},{"id":"b56d7a32-7772-48ec-bf20-dbc8709484ab","name":"Google Drive","type":"n8n-nodes-base.googleDrive","position":[1300,1440],"parameters":{},"typeVersion":3},{"id":"6a63d1f4-4e33-4cb5-ac02-7b73c9c7e216","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[2940,1660],"parameters":{},"typeVersion":1.2},{"id":"d24b46b8-2dfe-4979-a678-5f43e23491ec","name":"Structured Output Parser1","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[3160,1660],"parameters":{},"typeVersion":1.2},{"id":"655d8706-a92c-4ad7-8b07-0bf14ce3febf","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[920,2140],"parameters":{},"typeVersion":1},{"id":"4ad90a98-acbc-4866-a51a-4d11d7a3a44e","name":"Get Video","type":"n8n-nodes-base.httpRequest","position":[2160,1980],"parameters":{},"typeVersion":4.2},{"id":"f02961b4-328a-4b5f-9d99-6ea5be623123","name":"Wait","type":"n8n-nodes-base.wait","position":[2540,1980],"webhookId":"c022fd1f-a2ca-445d-ba8b-1e847b03ac3a","parameters":{},"typeVersion":1.1},{"id":"e7f640d3-b382-4076-895b-3482bce6bee6","name":"Video or Image Asset","type":"n8n-nodes-base.switch","position":[1900,2160],"parameters":{},"typeVersion":3.2},{"id":"7133563d-7b1a-4ad2-94b8-92e09c1bf7dd","name":"Facebook Graph API","type":"n8n-nodes-base.facebookGraphApi","position":[3800,2280],"parameters":{},"typeVersion":1},{"id":"6b07b2cd-a0cd-494d-9243-0f3ebe836830","name":"Get image 1","type":"n8n-nodes-base.httpRequest","position":[2160,2280],"parameters":{},"typeVersion":4.2},{"id":"783616dd-ddae-459a-b01b-381c0616812f","name":"Get image ","type":"n8n-nodes-base.httpRequest","position":[2800,2200],"parameters":{},"typeVersion":4.2},{"id":"dae5668c-4be2-4a19-800f-83d7b63e1518","name":"Google Drive Folder Updated","type":"n8n-nodes-base.googleDriveTrigger","position":[1260,780],"parameters":{},"typeVersion":1},{"id":"9b6145e0-3fd8-4664-a9dc-297f7d949191","name":"Fetch All Files","type":"n8n-nodes-base.googleDrive","position":[1520,780],"parameters":{},"typeVersion":3},{"id":"d3566142-d98e-47dc-a0a1-74a0be61170f","name":"Get Files Metadata","type":"n8n-nodes-base.httpRequest","position":[1780,780],"parameters":{},"typeVersion":4.2},{"id":"5135bbca-2715-401c-9019-5b21b1b76362","name":"Extract File Specs","type":"n8n-nodes-base.set","position":[2060,780],"parameters":{},"typeVersion":3.4},{"id":"75a91825-ea89-461c-85e5-77a2a6736dee","name":"Save Video Analysis Output","type":"n8n-nodes-base.googleSheets","position":[3320,1020],"parameters":{},"typeVersion":4.5},{"id":"367910e1-f247-4bcd-8ba3-e65afd3ac731","name":"Save Image Analysis Output","type":"n8n-nodes-base.googleSheets","position":[3340,1440],"parameters":{},"typeVersion":4.5},{"id":"d730546f-874b-4f85-882b-415f201f3941","name":"Filter Unprocessed Ads","type":"n8n-nodes-base.filter","position":[1480,2020],"parameters":{},"typeVersion":2.2},{"id":"485afc5d-4490-44a1-b25a-d87b21f1fe04","name":"Create Video Ad Creative","type":"n8n-nodes-base.facebookGraphApi","position":[2960,1980],"parameters":{},"typeVersion":1},{"id":"31fc206d-3f57-4c40-a24e-8299bbd6e452","name":"Create Video Ad","type":"n8n-nodes-base.facebookGraphApi","position":[3580,1980],"parameters":{},"typeVersion":1},{"id":"51e84264-cd4a-4385-be69-ee11ae4429d5","name":"Save Video Ad Details","type":"n8n-nodes-base.googleSheets","position":[4120,1980],"parameters":{},"typeVersion":4.5},{"id":"cb41025e-e1e0-454c-93b5-a36eba57dba5","name":"Check if two or one image","type":"n8n-nodes-base.if","position":[2560,2280],"parameters":{},"typeVersion":2.2},{"id":"73757cd6-9a2c-4bc5-8842-f92177a31cd3","name":"Upload Ad Image","type":"n8n-nodes-base.facebookGraphApi","position":[2340,2280],"parameters":{},"typeVersion":1},{"id":"93f5be7e-8a94-4aaa-8e65-e2316e7bc15a","name":"Create Multiple Image Creative","type":"n8n-nodes-base.facebookGraphApi","position":[3240,2200],"parameters":{},"typeVersion":1},{"id":"49efc025-f772-4669-96c7-a9ed4b2dca63","name":"Create Image Creative","type":"n8n-nodes-base.facebookGraphApi","position":[3000,2520],"parameters":{},"typeVersion":1},{"id":"d7fe1213-3db6-47b3-ac69-debc873c79e0","name":"Upload Second Ad Image","type":"n8n-nodes-base.facebookGraphApi","position":[3020,2200],"parameters":{},"typeVersion":1},{"id":"4887b86c-c0be-4810-90ff-0a5be4a07b71","name":"Create Image Ad","type":"n8n-nodes-base.facebookGraphApi","position":[3580,2280],"parameters":{},"typeVersion":1},{"id":"77f3371f-b818-4bf0-9381-126aa374f453","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1260,660],"parameters":{"content":""},"typeVersion":1},{"id":"92a00fa1-89be-45e0-9055-189ac0479114","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[2380,660],"parameters":{"content":""},"typeVersion":1},{"id":"c064fecd-9d51-4839-bf86-9134b12102c4","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[3500,1100],"parameters":{"content":""},"typeVersion":1},{"id":"f27867dc-13f3-4d7a-8a5b-04776c6389ff","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[3520,1520],"parameters":{"content":""},"typeVersion":1},{"id":"cc280912-6f45-4836-8c22-edd471c13ec8","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[4080,1880],"parameters":{"content":""},"typeVersion":1},{"id":"225cde15-4ded-41b1-a6ea-b40ea1c9e961","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[4080,2460],"parameters":{"content":""},"typeVersion":1},{"id":"9875016f-c878-4215-ba17-a350d8fa26e6","name":"Save Image Ad Details","type":"n8n-nodes-base.googleSheets","position":[4120,2280],"parameters":{},"typeVersion":4.5},{"id":"72d1819a-b983-4f0c-afc2-1f83baf6416f","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1220,2460],"parameters":{"content":""},"typeVersion":1},{"id":"79292ebc-98f7-4acb-aca7-01d641091301","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[1220,1920],"parameters":{"content":""},"typeVersion":1},{"id":"bb4afb0c-97cb-41db-a42d-44c10aed33f3","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[680,660],"parameters":{"content":""},"typeVersion":1},{"id":"729d2f7e-4e14-4c91-8fa5-1d42eef3923c","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[2900,1340],"parameters":{"content":""},"typeVersion":1},{"id":"82abdc96-707e-4a9f-8717-217dc583c06f","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[2900,1780],"parameters":{"content":""},"typeVersion":1},{"id":"051d9a9f-d786-4188-91a5-0f33cf8dba24","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","position":[640,1940],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"7ec4840f-4712-4879-b777-fa11bb265770","connections":{"If":{"main":[[{"node":"Analyze Video with Gemini","type":"main","index":0}],[{"node":"Wait 2 Seconds","type":"main","index":0}]]},"Wait":{"main":[[{"node":"Get Video Preview Image","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Video or Image Asset","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"Save Video Analysis Output","type":"main","index":0}]]},"AI Agent1":{"main":[[{"node":"Save Image Analysis Output","type":"main","index":0}]]},"Get Video":{"main":[[{"node":"Upload Ad Video","type":"main","index":0}]]},"Get image ":{"main":[[{"node":"Upload Second Ad Image","type":"main","index":0}]]},"Check State":{"main":[[{"node":"If","type":"main","index":0}]]},"Get image 1":{"main":[[{"node":"Upload Ad Image","type":"main","index":0}]]},"Create Asset":{"main":[[{"node":"Get All Rows","type":"main","index":0}]]},"Get All Rows":{"main":[[{"node":"AI Description is Empty","type":"main","index":0}]]},"Get Settings":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Google Drive":{"main":[[{"node":"AI Agent1","type":"main","index":0}]]},"Video or Image":{"main":[[{"node":"Gemini - Generate Upload URL","type":"main","index":0}],[{"node":"Google Drive","type":"main","index":0}]]},"Wait 2 Seconds":{"main":[[{"node":"Check State","type":"main","index":0}]]},"Wait 3 Seconds":{"main":[[{"node":"Check State","type":"main","index":0}]]},"Create Image Ad":{"main":[[{"node":"Facebook Graph API","type":"main","index":0}]]},"Create Video Ad":{"main":[[{"node":"Save Video Ad Details","type":"main","index":0}]]},"Fetch All Files":{"main":[[{"node":"Get Files Metadata","type":"main","index":0}]]},"Upload Ad Image":{"main":[[{"node":"Check if two or one image","type":"main","index":0}]]},"Upload Ad Video":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Get File Metadata":{"main":[[{"node":"Video or Image","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Extract File Specs":{"main":[[{"node":"Create Asset","type":"main","index":0}]]},"Facebook Graph API":{"main":[[{"node":"Save Image Ad Details","type":"main","index":0}]]},"Get Ads to Process":{"main":[[{"node":"Filter Unprocessed Ads","type":"main","index":0}]]},"Get Files Metadata":{"main":[[{"node":"Extract File Specs","type":"main","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"AI Agent1","type":"ai_languageModel","index":0}]]},"Gemini - Upload File":{"main":[[{"node":"Wait 3 Seconds","type":"main","index":0}]]},"Video or Image Asset":{"main":[[{"node":"Get Video","type":"main","index":0}],[{"node":"Get image 1","type":"main","index":0}]]},"Create Image Creative":{"main":[[{"node":"Create Image Ad","type":"main","index":0}]]},"Filter Unprocessed Ads":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Upload Second Ad Image":{"main":[[{"node":"Create Multiple Image Creative","type":"main","index":0}]]},"AI Description is Empty":{"main":[[{"node":"Get File Metadata","type":"main","index":0}]]},"Get Video Preview Image":{"main":[[{"node":"Create Video Ad Creative","type":"main","index":0}]]},"Create Video Ad Creative":{"main":[[{"node":"Create Video Ad","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"AI Agent","type":"ai_outputParser","index":0}]]},"Analyze Video with Gemini":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Check if two or one image":{"main":[[{"node":"Get image ","type":"main","index":0}],[{"node":"Create Image Creative","type":"main","index":0}]]},"Structured Output Parser1":{"ai_outputParser":[[{"node":"AI Agent1","type":"ai_outputParser","index":0}]]},"Download from Google Drive":{"main":[[{"node":"Gemini - Upload File","type":"main","index":0}]]},"Google Drive Folder Updated":{"main":[[{"node":"Fetch All Files","type":"main","index":0}]]},"Gemini - Generate Upload URL":{"main":[[{"node":"Download from Google Drive","type":"main","index":0}]]},"Create Multiple Image Creative":{"main":[[{"node":"Create Image Ad","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Get Ads to Process","type":"main","index":0},{"node":"Get Settings","type":"main","index":0}]]}}}


name: Automate Customer Feedback Analysis with Forms, AI, Google Sheets and WhatsApp
author_name: OneClick IT Consultancy P Limited
author_username: oneclick-it
nodes_used: ["n8n-nodes-base.emailSend","n8n-nodes-base.googleSheets","n8n-nodes-base.whatsApp"]
categories: []
created_at: 2025-06-05T11:01:31.970Z
updated_at: 2025-06-05T11:01:31.970Z
url: https://n8n.io/workflows/4686
scraped_at: 2025-06-19 22:49:40
description:
  Automate Customer Feedback Analysis with Google Sheets, WhatsApp, and Email

  Introduction: Drowning in Data, Starving for Insight?
  Imagine this: Your team launches a new feature. Feedback starts pouring in emails, support tickets, social media mentions, and survey responses. You know gold is buried in there, but manually reading, tagging, and summarising hundreds, maybe thousands, of comments? It takes days, maybe weeks. By the time you have a clear picture, the moment might have passed. Sounds exhausting, right?

  What if you could have an AI assistant tirelessly working 24/7, instantly analysing every piece of feedback the moment it arrives? This isn't science fiction anymore. AI-powered automation can transform this slow, manual chore into a real-time insight engine, giving you the pulse of your customer base almost instantly. Let's explore how.

  What's the Goal? Understanding the Workflow Objective
  The core challenge is transforming raw, unstructured customer feedback into actionable intelligence quickly and efficiently.

  The Problem:
  Manual Overload: Sifting through vast amounts of feedback manually is incredibly time-consuming and prone to human error or bias.
  Delayed Insights: The lag between receiving feedback and understanding it means missed opportunities and slow responses to critical issues.
  Inconsistent Analysis: Different team members might interpret or categorize feedback differently, leading to unreliable trend spotting.

  The AI Solution:
  Automated Data Collection: Connects directly to feedback sources (surveys, social media, review sites, helpdesks).
  AI-Powered Analysis: Uses Large Language Models (LLMs) like GPT-4 or Claude to analyze sentiment, extract key topics, and summarize comments.
  Intelligent Categorization: Automatically tags feedback based on predefined or dynamically identified themes (e.g., "bug report," "feature request," "pricing issue").
  Real-time Reporting: Pushes structured insights into dashboards, databases, or triggers notifications for immediate awareness.

  Outcome: You move from reactive problem-solving based on stale data to proactive, strategic decisions driven by a near real-time understanding of customer sentiment and needs.

  Why Does It Matter? Achieving 100X Productivity and Efficiency
  Look, automating feedback isn't just about saving time; it's about scaling your ability to listen and respond smarter, not harder. When you leverage AI, the gains aren't incremental - they're exponential.

  Here’s why this is a game changer:

   Blazing Speed: Analyse feedback 100x Faster (or more!) than manual methods. Insights appear in minutes or hours, not days or weeks.
   Unhuman Scalability: Process virtually unlimited volumes of feedback without needing to scale your human team proportionally. AI doesn't get tired or bored.
   Consistent Accuracy: AI applies analysis rules consistently, reducing human bias and ensuring reliable categorisation and sentiment scoring over time.
   Proactive Trend Spotting: Identify emerging issues or popular requests much earlier by analysing aggregated data automatically. Spot patterns humans might miss.
   Free Up Your Team: Let your talented team focus on acting on insights – improving products, fixing issues, engaging customers – instead of drowning in data entry.

  How It Works: AI Automation Step by Step
  Getting this set up is more straightforward than you might think, especially with tools like n8n acting as the central hub.

  Automated Feedback Triggering
  CRM/Website Event Node
   Trigger feedback requests after:
   Purchases (eCommerce)
   Support ticket resolution
   Feature usage (SaaS)
   
  Time-Based Node
   Schedule recurring NPS surveys
   Customer health check-ups

  Chat App Node (WhatsApp/Telegram/Messenger)
   Send conversational feedback prompts:
   "How was your recent experience with [specific interaction]?"

  Multi-Channel Feedback Collection
  Email Node (SendGrid/Mailchimp)
   Send personalized feedback requests
   Embed 1-5 rating widgets

  SMS Node (Twilio)
   Short mobile surveys:
   "Reply 1-5: How satisfied with your purchase?"

  Webhook Node
   Capture in-app feedback
   Process chatbot responses

  Social Media Node
   Monitor Twitter/X, Instagram mentions
   Analyze comments for unsolicited feedback

  AI-Powered Real-Time Analysis
  OpenAI/ChatGPT Node (Sentiment Analysis)
   Prompt: "Analyze sentiment (positive/neutral/negative) and key themes from: [customer feedback]"
   Output fields:
   Sentiment score (1-5)
   Urgency flag (high/medium/low)
   Key topics (billing, support, product, etc.)
   
  Translation Node (Optional)
   Convert multilingual feedback into a consistent language

  Instant AI Response System
  Conditional Node (Routing Logic)
   Positive feedback → Send thank-you + referral ask
   Neutral feedback → Follow-up question for details
   Negative feedback → Escalate to the human team

  AI Response Generator Node
   Prompt: "Create a personalized response to [feedback type] about [topic] with sentiment [score]"
   Adjust tone (professional/friendly/empathetic)

  Escalation Node
   Route critical issues to the support team with full context

  Automated Insights & Alerts
  Dashboard Node
   Real-time sentiment tracking
   Emerging issue detection

  Alert Node (Slack/Teams/Email)
   Notify teams of negative trends:
   "3+ complaints about checkout flow in the past hour!"

  Report Node
   Auto-generate weekly/monthly summaries:
   "Top 5 customer pain points this week"

  Product Board Integration
   Auto-create feature requests
   Prioritize based on feedback volume

  Tools of the Trade: AI & Automation Tech Stack
  You don't need a massive, complex tech stack. Focus on a few core, powerful tools:
   n8n: The workflow automation platform. This is the 'glue' that connects everything and orchestrates the process without needing deep coding knowledge. Honestly, it's incredibly versatile.
   OpenAI (GPT-4/GPT-4o): State-of-the-art LLM for high-quality text analysis, summarization, and classification. Great for complex understanding.
   Anthropic (Claude 3 Sonnet/Opus): Another top-tier LLM, known for strong performance in analysis and handling large contexts. Often, a great alternative or complement to GPT models.
   Feedback Sources APIs: Connectors for where your feedback lives (e.g., Typeform, SurveyMonkey, Twitter API, Zendesk API, Google Play/App Store review APIs).
   Data Storage/Destination: Where the processed insights go (e.g., Google Sheets, Airtable, Notion, PostgreSQL database, BigQuery).
   (Optional) Visualization Tool: Tools like Metabase, Grafana, Looker Studio, or Power BI to create dashboards from your structured feedback data.

  What's the Cost? Estimated Budget
  Let's talk investment. You're mainly looking at:
   Setup Costs: Primarily your time (or a consultant's) to design and build the initial workflow in n8n. Depending on complexity, this could range from a few hours to a few days. No major software licenses are usually needed upfront if using self-hosted n8n or starting with free/low-tier cloud plans.
   AI API Calls: You pay per usage to OpenAI/Anthropic. Costs depend heavily on volume but can start from $20-$50/month for moderate usage and scale up. Newer models are getting more cost-effective.
   n8n Hosting: Free if self-hosted (requires a server), or tiered cloud pricing starting around $20/month.
   Feedback Source APIs: Some platforms might have API access costs or rate limits on free tiers.
   Total Estimated Monthly Cost: For many businesses, ongoing costs can range from $50 - $500+ per month, highly dependent on feedback volume and AI model choice.

  The Return on Investment (ROI) is typically rapid. Consider the hours saved from manual analysis, the value of faster issue resolution, preventing churn, and the benefits of making product decisions based on real-time data. It often pays for itself very quickly.

  Who Benefits? Target Users and Industries
  This automated feedback loop isn't niche; it's valuable across many sectors and roles:

  Top Industries:
   SaaS (Software as a Service): Understanding user friction, feature requests, bug reports.
   E-commerce & Retail: Analyzing product reviews, post-purchase surveys, and support chats.
   Hospitality & Travel: Processing guest reviews, survey feedback.
   Mobile Apps: Monitoring app store reviews, in-app feedback.
   Financial Services: Gauging customer satisfaction with services, identifying pain points.
   
  Key Roles:
   Product Managers: Prioritizing features, understanding user needs, tracking launch reception.
   Customer Experience (CX) / Success Managers: Monitoring customer health, identifying churn risks, and improving support processes.
   Marketing Teams: Understanding brand perception, campaign feedback, and voice of the customer.
   Support Leads: Identifying recurring issues, measuring support quality, spotting training needs.
  This approach works for businesses of all sizes, from startups wanting to stay lean and agile to large enterprises needing to manage massive feedback volumes.

  How to use workflow?
  Importing a workflow in n8n is a straightforward process that allows you to use pre-built or shared workflows to save time. Below is a step-by-step guide to import a workflow in n8n, based on the official documentation and community resources.

  Steps to Import a Workflow in n8n
  1. Obtain the Workflow JSON
  Source the Workflow:**
  	Workflows are typically shared as JSON files or code snippets. You might receive them from:
  	The n8n community (e.g., n8n.io workflows page).
  	A colleague or tutorial (e.g., a .json file or copied JSON code).
  	Exported from another n8n instance (see export instructions below if needed).
  Format:** Ensure you have the workflow in JSON format, either as a file (e.g., workflow.json) or as text copied to your clipboard.

  2. Access the n8n Workflow Editor
  Log in to n8n:**
  	Open your n8n instance (via n8n Cloud or your - self-hosted instance).
  	Navigate to the Workflows tab in the n8n dashboard.
  Open a New Workflow:**
  	Click Add Workflow to create a blank workflow, or open an existing workflow if you want to merge the imported workflow.

  3. Import the Workflow
  Option 1: Import via JSON Code (Clipboard):
  In the n8n editor, click the three dots (⋯) in the top-right corner to open the menu.
  Select Import from Clipboard.
  Paste the JSON code of the workflow into the provided text box.
  Click Import to load the workflow into the editor.

  Option 2: Import via JSON File:
  In the n8n editor, click the three dots (⋯) in the top-right corner.
  Select Import from File.
  Choose the .json file from your computer.
  Click Open to import the workflow.

  Note: If the workflow includes nodes for apps requiring credentials (e.g., Google Sheets), you’ll need to configure those credentials separately after importing.

workflow_json:
  {"id":"h47UJYYjZeKuBLTn","meta":{"instanceId":"dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281","templateCredsSetupCompleted":true},"name":"AI Automation in Feedback","tags":[],"nodes":[{"id":"553d9f71-a750-4152-84bb-9d2956441aa8","name":"On form submission","type":"n8n-nodes-base.formTrigger","position":[260,220],"webhookId":"998e3daa-1e42-4a50-913f-e0dfb10b66b7","parameters":{"options":{"path":"feedback","customCss":"","appendAttribution":false},"formTitle":"Customer Feedback Questions for IT Services","formFields":{"values":[{"fieldLabel":"What is your Name?","requiredField":true},{"fieldType":"email","fieldLabel":"Email ID","requiredField":true},{"fieldLabel":"Contact Number","placeholder":"(e.g, +1234567890)","requiredField":true},{"fieldType":"dropdown","fieldLabel":"How satisfied are you with the quality of our IT services or solutions?","fieldOptions":{"values":[{"option":"Very Dissatisfied"},{"option":"Dissatisfied"},{"option":"Neutral"},{"option":"Satisfied"},{"option":"Very Satisfied"}]},"requiredField":true},{"fieldType":"dropdown","fieldLabel":"Did our team understand your technical requirements clearly?","fieldOptions":{"values":[{"option":"Yes"},{"option":"No"}]},"requiredField":true},{"fieldType":"dropdown","fieldLabel":"How would you rate our communication throughout the project/support process?","fieldOptions":{"values":[{"option":"Poor"},{"option":"Fair"},{"option":"Good"},{"option":"Excellent"}]},"requiredField":true},{"fieldType":"dropdown","fieldLabel":"Was your project/service delivered on time and within the expected timeline?","fieldOptions":{"values":[{"option":"Yes"},{"option":"No"}]},"requiredField":true},{"fieldType":"dropdown","fieldLabel":"Did our solution meet your business needs or solve your problem effectively?","fieldOptions":{"values":[{"option":"Yes"},{"option":"No"}]},"requiredField":true},{"fieldType":"dropdown","fieldLabel":"How responsive was our support team when you needed assistance?","fieldOptions":{"values":[{"option":"Slow"},{"option":"Average"},{"option":"Fast"},{"option":"Very Fast"}]},"requiredField":true},{"fieldType":"dropdown","fieldLabel":"How would you rate the technical expertise of our team?","fieldOptions":{"values":[{"option":"1"},{"option":"2"},{"option":"3"},{"option":"4"},{"option":"5"}]},"requiredField":true},{"fieldType":"textarea","fieldLabel":"What could we do to improve your experience with our IT services?","requiredField":true},{"fieldType":"dropdown","fieldLabel":"Would you recommend our IT services to others?","fieldOptions":{"values":[{"option":"Yes"},{"option":"=No"}]},"requiredField":true},{"fieldType":"textarea","fieldLabel":"Any additional comments or suggestions?","requiredField":true}]}},"notesInFlow":false,"typeVersion":2.2},{"id":"0f02714d-0da3-4f86-ba62-97ce92883201","name":"If E-mail and Phone Number Both are given","type":"n8n-nodes-base.if","position":[520,440],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8cc5cb6d-8aee-4547-bb67-aa8465789473","operator":{"type":"string","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json.Phone.toString() }}","rightValue":""},{"id":"2a0ba5ea-f76c-4cf2-9b77-6fc0e2d269da","operator":{"type":"string","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json.Email }}","rightValue":""}]}},"typeVersion":2.2},{"id":"2890694e-c503-4eda-825b-b569e7f8831a","name":"If only Phone Number is given","type":"n8n-nodes-base.if","position":[520,640],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"84c363c4-8ae2-4b56-b9f7-a83de196be4b","operator":{"type":"string","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json.Phone.toString() }}","rightValue":""}]}},"typeVersion":2.2},{"id":"cf9d2612-b582-4352-809e-31a38f4126b5","name":"Send Message on Whatsapp","type":"n8n-nodes-base.whatsApp","notes":"Set the WhatsApp template from the WhatsApp Business Account.","position":[780,620],"webhookId":"857eab1a-f5e2-4937-be2c-90b47bae3947","parameters":{"template":"feedback_n8n|en_US","components":{"component":[{"bodyParameters":{"parameter":[{"text":"={{ $('Google Sheets Trigger').item.json.User }}"}]}}]},"phoneNumberId":"550325331503475","recipientPhoneNumber":"={{ $json.Phone.toString() }}"},"credentials":{"whatsAppApi":{"id":"3hy4gzpVJrY1sFcR","name":"WhatsApp account API"}},"typeVersion":1},{"id":"ce02dda2-111e-4bde-99a9-393547c40435","name":"Google Sheets Trigger","type":"n8n-nodes-base.googleSheetsTrigger","notes":"Set Google Credentials and then select Google Sheets.\nSelect the Sheet on which you want to set the trigger.\n\nIf any changes are made to the selected Sheet. Node will trigger.","position":[200,520],"parameters":{"options":{},"pollTimes":{"item":[{"mode":"everyMinute"}]},"sheetName":{"__rl":true,"mode":"list","value":""},"documentId":{"__rl":true,"mode":"list","value":""}},"credentials":{"googleSheetsTriggerOAuth2Api":{"id":"9XWklJMdHOljJ9Ar","name":"Google Sheets Trigger account"}},"notesInFlow":false,"typeVersion":1},{"id":"153adc14-68c1-4b4d-bb93-8dc5204ec7e9","name":"Google Sheets1","type":"n8n-nodes-base.googleSheets","notes":"Follow this steps:\n- Set Google Credentials and then select Google Sheets account.\n- Select \"Sheet Within Document\" option in Resource tab.\n- Select \"Append or Update Row\" in Operation tab.\n- In Document tab select your google sheets which you want to update.\n- In Sheets tab select sheet from your google sheets document.\n- In Mapping select \"Map Each Column Manually\"\n- Now from list of colums select colum which you want to match from selected sheet. The column to use when matching rows in Google Sheets to the input items of this node. Usually an ID.\n- Now you can see all colume in \"Values to Send\" section. Here you need to map (using drag and drop) the filed  with the form filed name. ","position":[520,220],"parameters":{"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":""},"documentId":{"__rl":true,"mode":"list","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"rgIk6EXVdPbmPYAl","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"65b5cb47-12d0-42a5-bb95-c023710dd310","name":"Email","type":"n8n-nodes-base.emailSend","position":[780,420],"webhookId":"4f5aacbc-7967-44c0-9e24-00472ec25b48","parameters":{"text":"Please give us your valuable feedback at:\n<<< Your Form Production URL >>>","options":{"appendAttribution":false},"subject":"Feedback","toEmail":"={{ $json.Email }}","fromEmail":"XYZ@gmail.com","emailFormat":"text"},"credentials":{"smtp":{"id":"3QSx1pWoS0BZcK4c","name":"SMTP account"}},"typeVersion":2.1},{"id":"457b43d6-fa50-4259-bf56-b637b1819445","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-240,140],"parameters":{"width":380,"height":600,"content":"## Google Sheets Integration \n#### Create Google Cloud Credentials\nTo connect Google Sheets to n8n, you need to set up OAuth2 authentication through Google Cloud:\n\n**1. Create a Google Cloud Project:**\n - Go to the Google Cloud Console (https://console.cloud.google.com/).\n - Create a new project or select an existing one.\n - Enable the Google Sheets API under APIs & Services > Library.\n\n**2. Set Up OAuth Consent Screen:**\n - Navigate to APIs & Services > OAuth consent screen.\n - Select External user type and fill in required details (e.g., app name, support email).\n - Add the following scopes: .../auth/spreadsheets (for full access to Google Sheets).\n - Save and proceed.\n\n**3. Create OAuth2 Credentials:**\n - Go to APIs & Services > Credentials > Create Credentials > OAuth 2.0 Client IDs.\n - Choose Web application as the application type.\n - Add an Authorized redirect URI (you’ll get this from n8n in the next step).\n - Save to obtain your Client ID and Client Secret."},"typeVersion":1},{"id":"cc0786b3-2340-4fa1-812b-49dc76a3ef0d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-240,20],"parameters":{"width":380,"height":100,"content":"## Integration Notes\nKindly see the node **notes** in the **setting** tab for more information."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"481b316a-890a-4a24-812a-b402638ff547","connections":{"On form submission":{"main":[[{"node":"Google Sheets1","type":"main","index":0}]]},"Google Sheets Trigger":{"main":[[{"node":"If E-mail and Phone Number Both are given","type":"main","index":0},{"node":"If only Phone Number is given","type":"main","index":0}]]},"Send Message on Whatsapp":{"main":[[]]},"If only Phone Number is given":{"main":[[{"node":"Send Message on Whatsapp","type":"main","index":0}],[]]},"If E-mail and Phone Number Both are given":{"main":[[{"node":"Email","type":"main","index":0}],[]]}}}


name: AI Email Organizer for GMail - Advanced Email Management & Sorting
author_name: Milan Vasarhelyi - SmoothWork
author_username: vasarmilan
categories: []
created_at: 2025-06-05T11:49:49.978Z
updated_at: 2025-06-05T11:49:49.978Z
url: https://n8n.io/workflows/4687
scraped_at: 2025-06-19 22:49:03
description:
  What the workflow does
  Organizes your emails into categories, based on your category definitions in a Google Sheets

  How to set up
  Find the detailed setup instructions on the note on the sticky notes within the workflow!

  To get a similar business tool tailored to your processes, book a call with us: Book a Call, or write to me at: hello@smoothwork.ai

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.gmail","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenRouter"]

workflow_json:
  {"meta":{"instanceId":"c8c9ba5d3eb26ae47a06d24ff164a01c0d73ed4753a74903c2bb609d434a0f6b","templateCredsSetupCompleted":true},"nodes":[{"id":"fd08b5e1-f370-46b6-8088-c2e59c73d71c","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[0,0],"parameters":{"rule":{"interval":[{"field":"hours"}]}},"typeVersion":1.2},{"id":"78f01440-ef12-4ee6-a9a5-af4d39104c0c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-520,-140],"parameters":{"width":420,"content":"## 1 - Config\n\n1) [G Sheets to Duplicate](https://docs.google.com/spreadsheets/d/1LKIx1Z3dCSX1uzyZH9s2HE0QRMvLTDI6sJApFU5LTj0/edit?gid=0#gid=0)\n2) Copy the URL of your Sheets in *Config* node ➡️➡️"},"typeVersion":1},{"id":"58417d60-eaaf-4d3f-affb-3a1655d2777b","name":"Config","type":"n8n-nodes-base.set","position":[220,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"cf1d4687-98df-4f65-b72e-6722075ab703","name":"sheets_url","type":"string","value":"https://docs.google.com/spreadsheets/d/1LKIx1Z3dCSX1uzyZH9s2HE0QRMvLTDI6sJApFU5LTj0/edit?gid=0#gid=0"},{"id":"5df50301-a77a-483f-80ce-7717daa04231","name":"extra_filter","type":"string","value":""},{"id":"4fc76947-79c9-4f73-bf36-c18e664b14b4","name":"limit","type":"number","value":2}]}},"typeVersion":3.4},{"id":"8f8812bc-dc04-4405-8d33-e6d457e2d1e8","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[880,0],"parameters":{"text":"=Email subject:\n\n{{ $json.headers.subject }}\n\n\nText: {{ $json.text }}\n\nChoose the best fitting of the category names below, based on their definition:\n{{ JSON.stringify($('Get Labels').all()) }}\n\nImportant: ONLY respond with the category Name. EXACTLY one of the names, do not add any other texts.\n\nSo response should be one of:\n{{ $('Get Labels').all().map(({ json: { Name } }) => Name ).join('\\n') }}","options":{},"promptType":"define"},"typeVersion":1.8},{"id":"e1bf4a15-a2b5-48a4-83d4-af649f20101f","name":"OpenRouter Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[900,220],"parameters":{"model":"deepseek/deepseek-r1:free","options":{}},"credentials":{"openRouterApi":{"id":"iZmDjXmiYrP8nGux","name":"OpenRouter account"}},"typeVersion":1},{"id":"5c597cd5-69f0-42ac-a158-a5ef766157b0","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-520,20],"parameters":{"width":420,"height":400,"content":"## 2 - Connect AI (Optional: find free model)\n\n1) Get OpenRouter API Key: https://openrouter.ai/settings/keys\n\n2) [List of currently free models](https://openrouter.ai/models?max_price=0&order=top-weekly)\n[List of Popular models](https://openrouter.ai/models?order=top-weekly)\n\nBest in 2025 May: deepseek/deepseek-chat-v3-0324:free\nPaid recommended: gpt-4.1-mini\n\n3) Go to **OpenRouter Chat Model** Node\n+ \"Add Credential\" - Enter API Key\n+ Choose your preferred AI model"},"typeVersion":1},{"id":"8ec93dff-52a4-410e-b45f-f492bcc0bb88","name":"Get Labels","type":"n8n-nodes-base.googleSheets","position":[440,0],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"url","value":"={{ $json.sheets_url }}"},"documentId":{"__rl":true,"mode":"url","value":"={{ $json.sheets_url }}"}},"credentials":{"googleSheetsOAuth2Api":{"id":"gbEbCNKqCMSRZPql","name":"Google Sheets account 3"}},"typeVersion":4.5},{"id":"221de31a-e662-402d-8795-1bcd40757855","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-520,-220],"parameters":{"height":80,"content":"# Setup"},"typeVersion":1},{"id":"e41fb3ca-5de0-4a1a-a0f7-4f6fddc739ed","name":"Create Label if Doesn't exist","type":"n8n-nodes-base.gmail","onError":"continueRegularOutput","position":[1620,280],"webhookId":"9482c1cf-26bd-42a6-98cd-78c34810597d","parameters":{"name":"={{ $json.output }}","options":{},"resource":"label","operation":"create"},"credentials":{"gmailOAuth2":{"id":"duhSaIumY2CifCex","name":"Gmail account"}},"typeVersion":2.1},{"id":"fea8a543-0bb4-460e-9862-06c711ec30e6","name":"Get Existing Labels","type":"n8n-nodes-base.gmail","position":[1820,280],"webhookId":"bb39b430-d756-4a9f-8bfb-9d1a63c495c4","parameters":{"resource":"label","returnAll":true},"credentials":{"gmailOAuth2":{"id":"duhSaIumY2CifCex","name":"Gmail account"}},"typeVersion":2.1},{"id":"a45806ca-6b98-411a-a8b2-a8b9f071d6c0","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[1460,0],"parameters":{"options":{}},"typeVersion":3},{"id":"de31842d-88de-4281-a8f7-5e88db026ece","name":"Filter","type":"n8n-nodes-base.filter","position":[2020,280],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e36a5069-09dd-424d-a2b8-096cefa059d7","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.name }}","rightValue":"={{ $('Loop Over Items').item.json.output }}"}]}},"typeVersion":2.2},{"id":"fe0c9d60-bd76-4a72-adb4-0b04bcd971bc","name":"Gmail1","type":"n8n-nodes-base.gmail","position":[2200,280],"webhookId":"332f57fb-6795-4a88-aff7-25d3838ffea7","parameters":{"labelIds":"={{ $json.id }}","resource":"thread","threadId":"={{ $('Loop Over Items').item.json.threadId }}","operation":"addLabels"},"credentials":{"gmailOAuth2":{"id":"duhSaIumY2CifCex","name":"Gmail account"}},"typeVersion":2.1},{"id":"3f3c2627-c20d-443f-8a6f-c803139c4143","name":"Fields For Loop","type":"n8n-nodes-base.set","position":[1240,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"cf0978da-37a2-48e8-8da9-8ec110638a42","name":"threadId","type":"string","value":"={{ $('Get Messages').item.json.threadId }}"},{"id":"71cac306-cca3-4e28-8bba-d920d83037ac","name":"output","type":"string","value":"={{ $json.output }}"}]}},"typeVersion":3.4},{"id":"10ede08e-bdbc-4c3f-8c25-2724bfbda6f5","name":"Get Messages","type":"n8n-nodes-base.gmail","position":[660,0],"webhookId":"5d1e7386-2e1c-4743-b03a-daffea28b66b","parameters":{"limit":"={{ $('Config').item.json.limit }}","simple":false,"filters":{"q":"=has:nouserlabels {{ $('Config').item.json.extra_filter }}"},"options":{},"operation":"getAll"},"credentials":{"gmailOAuth2":{"id":"duhSaIumY2CifCex","name":"Gmail account"}},"executeOnce":true,"typeVersion":2.1},{"id":"f15bda54-5a37-49e1-b06c-322308689c6e","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[220,160],"parameters":{"width":310,"content":"👆⬆️\n1 - sheets_url - Where the category definitions live\n2 - extra_filter - Leave empty to process all emails. Use any gmail search filters.\n3 - limit - max no. of emails to process in a run"},"typeVersion":1},{"id":"d34f5149-6749-4064-bfcf-6fc32651e945","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-280,-540],"parameters":{"color":5,"width":580,"height":400,"content":"# About the Author\n![Milan](https://gravatar.com/avatar/95700d17ba300a9f14c1b8cacf933df7720027b3adda9cbe6183d89142925422?r=pg&d=retro&size=100)\n## Milan - SmoothWork.ai\n\nWe help businesses eliminate busywork by building compact business tools tailored to your process.\n\n▶️ [Check us on YouTube](https://www.youtube.com/@vasarmilan)\n📞 [Book a Free Consulting Call](https://smoothwork.ai/book-a-call/)\n"},"typeVersion":1}],"pinData":{},"connections":{"Config":{"main":[[{"node":"Get Labels","type":"main","index":0}]]},"Filter":{"main":[[{"node":"Gmail1","type":"main","index":0}]]},"Gmail1":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"Fields For Loop","type":"main","index":0}]]},"Get Labels":{"main":[[{"node":"Get Messages","type":"main","index":0}]]},"Get Messages":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Fields For Loop":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Create Label if Doesn't exist","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Config","type":"main","index":0}]]},"Get Existing Labels":{"main":[[{"node":"Filter","type":"main","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Create Label if Doesn't exist":{"main":[[{"node":"Get Existing Labels","type":"main","index":0}]]}}}


name: Build a Chatbot with Reinforced Learning Human Feedback (RLHF) and RAG
author_name: NovaNode
author_username: thomasgpt
categories: []
created_at: 2025-06-05T13:39:18.776Z
updated_at: 2025-06-05T13:39:18.776Z
url: https://n8n.io/workflows/4689
scraped_at: 2025-06-19 22:48:48
description:
  Who is this for?
  This template is designed for internal support teams, product specialists, and knowledge managers who want to build an AI-powered knowledge assistant with retrieval-augmented generation (RAG) and reinforcement learning from human feedback (RLHF) via Telegram.

  What problem is this workflow solving?
  Manual knowledge management and answering support queries can be time-consuming and error-prone. This solution automates importing and indexing official documentation into MongoDB vector search and enhances AI responses with Telegram-based user feedback to continuously improve answer quality.

  What these workflows do
  Workflow 1: Document ingestion & indexing
  Manually triggered workflow imports product documentation from Google Docs.
  Documents are split into manageable chunks and embedded using OpenAI embeddings.
  Embedded document chunks are stored in MongoDB Atlas vector store to enable semantic search.

  Workflow 2: Telegram chat with RLHF feedback loop
  Listens for user messages via Telegram bot integration.
  Uses vector similarity search on MongoDB to retrieve relevant documentation chunks.
  Generates answers with OpenAI GPT-4o-mini model using retrieval-augmented generation.
  Sends answers back via Telegram and waits for user feedback (approval or disapproval).
  Captures feedback, maps it as positive or negative, and stores it with the conversation data for future model improvement.

  Setup
  Setting up vector embeddings
  Authenticate Google Docs and connect your Google Docs URL containing the product documentation you want to index.
  Authenticate MongoDB Atlas and connect the collection where you want to store the vector embeddings. Create a search index on this collection to support vector similarity queries. 
  Ensure the index name matches the one configured in n8n (data_index). 
  See the example MongoDB search index template below for reference.

  Setting up chat with Telegram RLHF
  Create a bot in Telegram with @botFather using the /newbot command.
  Connect the MongoDB database and search index used for vector search in the previous workflow. Also create two new collections in MongoDB Atlas: one for feedback and one for chat history. Create a search index for feedback, copying the provided template.
  Configure the AI system prompt in the “Knowledge Base Agent” node, making sure it references all three tools connected (productDocs, feedbackPositive, feedbackNegative) as provided in the template prompt.
  Make sure
  Product documentation and feedback collections must connect to the same MongoDB database.
  There are three distinct MongoDB collections: one for product documentation, one for feedback, and one for chat history (chat history collection can be separate).
  Telegram API credentials are valid and webhook URLs are correctly set up.

  MongoDB Search Index Templates
  Documentation Collection Index

  {
    "mappings": {
      "dynamic": false,
      "fields": {
        "_id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "embedding": {
          "type": "knnVector",
          "dimensions": 1536,
          "similarity": "cosine"
        },
        "source": {
          "type": "string"
        },
        "doc_id": {
          "type": "string"
        }
      }
    }
  }

  Feedback Collection Index

  {
    "mappings": {
      "dynamic": false,
      "fields": {
        "prompt": {
          "type": "string"
        },
        "response": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "embedding": {
          "type": "knnVector",
          "dimensions": 1536,
          "similarity": "cosine"
        },
        "feedback": {
          "type": "token"
        }
      }
    }
  }

nodes_used:
  ["n8n-nodes-base.telegram","n8n-nodes-base.googleDocs","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","@n8n/n8n-nodes-langchain.documentDefaultDataLoader","@n8n/n8n-nodes-langchain.memoryMongoDbChat","@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas"]

workflow_json:
  {"meta":{"instanceId":"074f90e2bb5206c5f405a8aac6551497c72005283a5405fb08207b1b3a78c2b8","templateCredsSetupCompleted":true},"nodes":[{"id":"e39a0b25-53ce-4ac0-9c93-7750b8e6105b","name":"Knowledge Base Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[220,0],"parameters":{"text":"={{ $json.message.text }}","options":{"systemMessage":"You are the AI assistant for a company specializing in advanced technology solutions. Your task is to help internal users by consulting the official product documentation for the company’s platforms.\n\nAvailable References:\n\nproductDocs: Step-by-step guides, technical configurations, and official manuals from the developer documentation.\n\nfeedbackPositive: Previous responses rated positively by users, useful as examples for generating high-quality answers.\n\nfeedbackNegative: Previous responses rated negatively by users. Use this tool to avoid making similar mistakes in your replies.\n\nCurrently, there are no use cases or update history documented in the available materials.\n\nBehavior Rules\n\nSearch & Response:\n\nAlways consult the official documentation first using the productDocs tool.\n\nAlso search feedbackPositive for highly rated previous responses to similar questions.\n\nCheck feedbackNegative to see if similar answers were poorly rated, and avoid repeating those mistakes.\n\nIf multiple tools return relevant results, combine the information to provide the best answer. If only one tool returns relevant content, use that as your source.\n\nRespond directly and clearly, explaining exactly how to perform the requested task.\n\nDo not filter by category unless the user explicitly asks.\n\nLanguage (Strict Per-Message Rule):\n\nDetect the language of each incoming message individually.\n\nRespond in the same language as the most recent message.\n\nDo not use the language of previous messages or conversation history to decide the language.\n\nLinks (Not Allowed):\n\nNever provide links, even if the user requests them.\n\nIf a user asks for a link, respond with:\n“I cannot provide links. If you need specific information, let me know and I will help with the details.”\n\nResponse Style:\n\nUse a professional, direct, and human tone.\n\nKeep responses between 2 and 4 lines unless the user asks for more detail.\n\nDo not make up information that isn’t in MongoDB.\n\nIf your answer contains numbered steps or lists, always number them sequentially (1, 2, 3...) without skipping or repeating numbers, even if the original content uses a different numbering style."},"promptType":"define"},"typeVersion":1.9},{"id":"775b7991-88f3-4959-a068-3fb2b667567e","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[200,180],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"cJRah9hGPQ7eX4jd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"4c2e0ea6-f5d0-4d5b-a065-606b2dc2cff5","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[440,460],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"cJRah9hGPQ7eX4jd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"2f813af6-3432-4201-93d0-ff503013642e","name":"Document Section Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[580,-340],"parameters":{"options":{"metadata":{"metadataValues":[{"name":"doc_id","value":"={{ $json.documentId }}"}]}},"jsonData":"={{ $json.content }}","jsonMode":"expressionData"},"typeVersion":1},{"id":"c6386d7b-f3cb-4884-9477-a69e9743e6c6","name":"Document Chunker","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","position":[560,-220],"parameters":{"options":{"splitCode":"markdown"},"chunkSize":3000,"chunkOverlap":200},"typeVersion":1},{"id":"4ff1a843-5e1c-4a23-bdf3-2fdc91ba7032","name":"OpenAI Embeddings Generator","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[440,-340],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"cJRah9hGPQ7eX4jd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"64624ed6-cbb2-43c1-b348-df92f26d8efe","name":"Google Docs Importer","type":"n8n-nodes-base.googleDocs","position":[220,-520],"parameters":{"operation":"get","documentURL":"https://docs.google.com/document/d/1gvgp71e9edob8WLqFIYCdzC7kUq3pLO37VKb-a-vVW4/edit?tab=t.0"},"credentials":{"googleDocsOAuth2Api":{"id":"FNXMwqMf7vl1WUFj","name":"Google Docs account"}},"typeVersion":2},{"id":"09c262ab-ba89-429c-b8a8-41c3ae79d97c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-420,-500],"parameters":{"color":5,"content":"Run this workflow manually to import and index Google Docs product documentation into MongoDB with vector embeddings for fast search."},"typeVersion":1},{"id":"f309ff4a-194f-413a-b8f5-d8210cb5e0c6","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-420,40],"parameters":{"color":4,"height":180,"content":"This workflow uses retrieval-augmented generation (RAG) to answer user questions by searching the MongoDB vector store and generating AI responses enhanced with Telegram-based RLHF feedback."},"typeVersion":1},{"id":"caf481b3-7a19-40df-b5fb-52e74a8edd73","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1800,-480],"parameters":{"width":520,"height":1040,"content":"Documentation Search Index\n\n{\n  \"mappings\": {\n    \"dynamic\": false,\n    \"fields\": {\n      \"_id\": {\n        \"type\": \"string\"\n      },\n      \"text\": {\n        \"type\": \"string\"\n      },\n      \"embedding\": {\n        \"type\": \"knnVector\",\n        \"dimensions\": 1536,\n        \"similarity\": \"cosine\"\n      },\n      \"source\": {\n        \"type\": \"string\"\n      },\n      \"doc_id\": {\n        \"type\": \"string\"\n      }\n    }\n  }\n}\n\n\nFeedback Search Index\n\n{\n  \"mappings\": {\n    \"dynamic\": false,\n    \"fields\": {\n      \"prompt\": {\n        \"type\": \"string\"\n      },\n      \"response\": {\n        \"type\": \"string\"\n      },\n      \"text\": {\n        \"type\": \"string\"\n      },\n      \"embedding\": {\n        \"type\": \"knnVector\",\n        \"dimensions\": 1536,\n        \"similarity\": \"cosine\"\n      },\n      \"feedback\": {\n        \"type\": \"token\"\n      }\n    }\n  }\n}\n"},"typeVersion":1},{"id":"8a3abf9e-6f3f-47cf-b9ec-bb9da9835e5c","name":"When clicking \"Execute Workflow\"","type":"n8n-nodes-base.manualTrigger","position":[0,-520],"parameters":{},"typeVersion":1},{"id":"4235ba8c-d671-40b8-b3a4-d7cccac36d54","name":"MongoDB Chat Memory","type":"@n8n/n8n-nodes-langchain.memoryMongoDbChat","position":[320,180],"parameters":{"sessionKey":"={{ $('Receive Message on Telegram').item.json.message.chat.id }}","sessionIdType":"customKey","collectionName":"n8n-template-chat-history"},"credentials":{"mongoDb":{"id":"7riubYENUDZsmjyK","name":"MongoDB account 2"}},"typeVersion":1},{"id":"000e272a-3f19-4c17-86b5-07505eba2c3b","name":"Embeddings OpenAI1","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[160,440],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"cJRah9hGPQ7eX4jd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"dca02c04-2921-4982-83a3-6b2f6fb32663","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[1400,180],"parameters":{"options":{"metadata":{"metadataValues":[{"name":"prompt","value":"={{ $json.prompt }}"},{"name":"response","value":"={{ $json.response }}"},{"name":"feedback","value":"={{ $json.feedback }}"}]}},"jsonData":"={{ $json.text }}","jsonMode":"expressionData"},"typeVersion":1},{"id":"757073e3-f8b5-42b5-ab02-d310d5f6e8a4","name":"Recursive Character Text Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","position":[1380,300],"parameters":{"options":{},"chunkSize":4000},"typeVersion":1},{"id":"588ef94b-9723-440a-ac13-d97d744ae26d","name":"Embeddings OpenAI3","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[320,720],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"cJRah9hGPQ7eX4jd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"355654d8-95e2-4337-9b1f-af2a08573f08","name":"Search Positive Interactions","type":"@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas","position":[160,320],"parameters":{"mode":"retrieve-as-tool","options":{"metadata":{"metadataValues":[{"name":"feedback","value":"positive"}]}},"toolName":"feedbackPositive","mongoCollection":{"__rl":true,"mode":"list","value":"n8n-template-feedback","cachedResultName":"n8n-template-feedback"},"toolDescription":"Retrieve previous examples of similar questions that were rated positively by users. Use this tool before responding to improve your answer based on those approved examples.","vectorIndexName":"template-feedback-search"},"credentials":{"mongoDb":{"id":"7riubYENUDZsmjyK","name":"MongoDB account 2"}},"typeVersion":1.1},{"id":"84a95dfb-6cc4-4a18-be40-6fa201073750","name":"Search Documentation","type":"@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas","position":[440,320],"parameters":{"mode":"retrieve-as-tool","options":{},"toolName":"productDocs","mongoCollection":{"__rl":true,"mode":"list","value":"n8n-template","cachedResultName":"n8n-template"},"toolDescription":"retreive documentation","vectorIndexName":"data_index"},"credentials":{"mongoDb":{"id":"7riubYENUDZsmjyK","name":"MongoDB account 2"}},"typeVersion":1.1},{"id":"f2001c81-081b-4417-8349-3db459c0f191","name":"Search Negative Interactions","type":"@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas","position":[240,580],"parameters":{"mode":"retrieve-as-tool","options":{"metadata":{"metadataValues":[{"name":"feedback","value":"negative"}]}},"toolName":"feedbackNegative","mongoCollection":{"__rl":true,"mode":"list","value":"n8n-template-feedback","cachedResultName":"n8n-template-feedback"},"toolDescription":"Retrieve previous examples of similar questions that were rated negatively by users. Use this tool before responding to avoid generating answers similar to those that did not work well in the past.","vectorIndexName":"template-feedback-search"},"credentials":{"mongoDb":{"id":"7riubYENUDZsmjyK","name":"MongoDB account 2"}},"typeVersion":1.1},{"id":"1a0de194-3508-4d21-b1a2-35c3b4a998c1","name":"Receive Message on Telegram","type":"n8n-nodes-base.telegramTrigger","position":[0,0],"webhookId":"fff1b90c-59ce-406b-a7f0-08953c90c0ce","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"wb9guorEXe6W5V8C","name":"Telegram account"}},"typeVersion":1.2},{"id":"92458560-feb5-40df-b52a-ec1c5156829d","name":"Send Message on Telegram, Wait for Feedback","type":"n8n-nodes-base.telegram","position":[600,0],"webhookId":"ed8fc221-70ad-47df-b70e-6667c580553b","parameters":{"chatId":"={{ $('Receive Message on Telegram').item.json.message.chat.id }}","message":"={{ $json.output }}","options":{"appendAttribution":false},"operation":"sendAndWait","approvalOptions":{"values":{"approvalType":"double"}}},"credentials":{"telegramApi":{"id":"wb9guorEXe6W5V8C","name":"Telegram account"}},"typeVersion":1.2},{"id":"ef40200d-5f19-4199-8ae3-9f2e0f52ac1b","name":"Map feedback data","type":"n8n-nodes-base.code","position":[820,0],"parameters":{"jsCode":"let response;\n\nif ($input.first().json.data.approved) {\n  response = \"positive\"\n} \nelse {\n  response = \"negative\"\n}\n\nreturn {\n  feedback: response\n}\n"},"typeVersion":2},{"id":"d688073c-9a97-4b39-9640-c368cccf3491","name":"Set feedback fields for collection storage","type":"n8n-nodes-base.set","position":[1040,0],"parameters":{"values":{"string":[{"name":"prompt","value":"={{ $('Receive Message on Telegram').item.json.message.text }}"},{"name":"response","value":"={{ $('Knowledge Base Agent').item.json.output }}"},{"name":"text","value":"=Prompt: {{ $('Receive Message on Telegram').item.json.message.text }}. Completion: {{ $('Knowledge Base Agent').item.json.output }}"},{"name":"feedback","value":"={{ $json.feedback }}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"9907480f-3e5d-4240-adbb-790be2d68496","name":"Submit embedded chat feedback","type":"@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas","position":[1260,0],"parameters":{"mode":"insert","options":{},"mongoCollection":{"__rl":true,"mode":"list","value":"n8n-template-feedback","cachedResultName":"n8n-template-feedback"},"vectorIndexName":"template-feedback-search","embeddingBatchSize":1},"credentials":{"mongoDb":{"id":"7riubYENUDZsmjyK","name":"MongoDB account 2"}},"typeVersion":1.1},{"id":"1a470ad3-845a-4890-b103-65a21b1940de","name":"OpenAI Embeddings Generator1","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[1260,180],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"cJRah9hGPQ7eX4jd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"fdc22256-f014-4ed0-8781-1abb20134b1a","name":"MongoDB Documentation Inserter","type":"@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas","position":[440,-520],"parameters":{"mode":"insert","options":{},"mongoCollection":{"__rl":true,"mode":"list","value":"n8n-template","cachedResultName":"n8n-template"},"vectorIndexName":"data_index"},"credentials":{"mongoDb":{"id":"7riubYENUDZsmjyK","name":"MongoDB account 2"}},"typeVersion":1.1}],"pinData":{},"connections":{"Document Chunker":{"ai_textSplitter":[[{"node":"Document Section Loader","type":"ai_textSplitter","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Search Documentation","type":"ai_embedding","index":0}]]},"Map feedback data":{"main":[[{"node":"Set feedback fields for collection storage","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Knowledge Base Agent","type":"ai_languageModel","index":0}]]},"Embeddings OpenAI1":{"ai_embedding":[[{"node":"Search Positive Interactions","type":"ai_embedding","index":0}]]},"Embeddings OpenAI3":{"ai_embedding":[[{"node":"Search Negative Interactions","type":"ai_embedding","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Submit embedded chat feedback","type":"ai_document","index":0}]]},"MongoDB Chat Memory":{"ai_memory":[[{"node":"Knowledge Base Agent","type":"ai_memory","index":0}]]},"Google Docs Importer":{"main":[[{"node":"MongoDB Documentation Inserter","type":"main","index":0}]]},"Knowledge Base Agent":{"main":[[{"node":"Send Message on Telegram, Wait for Feedback","type":"main","index":0}]]},"Search Documentation":{"ai_tool":[[{"node":"Knowledge Base Agent","type":"ai_tool","index":0}]]},"Document Section Loader":{"ai_document":[[{"node":"MongoDB Documentation Inserter","type":"ai_document","index":0}]]},"OpenAI Embeddings Generator":{"ai_embedding":[[{"node":"MongoDB Documentation Inserter","type":"ai_embedding","index":0}]]},"Receive Message on Telegram":{"main":[[{"node":"Knowledge Base Agent","type":"main","index":0}]]},"OpenAI Embeddings Generator1":{"ai_embedding":[[{"node":"Submit embedded chat feedback","type":"ai_embedding","index":0}]]},"Search Negative Interactions":{"ai_tool":[[{"node":"Knowledge Base Agent","type":"ai_tool","index":0}]]},"Search Positive Interactions":{"ai_tool":[[{"node":"Knowledge Base Agent","type":"ai_tool","index":0}]]},"MongoDB Documentation Inserter":{"main":[[]]},"When clicking \"Execute Workflow\"":{"main":[[{"node":"Google Docs Importer","type":"main","index":0}]]},"Recursive Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader","type":"ai_textSplitter","index":0}]]},"Set feedback fields for collection storage":{"main":[[{"node":"Submit embedded chat feedback","type":"main","index":0}]]},"Send Message on Telegram, Wait for Feedback":{"main":[[{"node":"Map feedback data","type":"main","index":0}]]}}}


name: 🤖🚚 AI agent for Transportation Orders Management with GPT-4o and Open Route API
author_name: Samir Saci
author_username: samirsaci
categories: []
created_at: 2025-06-05T14:42:16.942Z
updated_at: 2025-06-05T14:42:16.942Z
url: https://n8n.io/workflows/4692
scraped_at: 2025-06-19 22:49:50
description:
  Tags*: AI Agent, Supply Chain, Logistics, Route Planning, Transportation, GPS API

  Context

  Hi! I’m Samir — a Supply Chain Engineer and Data Scientist based in Paris, and founder of LogiGreen Consulting.

  I help companies improve their logistics operations using data, AI, and automation to reduce costs and minimize environmental footprint.

  &gt; Let’s use n8n to automate order management for transportation companies!

  📬 For business inquiries, you can add find me on LinkedIn

  Who is this template for?

  This workflow is designed for small transportation companies and carriers that handle their delivery request by email.



  Two AI Agent nodes and a connection to Openroute Service API are used to parse the content of pickup requests



  The results include driving time and driving distance in a comprehensive and concise reply generated by the second AI Agent.

  How does it work?

  This n8n workflow automates the processing of shipment request emails and enriches them with distance and driving time using the OpenRouteService API.

  📥 Extract structured logistics data (pickup, delivery, contact) using an AI Agent  
  📌 Geocode pickup and delivery addresses into GPS coordinates  
  🚚 Query OpenRouteService using the truck (driving-hgv) profile  
  📏 Get the driving distance (in km) and estimated time (in minutes)  
  📤 Store all data in a connected Google Sheet  
  📧 Send back a professional confirmation email to the customer  

  Steps:
  📩 Trigger the workflow from a new Gmail message  
  🧠 Use the AI Agent to extract structured data from the email  
  📊 Record and enrich shipment details in a Google Sheet  
  🗺️ Geocode addresses into coordinates  
  🚦 Get driving distance & time via OpenRouteService  
  📬 Generate and send back a confirmation email using AI 

  What do I need to get started?

  This workflow requires:

  A Gmail account to receive shipment requests  
  A Google Sheet to log and update shipment info  
  A free OpenRouteService API key  
    👉 Get one here  
  OpenAI API access to use the AI Agent node

  Next Steps

  🗒️ Follow the sticky notes inside the workflow canvas to:

  Plug your Gmail and Google credentials  
  Add your OpenRouteService API key  
  Test by sending a sample email and see the response!


  🎥 Check the Tutorial

  This template was built using n8n v1.93.0  
  Submitted: June 5, 2025

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

workflow_json:
  {"meta":{"instanceId":""},"nodes":[{"id":"f24429ab-1276-4655-a3ef-1fbbb6d80602","name":"Gmail Trigger","type":"n8n-nodes-base.gmailTrigger","position":[20,400],"parameters":{"simple":false,"filters":{},"options":{"downloadAttachments":false},"pollTimes":{"item":[{"mode":"everyMinute"}]}},"notesInFlow":true,"typeVersion":1.2},{"id":"62ced604-4de3-4a6d-bbfe-b1c2f985117f","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[560,560],"parameters":{"jsonSchemaExample":"{\n  \"shipment_number\": \"15487-PLO\",\n  \"pickup_location\": \"Centre de Distribution Leclerc\",\n  \"pickup_address\": \"77 Rue Albert Garry, 94450 Limeil-Brévannes\",\n  \"expected_pickup_time\": \"24-09-2024, 09:00:00\",\n  \"temperature_control\": \"Chilled\",\n  \"quantity\": \"12 pallets\",\n  \"destination_store_name\": \"E.Leclerc Store 124\",\n  \"destination_address\": \"43-45 Quai Jules Guesde, 94405 Vitry-sur-Seine\",\n  \"expected_delivery_time\": \"24-09-2024, 18:00:00\",\n  \"sender_name\":\"Jacques Chirac\",\n  \"sender_company\": \"RPR\"\n}\n\n"},"typeVersion":1.2},{"id":"767ee78a-d0ff-4399-bea1-4310aff116f7","name":"AI Agent Parser","type":"@n8n/n8n-nodes-langchain.agent","position":[320,400],"parameters":{"text":"=Here is an email from a customer requesting a shipment:\n\nSubject: {{ $json.subject }}\nBody: {{ $json.text }}\n\nPlease extract all the structured logistics data based on the format provided.","options":{"systemMessage":"=You are a logistics assistant for a transportation company. \n\nYour job is to extract all structured data from shipping request emails sent by customers (typically retail chains like E.Leclerc). These emails contain information about the sender, shipment pickup and delivery details.\n\nReturn the result as a JSON object with the following fields:\n\n{\n  \"shipment_number\": \"\",\n  \"pickup_location\": \"\",\n  \"pickup_address\": \"\",\n  \"expected_pickup_time\": \"\",\n  \"temperature_control\": \"\",\n  \"quantity\": \"\",\n  \"destination_store_name\": \"\",\n  \"destination_address\": \"\",\n  \"expected_delivery_time\": \"\",\n  \"sender_name\": \"\",\n  \"sender_company\": \"\"\n}\n\nOnly include values mentioned explicitly in the email. Do not infer or guess. If a field is missing, set its value to `null`.\n"},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"8a0c7eb8-322b-47c1-8547-2afe0370f3fc","name":"Record Email Content","type":"n8n-nodes-base.googleSheets","position":[820,440],"parameters":{"columns":{"value":{"pickup_address":"={{ $json.output.pickup_address }}","pickup_location":"={{ $json.output.pickup_location }}","shipment_number":"={{ $json.output.shipment_number }}","destination_address":"={{ $json.output.destination_address }}","temperature_control":"={{ $json.output.temperature_control }}","expected_pickup_time":"={{ $json.output.expected_pickup_time }}","destination_store_name":"={{ $json.output.destination_store_name }}","expected_delivery_time":"={{ $json.output.expected_delivery_time}}"},"schema":[{"id":"shipment_number","type":"string","display":true,"removed":false,"required":false,"displayName":"shipment_number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_location","type":"string","display":true,"required":false,"displayName":"pickup_location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_address","type":"string","display":true,"required":false,"displayName":"pickup_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_longitude","type":"string","display":true,"required":false,"displayName":"pickup_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_latitude","type":"string","display":true,"required":false,"displayName":"pickup_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_pickup_time","type":"string","display":true,"removed":false,"required":false,"displayName":"expected_pickup_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"temperature_control","type":"string","display":true,"required":false,"displayName":"temperature_control","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_store_name","type":"string","display":true,"required":false,"displayName":"destination_store_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_address","type":"string","display":true,"required":false,"displayName":"destination_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_longitude","type":"string","display":true,"required":false,"displayName":"destination_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_latitude","type":"string","display":true,"required":false,"displayName":"destination_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_delivery_time","type":"string","display":true,"removed":false,"required":false,"displayName":"expected_delivery_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_distance","type":"string","display":true,"required":false,"displayName":"driving_distance","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_time","type":"string","display":true,"required":false,"displayName":"driving_time","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["shipment_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"b2c5c252-c464-4094-93c0-9c94ccd82b14","name":"Collect Addresses","type":"n8n-nodes-base.googleSheets","position":[820,640],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.output.shipment_number }}","lookupColumn":"shipment_number"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ePnaAS4PG1sN2E50","name":"Google Sheets LogiGreenBot"}},"notesInFlow":true,"typeVersion":4.6},{"id":"840698a1-2f87-43d1-a6d3-27a107d4038b","name":"5 sec","type":"n8n-nodes-base.wait","position":[1700,540],"webhookId":"6ecebf96-14ed-4c7b-b467-eb48c143408e","parameters":{},"typeVersion":1.1},{"id":"82cc284e-14a4-45de-a463-511e2a70e182","name":"Query Open Route API Pickup","type":"n8n-nodes-base.httpRequest","position":[1040,540],"parameters":{"url":"https://api.openrouteservice.org/geocode/search","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"api_key"},{"name":"text","value":"={{ $json.pickup_address }}"},{"name":"boundary.country","value":"=FR"},{"name":"sources","value":"openstreetmap"},{"name":"size","value":"1"}]},"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json; charset=utf-8"},{"name":"Accept","value":"application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8"}]}},"notesInFlow":true,"typeVersion":4.2},{"id":"ba4f843c-f922-486d-944c-d9ea6655ccda","name":"Save Pickup GPS","type":"n8n-nodes-base.googleSheets","position":[1480,540],"parameters":{"columns":{"value":{"pickup_latitude":"={{ $json.latitude }}","shipment_number":"={{ $('AI Agent Parser').item.json.output.shipment_number }}","pickup_longitude":"={{ $json.longitude }}"},"schema":[{"id":"shipment_number","type":"string","display":true,"removed":false,"required":false,"displayName":"shipment_number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_location","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_address","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_longitude","type":"string","display":true,"required":false,"displayName":"pickup_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_latitude","type":"string","display":true,"required":false,"displayName":"pickup_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_pickup_time","type":"string","display":true,"removed":true,"required":false,"displayName":"expected_pickup_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"temperature_control","type":"string","display":true,"removed":true,"required":false,"displayName":"temperature_control","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_store_name","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_store_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_address","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_longitude","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_latitude","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_delivery_time","type":"string","display":true,"removed":true,"required":false,"displayName":"expected_delivery_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_distance","type":"string","display":true,"removed":true,"required":false,"displayName":"driving_distance","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_time","type":"string","display":true,"removed":true,"required":false,"displayName":"driving_time","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":["shipment_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"e87c8abb-34b4-41c2-8c4a-139248d41a20","name":"GPS Pickup","type":"n8n-nodes-base.set","position":[1260,540],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e4c92077-f294-4e49-8276-20d1441c0c2c","name":"longitude","type":"string","value":"={{ $json.features[0].geometry.coordinates[0] }}"},{"id":"899e5304-e7a1-4ce1-bf9a-f403d74934fb","name":"latitude","type":"string","value":"={{ $json.features[0].geometry.coordinates[1] }}"},{"id":"5b35642b-dda4-42b8-b7bb-1275616bfb59","name":"borough","type":"string","value":"={{ $json.features[0].properties.borough }}"},{"id":"aa74bd9a-f543-48e1-a69b-0e6472bda053","name":"neighbourhood","type":"string","value":"={{ $json.features[0].properties.neighbourhood }}"},{"id":"7f303dc8-4e28-4d46-8e3e-9db00dbcac3a","name":"localadmin","type":"string","value":"={{ $json.features[0].properties.localadmin }}"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"556c1a60-e086-47a2-bafe-2aa3646c7846","name":"Query Open Route API Delivery","type":"n8n-nodes-base.httpRequest","position":[1040,740],"parameters":{"url":"https://api.openrouteservice.org/geocode/search","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"api_key"},{"name":"text","value":"={{ $json.destination_address }}"},{"name":"boundary.country","value":"=FR"},{"name":"sources","value":"openstreetmap"},{"name":"size","value":"1"}]},"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json; charset=utf-8"},{"name":"Accept","value":"application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8"}]}},"notesInFlow":true,"typeVersion":4.2},{"id":"dd81a2cb-fe60-4e3c-95c7-08b89b111ad8","name":"GPS Delivery","type":"n8n-nodes-base.set","position":[1260,740],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e4c92077-f294-4e49-8276-20d1441c0c2c","name":"longitude","type":"string","value":"={{ $json.features[0].geometry.coordinates[0] }}"},{"id":"899e5304-e7a1-4ce1-bf9a-f403d74934fb","name":"latitude","type":"string","value":"={{ $json.features[0].geometry.coordinates[1] }}"},{"id":"5b35642b-dda4-42b8-b7bb-1275616bfb59","name":"borough","type":"string","value":"={{ $json.features[0].properties.borough }}"},{"id":"aa74bd9a-f543-48e1-a69b-0e6472bda053","name":"neighbourhood","type":"string","value":"={{ $json.features[0].properties.neighbourhood }}"},{"id":"7f303dc8-4e28-4d46-8e3e-9db00dbcac3a","name":"localadmin","type":"string","value":"={{ $json.features[0].properties.localadmin }}"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"652c3a8f-9e47-4386-a932-be99a94e72bd","name":"Save Delivery GPS","type":"n8n-nodes-base.googleSheets","position":[1480,740],"parameters":{"columns":{"value":{"shipment_number":"={{ $('AI Agent Parser').item.json.output.shipment_number }}","destination_latitude":"={{ $json.latitude }}","destination_longitude":"={{ $json.longitude }}"},"schema":[{"id":"shipment_number","type":"string","display":true,"removed":false,"required":false,"displayName":"shipment_number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_location","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_address","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_longitude","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_latitude","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_pickup_time","type":"string","display":true,"removed":true,"required":false,"displayName":"expected_pickup_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"temperature_control","type":"string","display":true,"removed":true,"required":false,"displayName":"temperature_control","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_store_name","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_store_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_address","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_longitude","type":"string","display":true,"required":false,"displayName":"destination_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_latitude","type":"string","display":true,"required":false,"displayName":"destination_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_delivery_time","type":"string","display":true,"removed":true,"required":false,"displayName":"expected_delivery_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_distance","type":"string","display":true,"removed":true,"required":false,"displayName":"driving_distance","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_time","type":"string","display":true,"removed":true,"required":false,"displayName":"driving_time","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":["shipment_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"0d31ad24-c3b3-42bb-b98a-ad443005341a","name":"Collect Coordinates","type":"n8n-nodes-base.googleSheets","position":[820,940],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.output.shipment_number }}","lookupColumn":"shipment_number"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ePnaAS4PG1sN2E50","name":"Google Sheets LogiGreenBot"}},"notesInFlow":true,"typeVersion":4.6},{"id":"f813ecde-ea6e-4780-9bae-2be7e171419d","name":"Request Open Route API","type":"n8n-nodes-base.httpRequest","position":[1040,940],"parameters":{"url":"https://api.openrouteservice.org/v2/directions/driving-hgv","options":{"response":{"response":{"responseFormat":"json"}}},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"api_key"},{"name":"start","value":"={{ $json.pickup_longitude }}, {{ $json.pickup_latitude }}"},{"name":"end","value":"={{ $json.destination_longitude }}, {{ $json.destination_latitude }}"}]},"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json; charset=utf-8"},{"name":"Accept","value":"application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8"}]}},"notesInFlow":true,"typeVersion":4.2},{"id":"f9fb4321-398f-439e-832a-531245cad968","name":"Save Results","type":"n8n-nodes-base.googleSheets","position":[1480,940],"parameters":{"columns":{"value":{"driving_time":"={{ $json.duration }}","shipment_number":"={{ $('AI Agent Parser').item.json.output.shipment_number }}","driving_distance":"={{ $json.distance }}"},"schema":[{"id":"shipment_number","type":"string","display":true,"removed":false,"required":false,"displayName":"shipment_number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_location","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_address","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_longitude","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"pickup_latitude","type":"string","display":true,"removed":true,"required":false,"displayName":"pickup_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_pickup_time","type":"string","display":true,"removed":true,"required":false,"displayName":"expected_pickup_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"temperature_control","type":"string","display":true,"removed":true,"required":false,"displayName":"temperature_control","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_store_name","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_store_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_address","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_longitude","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"destination_latitude","type":"string","display":true,"removed":true,"required":false,"displayName":"destination_latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"expected_delivery_time","type":"string","display":true,"removed":true,"required":false,"displayName":"expected_delivery_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_distance","type":"string","display":true,"removed":false,"required":false,"displayName":"driving_distance","defaultMatch":false,"canBeUsedToMatch":true},{"id":"driving_time","type":"string","display":true,"removed":false,"required":false,"displayName":"driving_time","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":["shipment_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"17wbroY0w6xmw8AT-p2c_n1WbHzmfesz6d1DJbp39fn8","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"credentials":{"googleSheetsOAuth2Api":{"id":"ePnaAS4PG1sN2E50","name":"Google Sheets LogiGreenBot"}},"notesInFlow":true,"typeVersion":4.6},{"id":"ac878430-fe68-42ee-9b0b-20ad9a245d9b","name":"Collect Shipment Information","type":"n8n-nodes-base.googleSheets","position":[800,1520],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.output.shipment_number }}","lookupColumn":"shipment_number"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"Orders"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"21631974-c8a7-4b0c-a19b-3edcf2682200","name":"Driving Time & Distance","type":"n8n-nodes-base.set","position":[1260,940],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4d0acd1a-c049-4353-9fb7-8eb08c138b9c","name":"distance","type":"string","value":"={{ ($json.features[0].properties.segments[0].distance.round()/1000).toFixed(2) }}"},{"id":"2a6ff46a-f620-4dad-a60a-018b8add76d5","name":"duration","type":"string","value":"={{ ($json.features[0].properties.segments[0].duration/60).toFixed(2) }}"},{"id":"de20932f-4eb5-4372-ad6d-64679df104cb","name":"n_steps","type":"number","value":"={{ $json.features[0].properties.segments[0].steps.length }}"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"aad7e5f3-5eae-4be1-beb5-e57f7723086f","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[940,1660],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"typeVersion":1.2},{"id":"a73dfa1c-4f4e-4cab-950d-91021fc28c5d","name":"AI Agent Reply","type":"@n8n/n8n-nodes-langchain.agent","position":[1000,1520],"parameters":{"text":"=Here is the output:\n\n- Shipment Number: {{ $json.shipment_number }}\n- Pickup Location: {{ $json.pickup_location }}\n- Pickup Address: {{ $json.pickup_address }}  \n- Expected Pickup Time: {{ $json.expected_pickup_time }}  \n- Temperature Control: {{ $json.temperature_control }}  \n- Destination: {{ $json.destination_store_name }} \n- Destination Address: {{ $json.destination_address }}\n- Expected Delivery Time: {{ $json.expected_delivery_time }} \n- Driving Distance: {{ $json.driving_distance }} km\n- Estimated Transit Time: {{ $json.driving_time }} min\n- Contact Name: {{ $('AI Agent Parser').item.json.output.sender_name }}\n- Contact Company: {{ $('AI Agent Parser').item.json.output.sender_company }}\n","options":{"systemMessage":"=You are a logistics assistant working for a transportation company. Your job is to write polite and professional response confirming shipment planification to retail customers.\n\nYour tone should be clear, efficient, and customer-friendly. Keep it concise and formal.\n\nThe confirmation must repeat the key shipment details to avoid confusion and should reassure the customer that the transport has been scheduled.\n\nDo not invent details — only use the provided data. The email must be in **English**.\n\n⚠️ Always format the result in **HTML**, not plain text or Markdown. Use proper HTML tags like `<p>`, `<strong>`, `<br>`, and `<ul><li>` where needed.\n\nYou do not need to add a subject, just the body.\n\nAbout you\n[Name]: LogiGreen Bot\n[Position]: Transportation Planner\n[Company]: LogiGreen Transportation\n[Contact]: logigreenbot@gmail.com\n\n"},"promptType":"define"},"typeVersion":1.9},{"id":"4d83c51c-b124-4732-9757-6b5490002425","name":"Reply","type":"n8n-nodes-base.gmail","position":[1340,1520],"webhookId":"2b6b8447-1f25-4ceb-8c5f-e14f6b6f425a","parameters":{"message":"={{ $json.output }}","options":{},"messageId":"={{ $('Gmail Trigger').item.json.id }}","operation":"reply"},"notesInFlow":true,"typeVersion":2.1},{"id":"958e7446-0078-4823-a696-eca00fa6c3fb","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[780,0],"parameters":{"color":7,"width":1040,"height":1100,"content":"### 3. Record Shipment Request Information and fetch distance and driving time using Open Route API\nThis starts by recording all the information parsed by the AI node. Then, we use the **Open Route API** to complete with **geocoding data** *(GPS Coordinates)* that will be used to fetch **driving distance and time**.\n\n#### How to setup?\n- **Setup API Credentials**\n  1. Get your free API key: [Open Route API Documentation](https://openrouteservice.org/dev/#/api-docs)\n  2. Fill the API key in the HTTP request node\n  3. Select the driving mode (**driving-car**: individual truck) or (**driving-hgv**: commercial truck)\n- **Load records in the Google Sheet Node**:\n   1. Add your Google Sheet API credentials to access the Google Sheet file\n   2. Select the file using the list, an URL or an ID\n   3. Select the sheet in which you want to record your working sessions\n   4. Map the fields: **shipment_number**, **pickup_location**, **pickup_address**, **pickup_longitude**, **pickup_latitude**, **expected_pickup_time**,\t**temperature_control**, **destination_store_name**, **destination_address**, **destination_longitude**, **destination_latitude**, **expected_delivery_time**, **driving_distance**, **driving_time**\t\t\t\t\t\t\t\t\t\t\t\t\t\n  [Learn more about the Google Sheet Node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n\nLongitudes, latitudes, distance and time will be fetched from the **Open Route API**.\n"},"typeVersion":1},{"id":"1ef6e4fd-67a2-4d07-a6a8-294456fc3fad","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"color":7,"width":180,"height":700,"content":"### 1. Workflow Trigger with Gmail Trigger\nThe workflow is triggered by a new email received in your Gmail mailbox dedicated to process **shipment request**.\n\n#### How to setup?\n- **Gmail Trigger Node:** set up your Gmail API credentials\n[Learn more about the Gmail Trigger Node](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger)\n"},"typeVersion":1},{"id":"c470fc5f-b74b-4b3f-b9bd-6e52220f9159","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[200,0],"parameters":{"color":7,"width":560,"height":700,"content":"### 2. AI Agent to parse shipment information from email\nThis node will analyze the content of the email to extract information about the **sender** *(name, company)* and the **shipment** *(departure, arrival, timing and locations)*.\n\n#### How to setup?\n- **AI Agent with the Chat Model**:\n   1. Add a **chat model** with the required credentials *(Example: Open AI 4o-mini)*\n   2. Adapt the system prompt to the format of emails you expect to receive *(type of information included)*\n  [Learn more about the AI Agent Node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n"},"typeVersion":1},{"id":"80ed9218-8c59-4b1b-b3a6-f97f2ece11c8","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[240,560],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"typeVersion":1.2},{"id":"30592283-3d1e-4f41-b18f-55e4dd87457e","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[780,1120],"parameters":{"color":7,"width":680,"height":720,"content":"### 4. Reply with a confirmation of shipment allocation\nWe first collect all the information from the **Google Sheets** that will be used by the AI Agent to generate a reply by email.\n#### How to setup?\n- **Load records in the Google Sheet Node**:\n   1. Add your Google Sheet API credentials to access the Google Sheet file\n   2. Select the file using the list, an URL or an ID\n   3. Select the sheet in which you want to record your working sessions\t\t\t\t\t\t\t\t\t\t\t\n  [Learn more about the Google Sheet Node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n- **AI Agent with the Chat Model**:\n   1. Add a **chat model** with the required credentials *(Example: Open AI 4o-mini)*\n   2. Adapt the system prompt with your company information **(name, contact, position)**\n  [Learn more about the AI Agent Node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\n"},"typeVersion":1},{"id":"7cce6421-6771-4cdf-a8aa-6454c6a4e27f","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[0,720],"parameters":{"width":580,"height":380,"content":"### [Check the Tutorial](https://youtu.be/0InkUBOUMQQ)\n![Thumbnail](https://www.samirsaci.com/content/images/2025/06/temp.png)"},"typeVersion":1}],"pinData":{},"connections":{"GPS Pickup":{"main":[[{"node":"Save Pickup GPS","type":"main","index":0}]]},"GPS Delivery":{"main":[[{"node":"Save Delivery GPS","type":"main","index":0}]]},"Gmail Trigger":{"main":[[{"node":"AI Agent Parser","type":"main","index":0}]]},"AI Agent Reply":{"main":[[{"node":"Reply","type":"main","index":0}]]},"AI Agent Parser":{"main":[[{"node":"Collect Coordinates","type":"main","index":0},{"node":"Record Email Content","type":"main","index":0},{"node":"Collect Addresses","type":"main","index":0},{"node":"Collect Shipment Information","type":"main","index":0}]]},"Save Pickup GPS":{"main":[[{"node":"5 sec","type":"main","index":0}]]},"Collect Addresses":{"main":[[{"node":"Query Open Route API Pickup","type":"main","index":0},{"node":"Query Open Route API Delivery","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent Reply","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model2":{"ai_languageModel":[[{"node":"AI Agent Parser","type":"ai_languageModel","index":0}]]},"Collect Coordinates":{"main":[[{"node":"Request Open Route API","type":"main","index":0}]]},"Request Open Route API":{"main":[[{"node":"Driving Time & Distance","type":"main","index":0}]]},"Driving Time & Distance":{"main":[[{"node":"Save Results","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"AI Agent Parser","type":"ai_outputParser","index":0}]]},"Query Open Route API Pickup":{"main":[[{"node":"GPS Pickup","type":"main","index":0}]]},"Collect Shipment Information":{"main":[[{"node":"AI Agent Reply","type":"main","index":0}]]},"Query Open Route API Delivery":{"main":[[{"node":"GPS Delivery","type":"main","index":0}]]}}}


name: Get Real-Time Security Insights with NixGuard RAG and Wazuh Integration
author_name: Jonathan | NEX
author_username: nex
nodes_used: ["n8n-nodes-base.httpRequest","n8n-nodes-base.code"]
categories: []
created_at: 2025-06-05T14:45:24.254Z
updated_at: 2025-06-05T14:45:24.254Z
url: https://n8n.io/workflows/4693
scraped_at: 2025-06-19 22:49:02
description:
  Effortlessly integrate NixGuard API into your n8n workflows for real-time security insights using your API key. This connector enables seamless interaction with Nix, providing rapid Retrieval-Augmented Generation (RAG) event knowledge with Wazuh integration - completely free and set up in under 5 minutes!

  🚀 Features:
  ✅ Query NixGuard's AI-driven security insights via API authentication
  ✅ Real-time security event knowledge integration
  ✅ Plug-and-play workflow trigger for effortless automation
  ✅ Wazuh compatibility for full security visibility

  🛠 How to Use:
  1️⃣ Add your API Key to authenticate with NixGuard.
  2️⃣ Integrate with your existing n8n workflows using the workflow trigger (default enabled).
  3️⃣ (Optional) Activate the chat trigger to streamline security queries via chat-based inputs.
  4️⃣ Run the workflow and get instant security intelligence!

  📢 Perfect for: Startup CTO's, SOC teams, security engineers, and developers needing real-time security automation within their infrastructure.

  🔗 Learn more about NixGuard: thenex.world  
  🔗 Get started with a free security subscription: thenex.world/security/subscribe  

workflow_json:
  {"id":"I0nUORqYTwDFZa51","meta":{"instanceId":"558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a"},"name":"Get Real-Time Security Insights with NixGuard RAG and Wazuh Integration","tags":[{"id":"q7fiN9zbxrNmsNbT","name":"NixGuard","createdAt":"2025-06-10T17:12:53.669Z","updatedAt":"2025-06-10T17:12:53.669Z"},{"id":"CaOFkWRRUPhl5zch","name":"NEX","createdAt":"2025-06-10T17:12:57.408Z","updatedAt":"2025-06-10T17:12:57.408Z"},{"id":"pQg0XfRi6hFoyuVB","name":"Wazuh","createdAt":"2025-06-10T17:13:00.952Z","updatedAt":"2025-06-10T17:13:00.952Z"},{"id":"nBFKoKp6KIhjRaEn","name":"Security","createdAt":"2025-06-10T17:13:09.106Z","updatedAt":"2025-06-10T17:13:09.106Z"},{"id":"to1DVLh70D0WBlIi","name":"Cybersecurity","createdAt":"2025-06-10T17:13:17.593Z","updatedAt":"2025-06-10T17:13:17.593Z"}],"nodes":[{"id":"dc94efb5-91a0-4d2b-9cd0-e72b1e97498d","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","disabled":true,"position":[-400,-80],"webhookId":"ec75b9db-22e6-4bb3-88c1-66afced7d2e5","parameters":{"options":{}},"typeVersion":1.1},{"id":"de233ffa-d892-4b6a-997f-5a7af8b51db8","name":"Execute Workflow Trigger","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-400,100],"parameters":{},"typeVersion":1},{"id":"ce9d6961-8cf9-435b-9ba9-88cc043ac60f","name":"Send Request to NixGuard API","type":"n8n-nodes-base.httpRequest","position":[640,120],"parameters":{"url":"https://nix.thenex.world","method":"POST","options":{},"sendBody":true,"jsonHeaders":"{\"Content-Type\": \"application/json\"}","sendHeaders":true,"bodyParameters":{"parameters":[{"name":"apiKey","value":"={{ $json.apiKey }}"},{"name":"prompt","value":"={{ $json.chatInput }}"}]},"specifyHeaders":"json"},"typeVersion":4.2},{"id":"aa084f8f-8f81-4079-a61a-3f3772ed351a","name":"Format API Response","type":"n8n-nodes-base.set","position":[780,340],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e41e3031-3669-432b-a669-8ece63e0a2a4","name":"content","type":"string","value":"={{ $json.content }}"}]}},"typeVersion":3.4},{"id":"b3bb011b-cf24-4c9e-b4aa-20f6718cc798","name":"Prepare Final Output","type":"n8n-nodes-base.code","position":[940,280],"parameters":{"jsCode":"const output = items[0].json.content;\n\nreturn [{json: {output}}];"},"typeVersion":2},{"id":"283c8732-fe9e-4e85-83f4-9ff00241b08b","name":"Parse NixGuard Response","type":"n8n-nodes-base.code","position":[620,400],"parameters":{"jsCode":"const nixResponse = JSON.parse($input.first().json.data);\nconst nixResult = nixResponse.result;\n\nreturn nixResponse;"},"typeVersion":2},{"id":"1bd49a13-db15-45ac-8d83-3a198b6d401c","name":"Merge Input Data","type":"n8n-nodes-base.merge","position":[160,-20],"parameters":{},"typeVersion":3},{"id":"60ce604d-a084-4895-9c3b-37ff29f98fd4","name":"Aggregate Security Data","type":"n8n-nodes-base.aggregate","position":[320,40],"parameters":{"options":{},"aggregate":"aggregateAllItemData"},"typeVersion":1},{"id":"9835ff41-0cae-491f-aade-2e8981c10232","name":"Combine Security Data","type":"n8n-nodes-base.code","position":[480,80],"parameters":{"jsCode":"\n// Combine properties from both objects into a single object \nconst combinedObject = Object.assign({}, ...$input.first().json.data); \n// Return the combined object as a single item \nreturn [combinedObject];"},"typeVersion":2},{"id":"9df08e53-a3df-434b-ba8e-909bfae11d24","name":"Prepare API Request Data","type":"n8n-nodes-base.set","disabled":true,"position":[-200,-80],"parameters":{"options":{},"assignments":{"assignments":[{"id":"78b78cf7-943f-4f4f-91c5-c71efeb7d78a","name":"apiKey","type":"string","value":""},{"id":"0ee0f3f2-2954-414b-a701-4ca14e3c5be2","name":"sessionId","type":"string","value":"={{ $json.sessionId }}"},{"id":"a0f7d4d4-0ac7-474e-b87a-b87536f5e303","name":"action","type":"string","value":"={{ $json.action }}"},{"id":"3d047460-d218-4408-aa7a-466f55a5de24","name":"chatInput","type":"string","value":"={{ $json.chatInput }}"}]}},"typeVersion":3.4},{"id":"1a040e52-30fb-4556-ac2c-71f173075d89","name":"Data Aggregation","type":"n8n-nodes-base.stickyNote","position":[-140,140],"parameters":{"color":7,"width":400,"height":340,"content":"## Data Aggregation\n\nThis section combines multiple security data sources:\n1. **Merge Input Data**: Combines triggers from different sources\n2. **Aggregate Security Data**: Consolidates security events\n3. **Combine Security Data**: Creates unified request payload\n\n### Use Cases:\n- Correlate Wazuh alerts with NixGuard insights\n- Combine multiple security queries\n- Process batch security events"},"typeVersion":1},{"id":"a4d8b9d0-84e2-4732-ac67-85985343a67c","name":"Setup Guide","type":"n8n-nodes-base.stickyNote","position":[-860,320],"parameters":{"color":7,"width":400,"height":420,"content":"## Getting Started\n\n### Prerequisites:\n- Valid NixGuard API key\n- Access to Wazuh security data (if integrating)\n\n### Setup Instructions:\n1. Configure your NixGuard API key in 'Prepare API Request Data' node\n2. Set up trigger method (chat or manual)\n3. Test with sample security queries\n4. Make sure NixGuard agents are installed on your network endpoints for real-time security events\n\n### Support:\nFor questions, visit [NixGuard Documentation](https://nixguard.thenex.world) or join our [Community Discord](https://discord.com/invite/ajCYwYCwHb)"},"typeVersion":1},{"id":"a94e8519-9783-4b2f-8ca9-e3e571784e40","name":"Workflow Overview1","type":"n8n-nodes-base.stickyNote","position":[-960,-80],"parameters":{"color":7,"width":500,"height":380,"content":"## NixGuard Security Connector Workflow\n\nThis workflow integrates NixGuard's RAG (Retrieval-Augmented Generation) with Wazuh security data to provide real-time security insights.\n\n### Key Features:\n- Processes security queries through NixGuard's AI\n- Combines multiple security data sources\n- Returns actionable security insights\n\n### Authentication:\nRequires valid API key for NixGuard endpoint (configured in 'Prepare API Request Data' node)."},"typeVersion":1},{"id":"69fd8854-8025-462f-b078-73b86803a8c7","name":"API Request Explanation1","type":"n8n-nodes-base.stickyNote","position":[-140,500],"parameters":{"color":7,"width":400,"height":380,"content":"## API Request Configuration\n\nThis node sends the security query to NixGuard's API endpoint with:\n- Proper authentication headers\n- Formatted request body\n- Required content type\n\n### Configuration:\n1. Set your NixGuard API endpoint URL\n2. Ensure headers include `Content-Type: application/json`\n3. Body contains:\n   - `apiKey`: Your NixGuard API key\n   - `prompt`: The security query/input"},"typeVersion":1},{"id":"b4d557c8-6db5-42d6-bf6a-6edbe4c84dec","name":"Response Processing1","type":"n8n-nodes-base.stickyNote","position":[800,500],"parameters":{"color":7,"width":400,"height":320,"content":"## Response Processing\n\nThis section handles the NixGuard API response:\n1. **Parse NixGuard Response**: Converts JSON string to object\n2. **Format API Response**: Extracts relevant content\n3. **Prepare Final Output**: Structures output for end users\n\n### Error Handling:\n- Invalid responses will trigger error paths\n- Ensure proper error handling in subsequent workflows"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"130b7c1c-428f-45c4-934c-14653965820d","connections":{"Merge Input Data":{"main":[[{"node":"Aggregate Security Data","type":"main","index":0}]]},"Format API Response":{"main":[[{"node":"Prepare Final Output","type":"main","index":0}]]},"Combine Security Data":{"main":[[{"node":"Send Request to NixGuard API","type":"main","index":0}]]},"Aggregate Security Data":{"main":[[{"node":"Combine Security Data","type":"main","index":0}]]},"Parse NixGuard Response":{"main":[[{"node":"Format API Response","type":"main","index":0}]]},"Execute Workflow Trigger":{"main":[[{"node":"Merge Input Data","type":"main","index":0}]]},"Prepare API Request Data":{"main":[[{"node":"Merge Input Data","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"Prepare API Request Data","type":"main","index":0}]]},"Send Request to NixGuard API":{"main":[[{"node":"Parse NixGuard Response","type":"main","index":0}]]}}}


name: JSON String Validator via Webhook
author_name: ist00dent
author_username: ist00dent
nodes_used: ["n8n-nodes-base.code"]
categories: []
created_at: 2025-06-05T18:12:14.340Z
updated_at: 2025-06-05T18:12:14.340Z
url: https://n8n.io/workflows/4704
scraped_at: 2025-06-19 22:50:14
description:
  This n8n template provides a simple yet powerful utility for validating if a given string input is a valid JSON format. You can use this to pre-validate data received from external sources, ensure data integrity before further processing, or provide immediate feedback to users submitting JSON strings.

  🔧 How it works
  Webhook: This node acts as the entry point for the workflow, listening for incoming POST requests. It expects a JSON body with a single property:

    jsonString: The string that you want to validate as JSON.

  Code (JSON Validator): This node contains custom JavaScript code that attempts to parse the jsonString provided in the webhook body.

    If the jsonString can be successfully parsed, it means it's valid JSON, and the node returns an item with valid: true.
    If parsing fails, it catches the error and returns an item with valid: false and the specific error message.
    This logic is applied to each item passed through the node, ensuring all inputs are validated.

  Respond to Webhook: This node sends the validation result (either valid: true or valid: false with an error message) back to the service that initiated the webhook request.

  👤 Who is it for?
  This workflow is ideal for:

  Developers & Integrators: Pre-validate JSON payloads from external systems (APIs, webhooks) before processing them in your workflows, preventing errors.
  Data Engineers: Ensure the integrity of JSON data before storing it in databases or data lakes.
  API Builders: Offer a dedicated endpoint for clients to test their JSON strings for validity.
  Customer Support Teams: Quickly check user-provided JSON configurations for errors.
  Anyone handling JSON data: A quick and easy way to programmatically check JSON string correctness without writing custom code in every application.

  📑 Data Structure
  When you trigger the webhook, send a POST request with a JSON body structured as follows:

  {
    "jsonString": "{\"name\": \"n8n\", \"type\": \"workflow\"}"
  }

  Example of an invalid JSON string:

  {
    "jsonString": "{name: \"n8n\"}" // Missing quotes around 'name'
  }

  The workflow will return a JSON response indicating validity:

  For a valid JSON string:

  {
    "valid": true
  }

  For an invalid JSON string:

  {
    "valid": false,
    "error": "Unexpected token 'n', \"{name: \"n8n\"}\" is not valid JSON"
  }

  ⚙️ Setup Instructions
  Import Workflow:
    In your n8n editor, click "Import from JSON" and paste the provided workflow JSON.

  Configure Webhook Path:
    Double-click the Webhook node.
    In the 'Path' field, set a unique and descriptive path (e.g., /validate-json).

  Activate Workflow:
    Save and activate the workflow.

  📝 Tips
  This JSON validator workflow is a solid starting point. Consider these enhancements:

  Enhanced Error Feedback:
    Upgrade: Add a Set node after the Code node to format the error message into a more user-friendly string before responding.
    Leverage: Make it easier for the caller to understand the issue.

  Logging Invalid Inputs:
    Upgrade: After the Code node, add an IF node to check if valid is false. If so, branch to a node that logs the invalid jsonString and error to a Google Sheet, database, or a logging service.
    Leverage: Track common invalid inputs for debugging or improvement.

  Transforming Valid JSON:
    Upgrade: If the JSON is valid, you could add another Function node to parse the jsonString and then operate on the parsed JSON data directly within the workflow.
    Leverage: Use this validator as the first step in a larger workflow that processes JSON data.

  Asynchronous Validation:
    Upgrade: For very large JSON strings or high-volume requests, consider using a separate queueing mechanism (e.g., RabbitMQ, SQS) and an asynchronous response pattern.
    Leverage: Prevent webhook timeouts and improve system responsiveness.

workflow_json:
  {"id":"6GzSyLakqBN2hYIe","meta":{"instanceId":"1777696fb9fddfee653e70940936c2b1e28ba1f1bde53b7182fbd6eb01988706"},"name":"JSON String Validator via Webhook","tags":[],"nodes":[{"id":"72785a1d-32f6-4f0d-a412-5327c059ddd3","name":"Webhook: Receive JSON String","type":"n8n-nodes-base.webhook","position":[-680,-140],"webhookId":"2604aa77-b575-4c3f-b1df-feab9c775603","parameters":{"path":"validate-json-string","options":{},"httpMethod":"POST","responseMode":"responseNode"},"typeVersion":2},{"id":"940b04da-3f16-434d-8181-9452dd3ba007","name":"Respond to Webhook with Result","type":"n8n-nodes-base.respondToWebhook","position":[100,-140],"parameters":{"options":{},"respondWith":"allIncomingItems"},"typeVersion":1.2},{"id":"4546866f-9376-47cf-ac19-caf0eb197cca","name":"Code: Validate JSON String","type":"n8n-nodes-base.code","position":[-300,-140],"parameters":{"jsCode":"// This node validates if the 'jsonString' in the webhook body is valid JSON.\n// It returns 'valid: true' or 'valid: false' along with an error message if invalid.\n\nconst results = [];\n\nfor (const item of $input.all()) {\n  try {\n    // Attempt to parse the jsonString from the webhook body\n    // Ensure 'jsonString' exists before attempting to parse\n    if (item.json.body && typeof item.json.body.jsonString === 'string') {\n      JSON.parse(item.json.body.jsonString);\n      results.push({ json: { valid: true } });\n    } else {\n      // Handle cases where jsonString is missing or not a string\n      results.push({ json: { valid: false, error: \"Input 'jsonString' is missing or not a string.\" } });\n    }\n  } catch (e) {\n    // If parsing fails, push the error message\n    results.push({ json: { valid: false, error: e.message } });\n  }\n}\n\nreturn results;"},"typeVersion":2},{"id":"52ea0a9b-863d-4d09-b96b-ab707571738b","name":"Note: Webhook Input","type":"n8n-nodes-base.stickyNote","position":[-760,-360],"parameters":{"width":280,"height":380,"content":"## Webhook Input\n\nThis node listens for incoming POST requests. It expects a JSON body containing a single property: `jsonString` (the string you wish to validate as JSON)."},"typeVersion":1},{"id":"f3f93504-93b2-40e9-93e6-45366a681ac0","name":"Note: JSON Validation Logic","type":"n8n-nodes-base.stickyNote","position":[-420,-320],"parameters":{"color":2,"width":350,"height":360,"content":"## JSON Validation Logic\n\nThis node contains custom JavaScript code to parse the `jsonString` from the webhook input. It returns `valid: true` if successful, or `valid: false` with an `error` message if parsing fails."},"typeVersion":1},{"id":"e8632087-424b-40b4-a894-301885137f49","name":"Note: Webhook Response","type":"n8n-nodes-base.stickyNote","position":[0,-320],"parameters":{"color":3,"width":350,"height":360,"content":"## Webhook Response\n\nThis node sends the validation result (whether the `jsonString` was valid JSON or not, including an error if applicable) back to the system that triggered the webhook."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"ecec4bf1-c92e-485f-9f8f-fc98441310eb","connections":{"Code: Validate JSON String":{"main":[[{"node":"Respond to Webhook with Result","type":"main","index":0}]]},"Webhook: Receive JSON String":{"main":[[{"node":"Code: Validate JSON String","type":"main","index":0}]]}}}


name: Daily News Digest: Summarize RSS Feeds with OpenAI and Deliver to WhatsApp
author_name: Danielle Gomes
author_username: daniellegomes
nodes_used: ["n8n-nodes-base.httpRequest","@n8n/n8n-nodes-langchain.openAi"]
categories: []
created_at: 2025-06-05T22:10:34.527Z
updated_at: 2025-06-05T22:10:34.527Z
url: https://n8n.io/workflows/4709
scraped_at: 2025-06-19 22:48:46
description:
  This n8n workflow collects and summarizes news from multiple RSS feeds, using OpenAI to generate a concise summary that can be sent to WhatsApp or other destinations. Perfect for automating your daily news digest.

  🔁 Workflow Breakdown:
  Schedule Trigger
  Start the workflow on your desired schedule (daily, hourly, etc.).

  🟨 Note: Set the trigger however you wish.

  RSS Feeds (My RSS 01–04)
  Fetches articles from four different RSS sources.

  🟨 Note: You can add as many RSS feeds as you want.

  Edit Fields (Edit Fields1–3)
  Normalizes RSS fields (title, link, etc.) to ensure consistency across different sources.

  Merge (append mode)
  Combines the RSS items into a single unified list.

  Filter
  Optionally filter articles by keywords, date, or categories.

  Limit
  Limits the analysis to the 10 most recent articles.

  🟨 Note: This keeps the result concise and avoids overloading the summary.

  Aggregate
  Prepares the selected news for summarization by combining them into a single content block.

  OpenAI (Message Assistant)
  Summarizes the aggregated news items in a clean and readable format using AI.

  Send Summary to WhatsApp
  Sends the AI-generated summary to a WhatsApp endpoint via webhook (yoururlapi.com). You can replace this with an email service, Google Drive, or any other destination.

  🟨 Note: You can send it to your WhatsApp API, email, drive, etc.

  No Operation (End)
  Final placeholder to safely close the workflow. You may expand from here if needed.

workflow_json:
  {"id":"xD6cGHJBF0QwUUc5","meta":{"instanceId":"47132c409ea4cfc382a6c48656c8a35b5da4c1fa7ef892882b424c42ae8a05b2"},"name":"RSS - WhatsApp","tags":[],"nodes":[{"id":"810a8040-2bfc-4125-9c5d-273e089a857c","name":"Filter","type":"n8n-nodes-base.filter","position":[2240,500],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"30d4f694-9378-42b4-b1d5-cbc38fb3e7fe","operator":{"type":"dateTime","operation":"after"},"leftValue":"={{ $json.pubDate }}","rightValue":"={{ $today.minus({ days: 1 }) }}"}]}},"typeVersion":2.2},{"id":"ffe9e174-749f-4864-8402-629e5a850961","name":"Edit Fields","type":"n8n-nodes-base.set","position":[1820,420],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e2ffe594-180d-4e1d-b869-8056ac67015d","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"87c5a171-9ab9-4043-a72a-32aec218fe63","name":"pubDate","type":"string","value":"={{ $json.pubDate }}"},{"id":"978b05c9-6e6b-4a18-bc06-4de785b19413","name":"conteudo","type":"string","value":"={{ $json['content:encoded'] }}"}]}},"typeVersion":3.4},{"id":"22d05f1c-7c65-4226-b842-e3a357994615","name":"Edit Fields1","type":"n8n-nodes-base.set","position":[1820,620],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e2ffe594-180d-4e1d-b869-8056ac67015d","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"87c5a171-9ab9-4043-a72a-32aec218fe63","name":"pubDate","type":"string","value":"={{ $json.pubDate }}"},{"id":"bae1b890-716b-442c-8714-b4ece09063d7","name":"conteudo","type":"string","value":"={{ $json.contentSnippet }}"}]}},"typeVersion":3.4},{"id":"5ebcfd94-fa94-46cb-b4ff-a487af4520c2","name":"Edit Fields2","type":"n8n-nodes-base.set","position":[1820,840],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e2ffe594-180d-4e1d-b869-8056ac67015d","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"87c5a171-9ab9-4043-a72a-32aec218fe63","name":"pubDate","type":"string","value":"={{ $json.pubDate }}"},{"id":"978b05c9-6e6b-4a18-bc06-4de785b19413","name":"conteudo","type":"string","value":"={{ $json.contentSnippet }}"}]}},"typeVersion":3.4},{"id":"5e2f2364-a0a0-4a93-99ec-d1c477c7e6bc","name":"Edit Fields3","type":"n8n-nodes-base.set","position":[1820,200],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e2ffe594-180d-4e1d-b869-8056ac67015d","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"87c5a171-9ab9-4043-a72a-32aec218fe63","name":"pubDate","type":"string","value":"={{ $json.pubDate }}"},{"id":"978b05c9-6e6b-4a18-bc06-4de785b19413","name":"conteudo","type":"string","value":"={{ $json.content }}"}]}},"typeVersion":3.4},{"id":"a9600807-9562-4ddc-a830-b18b81daffe4","name":"Merge","type":"n8n-nodes-base.merge","position":[2040,480],"parameters":{"numberInputs":4},"typeVersion":3.1},{"id":"39c8f94b-27ba-4676-9197-e87a493bcae6","name":"OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[2820,500],"parameters":{"text":"=I've received news articles via RSS. Please analyze them and provide a concise summary of the top 3 to 5 main highlights. My goal is to get a quick overview of what's most relevant in these articles.\n1.{{ $json.data[0].title }}{{ $json.data[0].conteudo }}\n2.{{ $json.data[1].title }}{{ $json.data[1].conteudo }}\n3.{{ $json.data[2].title }}{{ $json.data[2].conteudo }}\n4.{{ $json.data[3].title }}{{ $json.data[3].conteudo }}\n5.{{ $json.data[4].title }}{{ $json.data[4].conteudo }}\n6.{{ $json.data[5].title }}{{ $json.data[5].conteudo }}\n7.{{ $json.data[6].title }}{{ $json.data[6].conteudo }}\n8.{{ $json.data[7].title }}{{ $json.data[7].conteudo }}\n9.{{ $json.data[8].title }}{{ $json.data[8].conteudo }}\n10.{{ $json.data[9].title }}{{ $json.data[9].conteudo }}","prompt":"define","options":{},"resource":"assistant","assistantId":{"__rl":true,"mode":"list","value":"asst_7Miwcww78kuTtx5rVQ7m5Nnw","cachedResultName":"Linkedin"}},"credentials":{"openAiApi":{"id":"","name":""}},"typeVersion":1.8},{"id":"2e096826-70ee-433c-b59b-477eec5c3905","name":"Limit","type":"n8n-nodes-base.limit","position":[2440,500],"parameters":{"maxItems":10},"typeVersion":1},{"id":"2910734f-73c3-45c5-9470-5a08868cd66e","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[2640,500],"parameters":{"include":"specifiedFields","options":{},"aggregate":"aggregateAllItemData","fieldsToInclude":"title, pubDate, conteudo"},"typeVersion":1},{"id":"fda99f10-0a33-49f3-a46b-37d61567e851","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[1260,520],"parameters":{"rule":{"interval":[{"triggerAtHour":3}]}},"typeVersion":1.2},{"id":"1b0fa8c7-bfd8-4267-b9ac-eb3c90b2160d","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","position":[3380,500],"parameters":{},"typeVersion":1},{"id":"08cf9756-8407-4b9f-826d-ce21272de911","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[2380,680],"parameters":{"content":"## About Limit\nlimits the analysis to the 10 most recent articles"},"typeVersion":1},{"id":"a747f665-ff17-4972-bb40-28c8251520dd","name":"My RSS 01","type":"n8n-nodes-base.rssFeedRead","onError":"continueRegularOutput","position":[1600,200],"parameters":{"url":"https://uxdesign.cc/feed","options":{"ignoreSSL":false}},"typeVersion":1.1,"alwaysOutputData":true},{"id":"ce492fd5-c8f9-4074-a080-56a55fc5074d","name":"My RSS 02","type":"n8n-nodes-base.rssFeedRead","onError":"continueRegularOutput","position":[1600,420],"parameters":{"url":"https://www.technologyreview.com/topic/artificial-intelligence/feed/","options":{}},"typeVersion":1.1,"alwaysOutputData":true},{"id":"1418186b-ee9a-480b-93e6-6483014a3ddf","name":"My RSS 03","type":"n8n-nodes-base.rssFeedRead","onError":"continueRegularOutput","position":[1600,620],"parameters":{"url":"https://the-decoder.com/feed/","options":{}},"typeVersion":1.1,"alwaysOutputData":true},{"id":"31da3f86-a150-4cd4-83bd-57bcb348f7c3","name":"My RSS 04","type":"n8n-nodes-base.rssFeedRead","onError":"continueRegularOutput","position":[1600,840],"parameters":{"url":"https://www.theverge.com/rss/index.xml","options":{"ignoreSSL":false}},"typeVersion":1.1,"alwaysOutputData":true},{"id":"a2e2bf11-d56a-470f-b183-751ff5a2d7f9","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1540,1000],"parameters":{"content":"## About RSS\nYou can add how many RSS you want"},"typeVersion":1},{"id":"90ea767f-aa1f-4475-8378-85f9b34487eb","name":"Send resum to  Whatsapp","type":"n8n-nodes-base.httpRequest","position":[3160,500],"parameters":{"url":"yoururlapi.com","method":"POST","options":{},"sendBody":true,"authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"phone","value":"=your phone number"},{"name":"message","value":"={{ $json.output }}"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"2CmkjW0hZ9FO0rd3","name":"Header Zapi"}},"typeVersion":4.2},{"id":"55a91be7-2fe8-45ea-9ac5-51e90a9bb2c9","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[3100,700],"parameters":{"content":"## About Resum\nyou can send to your whatsapp api, or email, drive..."},"typeVersion":1},{"id":"16acc038-b6f3-4a7d-a2d9-415c4287532b","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1200,680],"parameters":{"content":"## About Trgger\nSet trigger how you wish"},"typeVersion":1},{"id":"47783f2d-e603-4325-9031-09d3eefe9fcd","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[2820,700],"parameters":{"content":"## System message (change if you want)\nI've received 10 news articles via RSS. Please analyze them and provide a concise summary of the top 3 to 5 main highlights. My goal is to get a quick overview of what's most relevant in these articles."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"a24e6662-345a-4746-913d-104bfc17c63f","connections":{"Limit":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Filter":{"main":[[{"node":"Limit","type":"main","index":0}]]},"OpenAI":{"main":[[{"node":"Send resum to  Whatsapp","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"OpenAI","type":"main","index":0}]]},"My RSS 01":{"main":[[{"node":"Edit Fields3","type":"main","index":0}]]},"My RSS 02":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"My RSS 03":{"main":[[{"node":"Edit Fields1","type":"main","index":0}]]},"My RSS 04":{"main":[[{"node":"Edit Fields2","type":"main","index":0}]]},"Edit Fields":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Edit Fields1":{"main":[[{"node":"Merge","type":"main","index":2}]]},"Edit Fields2":{"main":[[{"node":"Merge","type":"main","index":3}]]},"Edit Fields3":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"My RSS 01","type":"main","index":0},{"node":"My RSS 02","type":"main","index":0},{"node":"My RSS 03","type":"main","index":0},{"node":"My RSS 04","type":"main","index":0}]]},"Send resum to  Whatsapp":{"main":[[{"node":"No Operation, do nothing","type":"main","index":0}]]}}}


name: Personalize Sales Outreach Based on Product Launches with Explorium & Claude AI
author_name: Itamar
author_username: itamar
categories: []
created_at: 2025-06-06T01:00:40.759Z
updated_at: 2025-06-06T01:00:40.759Z
url: https://n8n.io/workflows/4711
scraped_at: 2025-06-19 22:49:39
description:
  Explorium Event-Triggered Outreach

  Automatically identify product launches, enrich company & prospect data, and generate fully personalized outbound emails using Explorium MCP and LLM agents.

  This n8n and agent-based workflow automates outbound prospecting by monitoring Explorium event data (e.g. product launches), researching companies, identifying key contacts, and generating tailored sales emails leveraging the Explorium MCP server.

  Workflow Overview

  Node 1: Webhook Trigger

  Purpose: Listens for real-time product launch events pushed from Explorium’s webhook system.

  How it works:
  Explorium sends HTTP POST requests containing event data.
  The webhook payload includes company name, business ID, domain, product name, and event type.

  Node 2: Company Research Agent

  Agent Type: Tools Agent

  Purpose: Enrich company data after an event occurs.

  How it works:
  Uses Explorium MCP via the MCP Client tool to gather additional company data.
  Uses Anthropic Claude (Chat Model) to process and interpret company information for downstream personalization.

  Node 3: Employee Data Retrieval

  Purpose: Retrieve prospect-level data for targeting.

  How it works:
  Uses HTTP Request node to call Explorium's fetch_prospects endpoint.
  Filters prospects by:
    Company business_id
    Departments: Product, R&D
    Seniority levels: owner, cxo, vp, director, senior, manager, partner
  Limits results to top 5 relevant employees.
  Code nodes handle:
    Filtering logic
    Cleaning API response
    Formatting data for downstream agents

  Node 4: Conditional Branch: Prospect Data Check

  Purpose: Checks whether prospect data was successfully retrieved.

  Logic:
  If prospects found → personalized emails per person.
  If no prospects → fallback to company-level general email.

  Node 5A: Email Writer #1 (No Prospect Data)

  Agent Type: Tools Agent

  Purpose: Write generic outbound email using only company-level research and event info.

  Powered by: Anthropic Chat Model

  Node 5B: Loop Over Prospects → Email Writer #2 (Personalized)

  Agent Type: Tools Agent

  Purpose: Write highly personalized email for each identified employee.

  How it works:
  Loops through each individual prospect.
  Passes company research + employee data to LLM agent.
  Generates customized emails referencing:
    Prospect's title & department
    Product launch
    Role-relevant Explorium value proposition

  Node 6: Slack Notifications

  Purpose: Posts completed emails to internal Slack channel for review or testing before final deployment.

  Future State: Can be swapped with an email sequencing platform in production.

  Setup Requirements

  Explorium API Access
  MCP Client credentials for company enrichment and prospect fetching.
  Registered webhook for event listening.

  n8n Configuration
  Secure environment variables for API keys & webhook secret.
  Code nodes configured for JSON transformation, filtering & signature validation.

  Customization Options

  Personalization Logic
  Update LLM prompt instructions to reflect ICP priorities.
  Modify email templates based on role, department, or tenure logic.
  Adjust fallback behavior when prospect data is unavailable.

  API Request Tuning
  Adjust page_size for number of prospects retrieved.
  Fine-tune seniority and department filters to match evolving targeting.

  Future Expansion
  Swap Slack notifications for outbound email automation.
  Integrate call task assignment directly into CRM.
  Introduce engagement scoring feedback loop (opens, clicks, replies).

  Troubleshooting Tips
  Validate webhook signature matching to prevent unauthorized requests.
  Ensure correct business_id is passed to prospect fetching endpoint.
  Confirm business enrichment returns sufficient data for company researcher agents.
  Review agent LLM responses for correct output structure and parsing consistency.

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.slack","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatAnthropic","@n8n/n8n-nodes-langchain.mcpClientTool"]

workflow_json:
  {"id":"S3nh3dFgB4HfiZyf","meta":{"instanceId":"0a70652f43c1b29dd16c35b61a38fd31c8004f58bc7e723bf43262a797407c77","templateCredsSetupCompleted":true},"name":"Omer's Workflow","tags":[],"nodes":[{"id":"c6ba3396-cfa4-4d6f-b7ec-c8faf93c3c87","name":"Webhook","type":"n8n-nodes-base.webhook","position":[-1160,280],"webhookId":"09d12e26-7fb0-492f-913f-119f627de19b","parameters":{"path":"https://lievi.app.n8n.cloud/webhook-test/product-launch","options":{},"httpMethod":"POST"},"typeVersion":2},{"id":"919131a9-12ce-409a-92fd-3061ed4efc89","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[940,400],"parameters":{"options":{"reset":false},"batchSize":"={{ 1 }}"},"typeVersion":3},{"id":"f56037b0-45b6-43c4-9981-5c766925cabe","name":"Company Researcher","type":"@n8n/n8n-nodes-langchain.agent","position":[-900,280],"parameters":{"text":"={{ $json.body.data }}","options":{"maxIterations":12,"systemMessage":"=You are a research analyst helping a sales agent write a highly personalized outbound email. Your job is to generate a detailed research brief that explains:\n\n1. **What the company does**\n2. **What the recent business event is**, and why it's significant\n3. **How the event might reflect on the company’s priorities, pain points, or growth goals**\n4. Any additional company context that might be useful for crafting a relevant sales message\n\n## Guidelines:\n- Your response should be **detailed, structured, and accurate**\n- You are writing **for another AI**, so don't hold back on context — more is better\n- You can assume the user already passed in the full event details (like a trigger type, a short summary, etc.)\n- Focus more on **interpreting** the event and **linking it to the company**\n- Write in **natural language**, using clear, concise, informative sentences — not marketing fluff or speculation\n- Keep your tone objective and analytical\n- Avoid repeating generic phrases like “the company is innovative” unless supported by facts\n\n## Inputs:\n- Business ID: {{ $json.body.business_id }}\n- Event: {{ $json.body.data }}\n\n## Output Structure:\nReturn your findings in 2-3 clear paragraphs. The first paragraph should describe the **event in detail** and explain why it may be relevant. The second should summarize what the **company does** and any other useful GTM signals (size, growth stage, recent changes, priorities, etc.).\n\nNow generate the research summary.\n"},"promptType":"define"},"typeVersion":1.9},{"id":"60a295bb-8eb1-4f98-b597-67ec512648e6","name":"Anthropic Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[200,180],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-3-7-sonnet-20250219","cachedResultName":"Claude 3.7 Sonnet"},"options":{}},"credentials":{"anthropicApi":{"id":"FQdE6twB8nCJNoxV","name":"Anthropic account"}},"typeVersion":1.3},{"id":"80c95593-53eb-4748-8373-064ca1e70c2c","name":"Email Writer ( YES prospect data)","type":"@n8n/n8n-nodes-langchain.agent","position":[1160,360],"parameters":{"text":"=prospect_data: contact info:{{ $json.email }}, expereince:{{ $json.experience }},skills:{{ $json.skills }}.\ncompany data:{{ $('Company Researcher').first().json.output }}\nevent data: {{ $('Webhook').first().json.body }}\n\n","options":{"systemMessage":"=You are a B2B outbound sales email generator.\n\nYour task is to write a short and effective cold outbound email (under 150 words) to a specific prospect at a company. The goal is to be relevant, concise, and persuasive, while introducing Explorium in a way that aligns with the prospect’s role and current company context.\n\n## Prospect Data\n{prospect_data}\n\n## Company \n{company_data}\n\n## Event Data\n{event_data}\n\n## About Explorium (Use this to inform the email — do not paste directly):\nExplorium is a data-powered intelligence platform on a mission to unlock the full potential of external data for the agent era. We serve as the infrastructure backbone for intelligent systems — helping go-to-market teams enrich company and prospect data, tap into real-time signals, and dynamically prioritize their best-fit accounts. Our platform fuels the agents and AI products that are redefining the future of sales and marketing.\n\n## MCP Playground (Link to include):\nInvite the prospect to explore Explorium’s capabilities hands-on via our [MCP Playground](https://www.explorium.ai/mcp-playground/), a public environment to experience the power of enriched external data.\n\n## Output Instructions:\n- Personalize the email using the provided prospect, company, and event information\n- Tailor the message to the prospect’s title, department, or function\n- Weave in how Explorium could support their work or goals based on what the company is focused on\n- The email should feel like it’s written by a real SDR — confident, relevant, and human\n- End the email with a soft CTA inviting them to check out the MCP Playground link but dont forget to also ask to set up a meeting / call\n- At the top of the email, output the selected email address to use. Choose the prospect’s **professional email** if available, or fallback to the next best alternative (personal, current, etc.)\n\nNow write the email.\n"},"promptType":"define"},"typeVersion":1.9},{"id":"157a0500-2be0-4b13-9f2b-df843acc855d","name":"Email Writer (NO prospect data)","type":"@n8n/n8n-nodes-langchain.agent","position":[220,0],"parameters":{"text":"=company data:{{ $('Company Researcher').first().json.output }}\nevent data: {{ $('Webhook').first().json.body }}\n","options":{"systemMessage":"=You are a B2B outbound email assistant.\n\nYour task is to write a short, personalized outbound email (under 120 words) that connects Explorium to a recent business event or trigger at a target company. This email will be sent to a general marketing, growth, or data contact — no specific prospect information is available.\n\n## Context Provided:\n- Company Information: {company_data}\n- Event Information: {event_data}\n\n## About Explorium (Use as context — DO NOT paste directly):\nExplorium is on a mission to unlock the full potential of data for the agent era. From day one, we’ve been driven to be the data and infrastructure backbone that powers intelligent systems and delivers real business growth.\n\nWe partner with smart, driven teams to turn raw external data into actionable insight—fueling agents, AI products, and GTM strategies for the future of sales and marketing.\n\nIf relevant, you may mention that they can explore Explorium’s capabilities themselves via our [MCP Playground](https://www.explorium.ai/mcp-playground/), a public demo environment showcasing the power of enriched data. \n\ndont forget to always end with a call to action in setting up some sort of call or meeting to talk further\n\n## Instructions:\n- Reference the event to establish relevance and timing\n- Briefly describe what the company does (from the input)\n- Weave in Explorium’s value if it's applicable to their business priorities\n- If appropriate, suggest checking out the MCP Playground link\n- End with a warm, soft CTA\n\nNow write the email.\n"},"promptType":"define"},"typeVersion":1.9},{"id":"657c781c-ed05-495c-8179-f867e89cdf8c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-840,100],"parameters":{"content":"## Reaserch\nThis agent uses the Explorium MCP to research the company that just had an event"},"typeVersion":1},{"id":"6c4b72d5-5939-41a3-af29-fc3c26548dcf","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-260,140],"parameters":{"content":"## Crossroads \n\nif we cant find data about the company's employees, we fork up, to write a general email "},"typeVersion":1},{"id":"4a8b53bc-afb3-47ac-b9ff-6038ce688460","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[260,-160],"parameters":{"content":"## email writer #1\nGiven the research, this agents writes an email\n\n"},"typeVersion":1},{"id":"0c1b9ef7-3714-44d8-a768-6ecb4c3634b2","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[220,520],"parameters":{"content":"##  Employee Data \nGather data about the 5 employees we will write emails to."},"typeVersion":1},{"id":"90b176e5-087b-44b5-9959-2fe9807a84c0","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1140,160],"parameters":{"content":"## Email Writer #2\nGiven both data about the email and the employee, the agent will write a highly personalized email to each employee\n"},"typeVersion":1},{"id":"7bd91ef0-9695-4780-a7b9-739cea103fb1","name":"Explorium MCP","type":"@n8n/n8n-nodes-langchain.mcpClientTool","position":[-680,500],"parameters":{"sseEndpoint":"mcp.explorium.ai/sse","authentication":"bearerAuth"},"credentials":{"httpBearerAuth":{"id":"aPjJXei6qDSctHNW","name":"Bearer Auth account"}},"typeVersion":1},{"id":"043c920e-5972-4bf5-ab13-467c53935467","name":"Anthropic llm","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[-940,460],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-3-7-sonnet-20250219","cachedResultName":"Claude 3.7 Sonnet"},"options":{}},"credentials":{"anthropicApi":{"id":"FQdE6twB8nCJNoxV","name":"Anthropic account"}},"typeVersion":1.3},{"id":"1aa3859e-82c5-498d-8c03-7cb2b2ca9068","name":"Prospect Fetcher","type":"n8n-nodes-base.httpRequest","position":[-500,300],"parameters":{"url":"https://api.explorium.ai/v1/prospects","method":"POST","options":{},"jsonBody":"={\n  \"mode\": \"full\",\n  \"page\": 1,\n  \"size\": 5,\n  \"page_size\": 5,\n  \"filters\": {\n    \"has_email\": { \"value\": true },\n    \"job_level\": {\n      \"values\": [\"owner\", \"cxo\", \"vp\", \"director\", \"manager\", \"senior\"]\n    },\n    \"job_department\": {\n      \"values\": [\"Marketing\"]\n    },\n    \"business_id\": {\n      \"values\": [\"{{ $('Webhook').item.json.body.business_id }}\"]\n    }\n  }\n}\n","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpBearerAuth":{"id":"aPjJXei6qDSctHNW","name":"Bearer Auth account"},"httpHeaderAuth":{"id":"LZOE1nqmRk3X6r1J","name":"Header Auth account"}},"typeVersion":4.2},{"id":"cdf314bd-218d-4cba-be8c-f537eef4222e","name":"Has Prospect data/ Does not","type":"n8n-nodes-base.if","position":[-200,320],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"8627133a-68d0-4907-b8ca-d8deba93089d","operator":{"type":"number","operation":"equals"},"leftValue":"={{ $json.data.length }}\n","rightValue":"=0"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"8e53e6aa-1a00-4ebb-adbd-d00c7731f783","name":"Formulate Prospect Data","type":"n8n-nodes-base.code","position":[60,700],"parameters":{"jsCode":"const candidates = $input.first().json.data;\n\nif (!Array.isArray(candidates) || candidates.length === 0) {\n  throw new Error(\"No candidates found in data.\");\n}\n\nconst result = candidates.map(candidate => {\n  return {\n    json: {\n      prospect_id: candidate.prospect_id,  \n      full_name: candidate.full_name,\n      first_name: candidate.first_name,\n      last_name: candidate.last_name,\n      title: candidate.job_title,\n      department: candidate.job_department,\n      seniority: candidate.job_seniority_level?.join(', ') || '',\n      company: candidate.company_name,\n      location: `${candidate.city}, ${candidate.region_name}, ${candidate.country_name}`,\n      linkedin: candidate.linkedin,\n      email: candidate.professional_email_hashed || '',\n      experience: candidate.experience?.join(' | ') || '',\n      skills: candidate.skills?.join(', ') || '',\n      interests: candidate.interests?.join(', ') || '',\n      business_id: candidate.business_id\n    }\n  };\n});\n\nreturn result;\n"},"typeVersion":2},{"id":"be5975d5-5d3e-4dfa-960f-b7e529164ee9","name":"Prospect Mapping","type":"n8n-nodes-base.code","position":[60,1040],"parameters":{"jsCode":"const prospectIds = $input.all()\n  .map(item => String(item.json.prospect_id).trim()) // Force string and trim whitespace\n  .filter(Boolean); // remove empty/null\n\nreturn [{\n  json: {\n    prospect_ids: prospectIds\n  }\n}];\n"},"typeVersion":2},{"id":"72aa5fc5-32b4-471c-b469-3f19789dde8d","name":"Prospect Enrichment","type":"n8n-nodes-base.httpRequest","position":[340,1020],"parameters":{"url":"https://api.explorium.ai/v1/prospects/contacts_information/bulk_enrich","method":"POST","options":{},"jsonBody":"={{ JSON.stringify({ prospect_ids: $json.prospect_ids }) }}\n\n","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"LZOE1nqmRk3X6r1J","name":"Header Auth account"}},"typeVersion":4.2},{"id":"c0ece7b7-8a05-4b81-81cb-0c2a76b8f006","name":"Full Prospect Formulation","type":"n8n-nodes-base.code","position":[440,740],"parameters":{"jsCode":"// Get full profile data from the HTTP Request node\nconst profiles = $('Prospect Fetcher').first().json.data;\n\n// Get contact enrichment data from the current input\nconst contactEnrichments = $input.first().json.data;\n\n// Step 1: Create a lookup table for enriched contact info\nconst contactMap = {};\nfor (const contact of contactEnrichments) {\n  contactMap[contact.prospect_id] = contact.data;\n}\n\n// Step 2: Merge profile with email info\nconst result = profiles.map(profile => {\n  const contact = contactMap[profile.prospect_id];\n\n  // Determine the best email\n  let email = profile.email || \"\";\n  if (contact) {\n    email = contact.professions_email ||\n            (contact.emails?.find(e => e.type === \"professional\")?.address) ||\n            (contact.emails?.[0]?.address) ||\n            \"\";\n  }\n\n  return {\n    json: {\n      ...profile,\n      email // now includes enriched email if found\n    }\n  };\n});\n\nreturn result;\n"},"typeVersion":2},{"id":"d05b90bc-0e15-4570-a3f6-3411c786c629","name":"Anthropic llm1","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[1180,540],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-3-7-sonnet-20250219","cachedResultName":"Claude 3.7 Sonnet"},"options":{}},"credentials":{"anthropicApi":{"id":"FQdE6twB8nCJNoxV","name":"Anthropic account"}},"typeVersion":1.3},{"id":"9c009e0a-f620-4e89-a498-1c13d6d97551","name":"Slack Output","type":"n8n-nodes-base.slack","position":[1460,620],"webhookId":"5d5bb3f1-0bc6-494b-8705-f108ee11b313","parameters":{"text":"={{ $json.output }}","select":"channel","channelId":{"__rl":true,"mode":"list","value":"C08U1DDTQ7Q","cachedResultName":"evergreen-outbound-campaign"},"otherOptions":{},"authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"eOfca8yNWglvt3Ib","name":"Slack account"}},"typeVersion":2.3},{"id":"3fcefab7-d56a-498e-8599-0b2d4cb9a899","name":"Slack Output1","type":"n8n-nodes-base.slack","position":[680,20],"webhookId":"3bd7b28e-1c59-49a8-bdd0-cb2e314daee6","parameters":{"text":"={{ $json.output }}","user":{"__rl":true,"mode":"list","value":"U08KUURMK2S","cachedResultName":"itamar.levi"},"select":"user","otherOptions":{},"authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"eOfca8yNWglvt3Ib","name":"Slack account"}},"typeVersion":2.3}],"active":true,"pinData":{"Webhook":[{"json":{"body":{"data":{"link":"https://www.demandgenreport.com/industry-news/news-brief/gong-partners-with-microsoft-to-bring-data-insights-directly-into-copilot/49419/","event_name":"new_partnership","partner_company":"Microsoft","partnership_date":"2025-05-20T00:00:00+00:00","purpose_of_partnership":"To integrate Gong’s revenue AI platform with Microsoft’s productivity applications and Microsoft 365 Copilot."},"event_id":"72504b9c8efdadfd5f128120354c4ac9","tenant_id":"con_TESTTENANTID","event_name":"new_partnership","event_time":"2025-05-21T00:00:00+00:00","partner_id":"itamarlevi_org","business_id":"e18bac6600c243054a65ce033181bd6b","enrollment_id":"test","enrollment_key":"test"},"query":{},"params":{},"headers":{"host":"explorium-ai.app.n8n.cloud","accept":"*/*","cf-ray":"9498b0f334bc3b14-IAD","cdn-loop":"cloudflare; loops=1; subreqs=1","cf-ew-via":"15","cf-worker":"n8n.cloud","x-real-ip":"54.86.50.139","cf-visitor":"{\"scheme\":\"https\"}","user-agent":"PostmanRuntime/7.44.0","cf-ipcountry":"US","content-type":"application/json","x-is-trusted":"yes","authorization":"5c4cbb4ba7134a918cdf4ec0a9ff68cf","cache-control":"no-cache","postman-token":"579c83d6-a1fd-45a6-862b-473587967dce","content-length":"752","accept-encoding":"gzip, br","x-forwarded-for":"54.86.50.139, 172.70.43.84","cf-connecting-ip":"54.86.50.139","x-forwarded-host":"explorium-ai.app.n8n.cloud","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-server":"traefik-prod-users-gwc-65-cbb4dd965-6sdrq"},"webhookUrl":"https://explorium-ai.app.n8n.cloud/webhook/https://lievi.app.n8n.cloud/webhook-test/product-launch","executionMode":"production"}}]},"settings":{"executionOrder":"v1"},"versionId":"57cc2023-7709-4264-8f7a-b3ef0a669b3f","connections":{"Webhook":{"main":[[{"node":"Company Researcher","type":"main","index":0}]]},"Slack Output":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Anthropic llm":{"ai_languageModel":[[{"node":"Company Researcher","type":"ai_languageModel","index":0}]]},"Explorium MCP":{"ai_tool":[[{"node":"Company Researcher","type":"ai_tool","index":0}]]},"Anthropic llm1":{"ai_languageModel":[[{"node":"Email Writer ( YES prospect data)","type":"ai_languageModel","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Email Writer ( YES prospect data)","type":"main","index":0}]]},"Prospect Fetcher":{"main":[[{"node":"Has Prospect data/ Does not","type":"main","index":0}]]},"Prospect Mapping":{"main":[[{"node":"Prospect Enrichment","type":"main","index":0}]]},"Company Researcher":{"main":[[{"node":"Prospect Fetcher","type":"main","index":0}]]},"Prospect Enrichment":{"main":[[{"node":"Full Prospect Formulation","type":"main","index":0}]]},"Anthropic Chat Model1":{"ai_languageModel":[[{"node":"Email Writer (NO prospect data)","type":"ai_languageModel","index":0}]]},"Formulate Prospect Data":{"main":[[{"node":"Prospect Mapping","type":"main","index":0}]]},"Full Prospect Formulation":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Has Prospect data/ Does not":{"main":[[{"node":"Email Writer (NO prospect data)","type":"main","index":0}],[{"node":"Formulate Prospect Data","type":"main","index":0}]]},"Email Writer (NO prospect data)":{"main":[[{"node":"Slack Output1","type":"main","index":0}]]},"Email Writer ( YES prospect data)":{"main":[[{"node":"Slack Output","type":"main","index":0}]]}}}


name: Simple Eval for Legal Benchmarking
author_name: Adam Janes
author_username: adamjanes
categories: []
created_at: 2025-06-06T01:08:26.025Z
updated_at: 2025-06-06T01:08:26.025Z
url: https://n8n.io/workflows/4712
scraped_at: 2025-06-19 22:50:33
description:
  This workflow demonstrates a simple way to run evals on a set of test cases stored in a Google Sheet.

  The example we are using comes from an info extraction task dataset, where we tested 6 different LLMs on 18 different test cases.

  You can see our sample data in this spreadsheet here to get started.

  Once you have this working for our dataset, you can plug in your own test cases matching different LLMs to see how it works with your own data.

  How it works:
  It loads test cases from Google Sheets. 
  For each row in our Google Sheet, it grabs the source document, converting it to text.
  Our "LLM judge" passes the input/output of each LLM to GPT-4.1 to evaluate each test case (Pass/Fail + Reason).
  It logs the outcome to a Google Sheet.
  A 0.5s pause between each request gets around OpenAI's API rate limits.

  Set up steps:
  Add your credentials for Google Sheets, Google Drive, and OpenRouter.
  Make a copy of the original data spreadsheet so that you can edit it yourself. You will need to plug your version in the Update Results node to see the spreadsheet update on each run of the loop.

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.googleDrive","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.lmChatOpenRouter"]

workflow_json:
  {"meta":{"instanceId":"45e293393b5dd8437fb351e5b1ef5511ef67e6e0826a1c10b9b68be850b67593"},"nodes":[{"id":"5c25edcc-987c-4b60-b472-6c476dc866c6","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-580,440],"parameters":{},"typeVersion":1},{"id":"60521a1e-3f00-4dd6-9651-a5f9ae1659ab","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[-20,-180],"parameters":{"options":{"reset":false},"batchSize":"=1"},"typeVersion":3},{"id":"8e0fd8c4-51a1-44fb-8524-034df4fd4fe5","name":"Wait","type":"n8n-nodes-base.wait","position":[1520,340],"webhookId":"4e47e9cb-5e6d-4020-a2db-f60c04f2f727","parameters":{"amount":0.5},"typeVersion":1.1},{"id":"0e457acc-5047-43ed-977f-f08714498ffc","name":"OpenRouter Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[740,320],"parameters":{"model":"openai/gpt-4.1","options":{}},"credentials":{"openRouterApi":{"id":"ipzDVYsZqbum9bX4","name":"OpenRouter account 2"}},"typeVersion":1},{"id":"46ce90ac-6b58-4770-a6bd-48fccefc8713","name":"Extract from File","type":"n8n-nodes-base.extractFromFile","position":[500,20],"parameters":{"options":{},"operation":"pdf"},"typeVersion":1},{"id":"9e76d679-6f4b-419b-af36-771aba5b9e98","name":"Google Drive","type":"n8n-nodes-base.googleDrive","onError":"continueRegularOutput","position":[120,20],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json[\"URL\"].match(/[-\\w]{25,}/)[0] }}"},"options":{},"operation":"download"},"credentials":{"googleDriveOAuth2Api":{"id":"yej6mV2w6RslwOGo","name":"Google Drive account"}},"typeVersion":3,"alwaysOutputData":true},{"id":"8f2fc75f-ea5d-4700-b58b-b5f5e3e360e5","name":"Get Tests","type":"n8n-nodes-base.googleSheets","position":[-420,440],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU/edit#gid=0","cachedResultName":"Tests"},"documentId":{"__rl":true,"mode":"list","value":"10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU","cachedResultUrl":"https://docs.google.com/spreadsheets/d/10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU/edit?usp=drivesdk","cachedResultName":"LLM Judge"}},"credentials":{"googleSheetsOAuth2Api":{"id":"04iXS2lwUVyzn6F2","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"49b0cc43-30d3-4331-a608-4f51c9ac0efd","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[900,320],"parameters":{"jsonSchemaExample":"{\n  \"reasoning\": \"The Assistant fabricated a $1 million figure and a 12-month provision that are not found in the source. This breaches factual correctness and completeness. The output would mislead business stakeholders if used without correction.\",\n  \"decision\": \"Fail\"\n}"},"typeVersion":1.2},{"id":"cf3cce00-33c4-4bcd-a2a2-75d7e49439d3","name":"Update Results","type":"n8n-nodes-base.googleSheets","position":[1220,140],"parameters":{"columns":{"value":{"ID":"={{ $('Loop Over Items').item.json[\"ID\"] }}","URL":"={{ $('Loop Over Items').item.json[\"URL\"] }}","Input":"={{ $('Loop Over Items').item.json[\"Input\"] }}","Output":"={{ $('Loop Over Items').item.json[\"Output\"] }}","Decision":"={{ $json.output.decision }}","Test No.":"={{ $('Loop Over Items').item.json[\"Test No.\"] }}","Reasoning":"={{ $json.output.reasoning }}","AI Platform":"={{ $('Loop Over Items').item.json[\"AI Platform\"] }}","Relevant Source Reference":"={{ $('Loop Over Items').item.json[\"Relevant Source Reference\"] }}"},"schema":[{"id":"ID","type":"string","display":true,"removed":false,"required":false,"displayName":"ID","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Test No.","type":"string","display":true,"removed":false,"required":false,"displayName":"Test No.","defaultMatch":false,"canBeUsedToMatch":true},{"id":"AI Platform","type":"string","display":true,"required":false,"displayName":"AI Platform","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Relevant Source Reference","type":"string","display":true,"removed":false,"required":false,"displayName":"Relevant Source Reference","defaultMatch":false,"canBeUsedToMatch":true},{"id":"URL","type":"string","display":true,"removed":false,"required":false,"displayName":"URL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Input","type":"string","display":true,"required":false,"displayName":"Input","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Output","type":"string","display":true,"required":false,"displayName":"Output","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Decision","type":"string","display":true,"removed":false,"required":false,"displayName":"Decision","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Reasoning","type":"string","display":true,"required":false,"displayName":"Reasoning","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":537199982,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU/edit#gid=537199982","cachedResultName":"Results"},"documentId":{"__rl":true,"mode":"list","value":"10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU","cachedResultUrl":"https://docs.google.com/spreadsheets/d/10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU/edit?usp=drivesdk","cachedResultName":"Info Extraction Tasks (LLM Judge)"}},"credentials":{"googleSheetsOAuth2Api":{"id":"04iXS2lwUVyzn6F2","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"80a9da50-93df-476a-a39f-ffece642a934","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-540,220],"parameters":{"color":6,"width":360,"height":180,"content":"## 1. Fetch test cases\nWe start by grabbing our list of test cases stored in a Google Sheet [here](https://docs.google.com/spreadsheets/d/10l_gMtPsge00eTTltGrgvAo54qhh3_twEDsETrQLAGU/edit?usp=sharing).\n\nWe only want the rows that connect to a PDF document, as DOCX downloads will need to be handled separately."},"typeVersion":1},{"id":"2bba0cc9-460d-48c3-bcc6-a79c2b00b23e","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-80,-400],"parameters":{"color":6,"width":260,"height":200,"content":"## 2. Loop through our data\nWe use a loop here to visually see our workflow going through each item one-by-one."},"typeVersion":1},{"id":"7ccb6426-e79e-4cdc-ac5f-59c022f8978d","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[200,-180],"parameters":{"color":6,"width":360,"content":"## 3. Grab the PDF as text\nWe download the PDF from the Google Drive link in the Google Sheet, extracting the file as text for the next step. We filter out any files that do not return data."},"typeVersion":1},{"id":"6dc17e29-ea6c-460b-b0e0-99cc41977891","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[700,-180],"parameters":{"color":6,"width":360,"height":280,"content":"## 4. Judge LLM outputs\nOur prompt judges the LLM input/output and decides if the LLM passed the test. We also ask for a reason why the judge made its decision, which we can use to refine our eval later.\n\nWe're using OpenRouter here, which lets us easily tweak which LLM we want to use.\n\nThe output parser makes sure that the output is in JSON format, making the data easy to parse in the next step."},"typeVersion":1},{"id":"1fd001a6-e67a-406c-b81c-c0a454ecd73e","name":"LLM Judge","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[740,140],"parameters":{"text":"=INPUT:\n\n{\n  \"task\": {{ $('Loop Over Items').item.json['Input '] }},\n  \"source\": {{ $json.text }},\n  \"output\": {{ $('Loop Over Items').item.json['Output '] }}\n}\n\nOUTPUT:","messages":{"messageValues":[{"message":"=You are an expert legal evaluator. Your role is to decide if each AI output for an information extraction task is fully accurate.\nInstructions:\nRead the extraction task and the source material carefully.\n\n\nExtract the correct answer for yourself, based only on the source material. (Do not include your answer in your output.)\n\n\nFor each AI output provided, do the following:\n\n\nCompare it against your own extraction.\n\n\nJudge “accuracy” as follows:\n\n\nPass: The output is complete (all required info present), faithful (statements fully supported by the source), and contains no hallucinated or omitted content.\n\n\nFail: Any omission, misstatement, unsupported addition, or distortion.\n\n\nIgnore differences in style, order, or formatting. Judge on factual substance only.\n\n\nFor each output, give:\n\n\nAccuracy: Pass or Fail\n\n\nReasoning: In 1-2 sentences, cite the specific content that was included, missed, or misstated. Be as objective and specific as possible.\n\n\nOutput Format:\n\nGive your answer in a JSON format. Don't include any other text than the JSON.\n\n{\n  \"decision\": \"Pass/Fail\",\n  \"reasoning\": \"[Concise explanation referencing the substance of the source]\"\n}\n\nGuidelines:\nUse your internal extraction for comparison, but do not include it in your output.\n\n\nFocus only on whether the output accurately and fully reflects the required information from the source.\n\n\nDo not consider writing style or format.\n\n\nJustify your decision with evidence from the source.\n\n\nExamples:\n\nAI Output 1:\n\n{\n  \"decision\": \"Pass\",\n  \"reasoning\": \"Correctly included the requirements for advance notice and refund as set out in the source, with no omissions.\"\n}\n\n\nAI Output 2:\n\n{\n  \"decision\": \"Fail\",\n  \"reasoning\": \"Missed the requirement that refunds are provided only as credit, not cash, making the output incomplete.\"\n}"}]},"promptType":"define","hasOutputParser":true},"typeVersion":1.4},{"id":"2e94c252-9973-4915-ab21-838681e7ea5c","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1160,-80],"parameters":{"color":6,"width":260,"height":180,"content":"## 5. Update results\nWe create a new row in our output sheet, containing our original data together with the judge decision/reasoning."},"typeVersion":1},{"id":"05d7a5c0-3ad5-4ec1-ae3f-f533e16f8027","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[1460,140],"parameters":{"color":6,"width":220,"height":180,"content":"## 6. Pause between runs\nWe wait half a second, so that we don't hit the OpenAI API rate limit and get an error."},"typeVersion":1},{"id":"099b10f3-c9cf-4fa0-9a07-ccb73ea11542","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-600,640],"parameters":{"width":460,"height":280,"content":"## Data format\nOur Tests Sheet contains the following columns:\n- ID: A unique identifier for each row\n- Test No.: The test that the LLM was given\n- AI Platform: The LLM that was given the test.\n- Relevant Source: The file name of the source document that was given to the LLM.\n- URL: The Google Drive URL where the file is stored.\n- Input: The input prompt that the LLM was given.\n- Output: The response that the LLM gave."},"typeVersion":1},{"id":"65532c6d-5638-432f-8f6a-a5a02b1aaf08","name":"Is PDF?","type":"n8n-nodes-base.if","position":[-260,440],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"1609d1f6-2142-4965-8d6b-01cfa53251c4","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['Relevant Source Reference'] }}","rightValue":".pdf"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"17aa2c76-7ea7-41fe-84ed-4e485ef4db5e","name":"Is a file?","type":"n8n-nodes-base.if","position":[300,20],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ad7272d4-0840-4c71-bee4-64faf944e3ca","operator":{"type":"object","operation":"notEmpty","singleValue":true},"leftValue":"={{ $binary }}","rightValue":""}]}},"typeVersion":2.2}],"pinData":{},"connections":{"Wait":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Is PDF?":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Get Tests":{"main":[[{"node":"Is PDF?","type":"main","index":0}]]},"LLM Judge":{"main":[[{"node":"Update Results","type":"main","index":0}]]},"Is a file?":{"main":[[{"node":"Extract from File","type":"main","index":0}],[{"node":"Loop Over Items","type":"main","index":0}]]},"Google Drive":{"main":[[{"node":"Is a file?","type":"main","index":0}]]},"Update Results":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Google Drive","type":"main","index":0}]]},"Extract from File":{"main":[[{"node":"LLM Judge","type":"main","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"LLM Judge","type":"ai_languageModel","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"LLM Judge","type":"ai_outputParser","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Get Tests","type":"main","index":0}]]}}}


name: Query and Monitor Shopify Orders via Telegram Bot Commands
author_name: Roninimous
author_username: roninimous
categories: []
created_at: 2025-06-06T04:09:16.931Z
updated_at: 2025-06-06T04:09:16.931Z
url: https://n8n.io/workflows/4714
scraped_at: 2025-06-19 22:49:25
description:
  This n8n workflow integrates Shopify order management with Telegram, allowing you to query open orders and order details directly through Telegram chat commands. It provides an interactive way to monitor your Shopify store orders using Telegram as an interface.

  Key Features

  Telegram Trigger: Listens for messages and callback queries from your Telegram bot.
  Switch Node: Routes incoming Telegram messages to different flows based on message content:
  	 /orders command to fetch all open orders
  	Callback queries starting with /order_ to fetch details of a specific order
  Shopify Get Orders: Retrieves all open orders from your Shopify store using your Shopify API credentials.
  Conditional Check (If Node): Determines if there are any open orders; branches accordingly:
  	If orders exist, prepare an interactive Telegram message with a list of orders.1
  	If no orders exist, send a “No Order” message.
  Orders Code Node: Formats the list of open orders into a Telegram message with inline buttons. Each button corresponds to an order and sends a callback data containing the order ID.
  Get Order Details: When a user selects an order button, the workflow extracts the order ID from the callback data, fetches detailed order information from Shopify, and formats the order items into a readable message.
  Send Messages to Telegram: Sends formatted messages back to Telegram:
  	The list of open orders with clickable buttons.
  	Detailed information about a selected order.
  	“No Order” notification if there are no open orders.

  How It Works
  A Telegram user sends /orders to the bot.
  The workflow fetches open orders from Shopify and sends a message with buttons listing each order.
  When a user clicks an order button, the workflow fetches and displays detailed information about that specific order in Telegram.
  If there are no open orders, the bot replies accordingly.

  Setup Instructions
  Create a Telegram Bot:
  	Use @BotFather on Telegram to create a bot and get the bot token.
  Obtain Shopify API Credentials:
  	Create a private app in your Shopify admin dashboard with permission to read orders.
  	Obtain the API key and access token.
  Configure n8n Credentials:
  	Add your Telegram bot token as Telegram API credentials in n8n.
  	Add your Shopify API credentials in n8n Shopify credentials.
  Import the Workflow:
  	Import this workflow into your n8n instance.
  	Update the Telegram and Shopify credential nodes to use your credentials.
  Set Webhook URLs:
  	Ensure your Telegram bot webhook is set correctly to receive messages.
  	n8n webhook URLs should be publicly accessible.

  Test the Workflow:
  	Send /orders to your Telegram bot to verify it retrieves and lists open orders.

  Customization Guidance
  Modify Commands: Update the Switch node to add more Telegram commands or change existing ones.
  Change Message Formats: Edit the Code nodes to customize how order lists and details appear.
  Expand Shopify Integration: Add nodes to handle other Shopify operations like updating orders, managing products, etc.
  Multi-User Support: Adapt the workflow to handle multiple Telegram chat IDs dynamically.

  Security and Implementation Notes
  The native Telegram node in n8n has limitations: it does not support sending dynamic inline keyboard arrays in JSON format, which is essential for displaying a variable number of buttons depending on how many orders are retrieved from Shopify.
  To overcome this, this workflow uses the HTTP Request node to call Telegram’s API directly, allowing full flexibility to send dynamic inline keyboards as JSON objects. (I will make an update once Telegram Node support dynamic inline keyboards).
  Security Considerations:**
  	Always store your Telegram bot token securely in n8n credentials and never expose it in the HTTP Request node’s URL or body directly.
  	Use environment variables or n8n credentials to inject tokens safely.
  	Be mindful of Telegram API rate limits and add error handling in your workflow.
  While using HTTP Request nodes increases flexibility, it also requires careful management of request payloads and authentication, as opposed to the built-in Telegram node which abstracts much of this complexity.

  Benefits
  Quickly access Shopify order data without leaving Telegram.
  Interactive inline buttons improve user experience.
  Automated, real-time integration between Shopify and Telegram.

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.telegram","n8n-nodes-base.shopify","n8n-nodes-base.code"]

workflow_json:
  {"id":"A0Db66VzkRkoTQtL","meta":{"instanceId":"1e9c5d216f82eece259bdabdf191aced054cce6456f87af0ff7807ca2b37638a","templateCredsSetupCompleted":true},"name":"Query and Monitor Shopify Orders via Telegram Bot Commands","tags":[{"id":"hlEHEpOdSg5lhIqi","name":"Template","createdAt":"2025-06-05T15:35:52.689Z","updatedAt":"2025-06-05T15:35:52.689Z"}],"nodes":[{"id":"0ec29eee-814b-43a6-8ed6-608306de9dd7","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","position":[-760,280],"webhookId":"85257fe6-a492-4523-a3c0-156054b46d51","parameters":{"updates":["message","*"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"ya9idB8joP5s1Xf4","name":"Your Telegram Access Token"}},"typeVersion":1.2},{"id":"29ea564c-f456-4779-b5f4-cd4c26e6738f","name":"get Orders","type":"n8n-nodes-base.shopify","position":[0,0],"parameters":{"options":{"status":"open"},"operation":"getAll","returnAll":true,"authentication":"accessToken"},"credentials":{"shopifyAccessTokenApi":{"id":"GsVEAizxZ3ZOh9Qa","name":"Your Shopify Access Token"}},"notesInFlow":false,"typeVersion":1,"alwaysOutputData":true},{"id":"5a6bf5b1-0249-4773-aae2-9ac3fdd3c8a2","name":"Orders","type":"n8n-nodes-base.code","position":[580,-120],"parameters":{"jsCode":"const chatId = $('Telegram Trigger').first().json.message.chat.id;\n\nreturn [{\n  json: {\n    chat_id: chatId,\n    text: \"All Open Orders\",\n    reply_markup: {\n      inline_keyboard: items.map(order => [{\n        text: `${order.json.name} ($${order.json.total_price})`,\n        callback_data: `/order_${order.json.id}`\n      }])\n    }\n  }\n}];\n"},"typeVersion":2},{"id":"cfa6e297-1462-480b-9e48-c3d50a63cadc","name":"No Order","type":"n8n-nodes-base.code","position":[580,80],"parameters":{"jsCode":"const chatId = $('Telegram Trigger').first().json.message.chat.id;\n\nreturn [{\n  json: {\n    chat_id: chatId,\n    text: \"No Order\",\n   \n  }\n}];\n"},"typeVersion":2},{"id":"fcca715b-6f12-4baa-bfaa-7878fcf61b69","name":"get Order","type":"n8n-nodes-base.shopify","position":[200,420],"parameters":{"options":{},"orderId":"={{ $json.orderId }}","operation":"get","authentication":"accessToken"},"credentials":{"shopifyAccessTokenApi":{"id":"GsVEAizxZ3ZOh9Qa","name":"Your Shopify Access Token"}},"notesInFlow":false,"typeVersion":1,"alwaysOutputData":false},{"id":"5463162c-7a0b-4cbc-b9f1-1f6e7fa03ee5","name":"Clean Up Order","type":"n8n-nodes-base.code","position":[480,420],"parameters":{"jsCode":"const items = $json.line_items || [];\n\nlet message = '🧾 *'+ $input.first().json.name+'*\\n\\n';\n\nitems.forEach(item => {\n  const variant = item.variant_title ? ` ${item.variant_title}` : '';\n  message += `• ${item.title}${variant} x ${item.quantity} — $${item.price}\\n`;\n});\n\nreturn [{\n  json: {\n    text: message,\n    chat_id: $('Get Order ID').first().json.chat_id,  // pass this from previous step\n  \n    message_id: $('Get Order ID').first().json.message_id,\n    \n    parse_mode: \"Markdown\",\n    reply_markup: {\n      inline_keyboard: []\n    }\n  \n  }\n}];\n"},"typeVersion":2},{"id":"375a5e49-cc8e-43b2-a8c3-ecdbcaff5fbf","name":"Check If There's Any Order","type":"n8n-nodes-base.if","position":[220,0],"parameters":{"options":{"ignoreCase":false},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"7cba3954-60cd-44ac-ad53-509ae2fcb6d2","operator":{"type":"object","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json }}","rightValue":"asdf"},{"id":"a2964354-a639-4621-a895-00ad314f397f","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"","rightValue":""}]}},"typeVersion":2.2,"alwaysOutputData":false},{"id":"6139c466-6c0f-4faa-ad28-3fff661343e6","name":"Get All Orders/Get An Order Detail","type":"n8n-nodes-base.switch","position":[-500,280],"parameters":{"rules":{"values":[{"outputKey":"Get Order Detail","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"15856982-a1b8-4ec6-8fe1-4c4dea6c27cc","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.message.text }}","rightValue":"/orders"}]},"renameOutput":true},{"outputKey":"Get An Order","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"b64cbec5-2e9f-4466-9753-4a3dd77fe381","operator":{"type":"string","operation":"startsWith"},"leftValue":"={{ $json.callback_query.data }}","rightValue":"/order_"}]},"renameOutput":true}]},"options":{"ignoreCase":true}},"typeVersion":3.2},{"id":"624cd9da-e921-4849-8ecd-5b4cfd281e08","name":"Get Order ID","type":"n8n-nodes-base.code","position":[-120,420],"parameters":{"jsCode":"const callbackData = $json.callback_query.data; // e.g., /order_5832437071968ACSbot\n\nconst id = callbackData.match(/^\\/order_(\\d+)/)?.[1];\n\nreturn [{\n  json: {\n    orderId: id,\n    chat_id: $json.callback_query.message.chat.id,\n    message_id: $json.callback_query.message.message_id\n  }\n}];"},"typeVersion":2},{"id":"22148fd6-8503-4486-b1b1-2c1a947cddab","name":"Send Orders to Telegram","type":"n8n-nodes-base.httpRequest","position":[900,-20],"parameters":{"url":"https://api.telegram.org/bot<Access Token>/sendMessage","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"chat_id","value":"={{ $json.chat_id }}"},{"name":"text","value":"={{ $json.text }}"},{"name":"reply_markup","value":"={{ JSON.stringify($json.reply_markup) }}"}]}},"typeVersion":4.2},{"id":"330bc89d-4f23-4401-9f18-e0d9d9743b06","name":"Send Order Details","type":"n8n-nodes-base.telegram","position":[900,420],"webhookId":"fd0d23df-37db-4bd1-ae1e-dd03b54e6089","parameters":{"text":"={{ $json.text }}","chatId":"={{ $json.chat_id }}","messageId":"={{ $json.message_id }}","operation":"editMessageText","additionalFields":{"parse_mode":"Markdown"}},"credentials":{"telegramApi":{"id":"ya9idB8joP5s1Xf4","name":"Your Telegram Access Token"}},"typeVersion":1.2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"d2e1cf3c-68b9-4064-9ba9-351c2c8b2bdf","connections":{"Orders":{"main":[[{"node":"Send Orders to Telegram","type":"main","index":0}]]},"No Order":{"main":[[{"node":"Send Orders to Telegram","type":"main","index":0}]]},"get Order":{"main":[[{"node":"Clean Up Order","type":"main","index":0}]]},"get Orders":{"main":[[{"node":"Check If There's Any Order","type":"main","index":0}]]},"Get Order ID":{"main":[[{"node":"get Order","type":"main","index":0}]]},"Clean Up Order":{"main":[[{"node":"Send Order Details","type":"main","index":0}]]},"Telegram Trigger":{"main":[[{"node":"Get All Orders/Get An Order Detail","type":"main","index":0}]]},"Check If There's Any Order":{"main":[[{"node":"Orders","type":"main","index":0}],[{"node":"No Order","type":"main","index":0}]]},"Get All Orders/Get An Order Detail":{"main":[[{"node":"get Orders","type":"main","index":0}],[{"node":"Get Order ID","type":"main","index":0}]]}}}


name: Daily Validated Business Ideas using n8n and Upwork
author_name: Archit Jain
author_username: architjn
categories: []
created_at: 2025-06-06T05:41:25.897Z
updated_at: 2025-06-06T05:41:25.897Z
url: https://n8n.io/workflows/4715
scraped_at: 2025-06-19 22:49:17
description:
  How it works
  Runs at set times to fetch new Upwork job listings.
  Checks each job’s total or hourly budget and keeps only higher-budget ones.
  Extracts the job description for those selected jobs.
  Uses AI to identify the core business idea from each description.
  Records the idea and job details into a Google Sheet.
  Can also be triggered manually to process a single job description.

  Set up steps

  Required:** Upwork API key, AI service key, and a Google Sheet.
  Import:** Bring the JSON into n8n.
  Configure:** Enter your API keys and connect to your Google Sheet.
  Time:** About 25–35 minutes to complete all steps.
  Notes:** Detailed setup instructions are added as sticky notes inside the workflow.

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.toolWorkflow","@n8n/n8n-nodes-langchain.lmChatOpenRouter"]

workflow_json:
  {"id":"OFvs6LyLZABBuDvn","meta":{"instanceId":"933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9","templateCredsSetupCompleted":true},"name":"Business Idea Validator","tags":[],"nodes":[{"id":"d38b96c8-bd70-4e14-8ce5-409ca67aed9a","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[0,0],"parameters":{},"typeVersion":1.2},{"id":"ecd86c00-6b21-45d6-9544-f930cdf33775","name":"HTTP Request","type":"n8n-nodes-base.httpRequest","position":[220,0],"parameters":{},"typeVersion":4.2},{"id":"b50860de-fd41-4898-9f54-cf10447b5157","name":"Job Description","type":"n8n-nodes-base.set","position":[1100,0],"parameters":{},"typeVersion":3.4},{"id":"0cfce523-c1ca-4d46-89aa-8a5fcd23f7e8","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[0,460],"parameters":{},"typeVersion":1.1},{"id":"2bf8a87d-0084-4140-a02e-cd920e346c44","name":"Get Core Business Idea","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1420,200],"parameters":{},"typeVersion":2.2},{"id":"16124464-57b8-4bcf-977f-454ea1d679ea","name":"Code Idea Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[220,460],"parameters":{},"typeVersion":2},{"id":"b0f30a1b-8d26-42db-a866-eff12ee08194","name":"Validator Agent","type":"@n8n/n8n-nodes-langchain.agent","onError":"continueErrorOutput","maxTries":2,"position":[1352,0],"parameters":{},"retryOnFail":true,"typeVersion":2},{"id":"b801dc33-e317-4143-89ef-21025ef6a4e3","name":"Switch","type":"n8n-nodes-base.switch","position":[440,0],"parameters":{},"typeVersion":3.2},{"id":"4e683cad-b46b-4366-898e-ac5f0df86c41","name":"Big Total Projects","type":"n8n-nodes-base.filter","position":[660,-100],"parameters":{},"typeVersion":2.2},{"id":"e8e6e88a-33cb-4687-a1fd-6a042dc3edfc","name":"Big Hourly Projects","type":"n8n-nodes-base.filter","position":[660,100],"parameters":{},"typeVersion":2.2},{"id":"058b7d38-06e7-407c-90d8-758082b2293c","name":"Merge","type":"n8n-nodes-base.merge","position":[880,0],"parameters":{},"typeVersion":3.2},{"id":"a8178e95-700f-4284-9294-2c2756142276","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1620,200],"parameters":{},"typeVersion":1.2},{"id":"ab2fa6ee-5816-4567-a5a8-0b4ab82544c5","name":"Business Idea Sheet","type":"n8n-nodes-base.googleSheets","position":[1920,0],"parameters":{},"typeVersion":4.6},{"id":"f9506c9b-30d6-47c3-9d37-9a775df5eb54","name":"oAI 4.1 - Nano","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[1220,200],"parameters":{},"typeVersion":1},{"id":"3c325f48-a8b4-4cd0-b4f8-3be2379e0493","name":"oAI 4.1","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[308,680],"parameters":{},"typeVersion":1},{"id":"312cd974-e33c-42dd-8460-e9b11583ef62","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-60,-220],"parameters":{"content":""},"typeVersion":1},{"id":"e167543c-6ed4-40df-8bb4-7cda4a8090d6","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[400,-220],"parameters":{"content":""},"typeVersion":1},{"id":"63329ded-cc8b-41f8-bfe6-30b20354ce3d","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1060,-220],"parameters":{"content":""},"typeVersion":1},{"id":"0c39320a-4f28-4595-9256-4da336f42fa6","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1800,-220],"parameters":{"content":""},"typeVersion":1},{"id":"ed36d331-a924-4585-8dcb-bef41868e337","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-60,380],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"b409c1f8-b6c1-4ec1-82de-a2baa216c5c2","connections":{"Merge":{"main":[[{"node":"Job Description","type":"main","index":0}]]},"Switch":{"main":[[{"node":"Big Total Projects","type":"main","index":0}],[{"node":"Big Hourly Projects","type":"main","index":0}]]},"oAI 4.1":{"ai_languageModel":[[{"node":"Code Idea Agent","type":"ai_languageModel","index":0}]]},"HTTP Request":{"main":[[{"node":"Switch","type":"main","index":0}]]},"oAI 4.1 - Nano":{"ai_languageModel":[[{"node":"Validator Agent","type":"ai_languageModel","index":0}]]},"Job Description":{"main":[[{"node":"Validator Agent","type":"main","index":0}]]},"Validator Agent":{"main":[[{"node":"Business Idea Sheet","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]},"Big Total Projects":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Big Hourly Projects":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Get Core Business Idea":{"ai_tool":[[{"node":"Validator Agent","type":"ai_tool","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Validator Agent","type":"ai_outputParser","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Code Idea Agent","type":"main","index":0}]]}}}


name: Facebook Ads Competitive Analysis using Gemini and Open AI
author_name: Archit Jain
author_username: architjn
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","@n8n/n8n-nodes-langchain.openAi"]
categories: []
created_at: 2025-06-06T05:43:57.695Z
updated_at: 2025-06-06T05:43:57.695Z
url: https://n8n.io/workflows/4716
scraped_at: 2025-06-19 22:50:43
description:
  How it works
  User submits a keyword through a form to trigger the workflow.
  Ads matching the keyword are scraped from Facebook Ads Library.
  Ads are filtered by media type (image or video).
  Images are analyzed using an AI model to describe visuals and text.
  Videos are downloaded, processed, and sent to Gemini for visual and spoken content analysis.
  Text, URLs, and media descriptions are compiled.
  All ad insights are saved into a Google Sheet for easy viewing.

  Set up steps
  Requires** Apify and Gemini API credentials, Google Sheets access, and OpenAI key.
  Import** the workflow into n8n and connect accounts to form, HTTP, and Sheets nodes.
  Provide form trigger URL for user input; no advanced config needed.
  Estimated setup time:** ~15–20 minutes for a user familiar with n8n.
  Sticky notes** inside the workflow provide helpful guidance per section.

workflow_json:
  {"id":"vHsNo2bT3fT7hUut","meta":{"instanceId":"933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9","templateCredsSetupCompleted":true},"name":"Competitor Facebook Ads Analysis","tags":[],"nodes":[{"id":"adf65921-a4ad-45a9-af66-cdf28fb9489d","name":"On form submission","type":"n8n-nodes-base.formTrigger","position":[-320,-100],"webhookId":"8a6055af-adc8-48df-95d7-ebcc24c4ba08","parameters":{},"typeVersion":2.2},{"id":"b1a7ea37-cb62-40d1-8f44-5462526ee15d","name":"Scrape Ads","type":"n8n-nodes-base.httpRequest","position":[-100,-100],"parameters":{},"typeVersion":4.2},{"id":"e4afbd32-609f-4cc8-8110-ddba6fae220c","name":"Switch","type":"n8n-nodes-base.switch","position":[120,-100],"parameters":{},"typeVersion":3.2},{"id":"5b65018d-13bc-49c1-8d90-72c312d435a0","name":"OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[1000,240],"parameters":{},"typeVersion":1.8},{"id":"30b8d761-b8dd-4fa7-b95d-69fdbaf5f611","name":"Extract from File","type":"n8n-nodes-base.extractFromFile","position":[700,-440],"parameters":{},"typeVersion":1},{"id":"297b137d-efe5-4505-af48-64ee1b74e183","name":"Gemini Video Decode","type":"n8n-nodes-base.httpRequest","maxTries":2,"position":[1520,-240],"parameters":{},"retryOnFail":true,"typeVersion":4.2},{"id":"269d4a72-1357-43f6-8f00-04a1ee4a6598","name":"Download Video","type":"n8n-nodes-base.httpRequest","position":[440,-440],"parameters":{},"typeVersion":4.2},{"id":"85e1b3f4-0756-4417-a671-40fa12dbf7ac","name":"Final Image Values","type":"n8n-nodes-base.set","position":[1240,240],"parameters":{},"typeVersion":3.4},{"id":"32b28e43-318f-4fef-b6ad-0aedbc1208b8","name":"Final Video Values","type":"n8n-nodes-base.set","position":[1820,-460],"parameters":{},"typeVersion":3.4},{"id":"54257346-eebb-4d78-b067-6fced3f47f87","name":"Merge","type":"n8n-nodes-base.merge","position":[2100,-100],"parameters":{},"typeVersion":3.2},{"id":"2a0d213e-12b2-4f74-927b-83800f87c669","name":"Save","type":"n8n-nodes-base.googleSheets","position":[2320,-100],"parameters":{},"typeVersion":4.6},{"id":"af5c93a1-4cfd-4872-87bf-9aa14c6c9d3f","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[960,-440],"parameters":{},"typeVersion":3},{"id":"9ffc219a-5fdc-4807-90a8-9cbeb1b96070","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-380,-420],"parameters":{"content":""},"typeVersion":1},{"id":"6cd95539-dd5c-4f30-acd5-74c9ef6165dd","name":"Wait","type":"n8n-nodes-base.wait","position":[1320,-240],"webhookId":"32807fcb-8d03-4359-bfbe-34463de097a9","parameters":{},"typeVersion":1.1},{"id":"29e86694-dedd-4c98-b495-a1392fc60c02","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[360,-720],"parameters":{"content":""},"typeVersion":1},{"id":"96e4fe36-feab-460a-afa1-dc37bfff728f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1200,-360],"parameters":{"content":""},"typeVersion":1},{"id":"f4776bf8-1cdf-464a-8e84-ee3a3484179c","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[360,40],"parameters":{"content":""},"typeVersion":1},{"id":"704d9e14-42bd-453e-b0a0-66023860f4b8","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[2040,-360],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"efedf1cf-6e33-41ea-889c-e37f73ed8826","connections":{"Wait":{"main":[[{"node":"Gemini Video Decode","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Save","type":"main","index":0}]]},"OpenAI":{"main":[[{"node":"Final Image Values","type":"main","index":0}]]},"Switch":{"main":[[{"node":"Download Video","type":"main","index":0}],[{"node":"OpenAI","type":"main","index":0}]]},"Scrape Ads":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Download Video":{"main":[[{"node":"Extract from File","type":"main","index":0}]]},"Loop Over Items":{"main":[[{"node":"Final Video Values","type":"main","index":0}],[{"node":"Wait","type":"main","index":0}]]},"Extract from File":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Final Image Values":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Final Video Values":{"main":[[{"node":"Merge","type":"main","index":0}]]},"On form submission":{"main":[[{"node":"Scrape Ads","type":"main","index":0}]]},"Gemini Video Decode":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]}}}


name: Generate Landing Page Layouts from Competitor Analysis with GPT-4
author_name: Henry
author_username: henry
nodes_used: ["@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi"]
categories: []
created_at: 2025-06-06T07:48:52.208Z
updated_at: 2025-06-06T07:48:52.208Z
url: https://n8n.io/workflows/4717
scraped_at: 2025-06-19 22:48:54
description:
  Who is this for?

  This workflow is ideal for SEO specialists, web designers, and digital marketers who want to quickly draft effective landing page layouts by referencing established competitors. It suits users who need a fast, structured starting point for web design while ensuring competitive relevance.

  What problem is this workflow solving? / Use case

  Designing a high-converting landing page from scratch can be time-consuming. This workflow automates the process of analyzing a competitor’s website, identifying essential sections, and producing a tailored layout—helping users save time and improve their website’s effectiveness.

  What this workflow does

  The workflow fetches and analyzes your chosen competitor’s landing page, using web scraping and structure-detection nodes in n8n. It identifies primary sections like hero banners, service highlights, testimonials, and contact forms, and then generates a simplified, customizable layout suitable for wireframing or initial design.

  Setup

  Prepare your unique services and target audience profile for customization later.
  Gather the competitor’s landing page URL you wish to analyze.
  Run the workflow, inputting your competitor’s URL when prompted.

  How to customize this workflow to your needs

  After generating the initial layout, adapt section names and content blocks to highlight your services and brand messaging.
  Add or remove sections based on your objectives and audience insights.
  Integrate additional nodes for richer analysis, such as keyword extraction or design pattern detection, to tailor the output further.

workflow_json:
  {"id":"jw0iSqoXu4hKWAuj","meta":{"instanceId":"1af8a0dc0d2f537b7c08209af728c271b5a03806bdf309bedf99d668f2608ee6","templateCredsSetupCompleted":true},"name":"Create Landing Page Layouts with OpenAI GPT-4.1 from Competitor Analysis","tags":[],"nodes":[{"id":"8a674b3c-7544-49d5-8fd6-f96d74bc0991","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-180,-100],"parameters":{},"typeVersion":1},{"id":"6bed28c7-6383-4ec2-bc54-24c659faf413","name":"GenerateLayout","type":"@n8n/n8n-nodes-langchain.agent","position":[1036,-100],"parameters":{"text":"=## Input\nYou will be provided with:\n- Research outlines from other websites (summaries or structures of similar main pages) :  {{ $json.output }}\n- A list of services to be featured : {{ $('Set input data').item.json.my_services }}\n- A description of the target audience: {{ $('Set input data').item.json['my_target_audience '] }}\n## Role / Persona\nYou are a senior website content strategist, skilled at synthesizing competitive research, business offerings, and audience insights to design high-impact website main page structures.\n\n## Context\nA user is planning the main (home) page of a website. They have collected research outlines from similar websites, clarified the services to be highlighted, and defined the target audience. Your task is to recommend an effective main page outline that reflects best practices, showcases the services, and appeals to the intended audience.\n\n## Task / Instruction\n- Review the provided research outlines, list of services, and target audience description.\n- Synthesize this information to recommend a main page outline that is logical, engaging, and tailored to the target audience.\n- For each main section in your recommended outline, provide a brief description explaining its purpose and the type of content it should include.\n\n## Output Formatting / Style\nPresent your recommended main page outline as a bulleted list. For each main section, include:\n- The section title (in bold)\n- A concise description (one sentence) of the section’s content or function.\n\n## Additional Requirements\n- Focus only on the main (home) page structure.\n- Use clear, professional English.\n- Ensure the outline is relevant and appealing to the specified target audience.\n- Do not include subsections unless specifically requested.\n- Suitable for business or professional website planning.\n","options":{},"promptType":"define"},"typeVersion":1.9},{"id":"423ed9a0-e914-4d88-8148-acc41b199629","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-740,-380],"parameters":{"color":4,"width":500,"height":1000,"content":"## Create Landing Page Layouts with OpenAI GPT-4.1 from Competitor Analysis\n\n### Who is this for?\n\nThis workflow is ideal for SEO specialists, web designers, and digital marketers who want to quickly draft effective landing page layouts by referencing established competitors. It suits users who need a fast, structured starting point for web design while ensuring competitive relevance.\n\n### What problem is this workflow solving? / Use case\n\nDesigning a high-converting landing page from scratch can be time-consuming. This workflow automates the process of analyzing a competitor’s website, identifying essential sections, and producing a tailored layout—helping users save time and improve their website’s effectiveness.\n\n### What this workflow does\n\nThe workflow fetches and analyzes your chosen competitor’s landing page, using web scraping and structure-detection nodes in n8n. It identifies primary sections like hero banners, service highlights, testimonials, and contact forms, and then generates a simplified, customizable layout suitable for wireframing or initial design.\n\n### Setup\n\n- Prepare your unique services and target audience profile for customization later.\n- Gather the competitor’s landing page URL you wish to analyze.\n- Run the workflow, inputting your competitor’s URL when prompted.\n\n### How to customize this workflow to your needs\n\n- After generating the initial layout, adapt section names and content blocks to highlight your services and brand messaging.\n- Add or remove sections based on your objectives and audience insights.\n- Integrate additional nodes for richer analysis, such as keyword extraction or design pattern detection, to tailor the output further.\n"},"typeVersion":1},{"id":"b69a6ded-7495-4021-b150-e7e668a9f86c","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-30,-320],"parameters":{"width":400,"height":580,"content":"### Setup Initial Data\n\n- Prepare your unique services and target audience profile for customization later.\n- Gather the competitor’s landing page URL you wish to analyze."},"typeVersion":1},{"id":"e9e60657-2e08-4bf9-83dd-26ba10b531a7","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[400,-320],"parameters":{"color":3,"width":540,"height":580,"content":"### Analyzed Competitor Site Layout\n\nFetches and analyzes your chosen competitor’s landing page"},"typeVersion":1},{"id":"fe3e9edd-d50a-4e81-9a28-10cefaeeff10","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[960,-320],"parameters":{"width":440,"height":580,"content":"### Create Layouts Tailored to Your Services and Audience\n\n- Generate Layouts Tailored to Your Services and Target Audience\nIdentify the key sections needed for your landing page.\n- Next, use this output as input for wireframing or your initial design process."},"typeVersion":1},{"id":"63d34012-303a-40fd-93d6-0fc76fa93196","name":"Set input data","type":"n8n-nodes-base.set","position":[0,-100],"parameters":{"options":{},"assignments":{"assignments":[{"id":"950865ac-6e4d-4f31-bf0d-dc272c2c386a","name":"my_services","type":"string","value":"We provide an all-in-one data solution for AI development. It offers a SaaS platform for data collection, creation, and annotation on a monthly subscription model."},{"id":"12f40d6b-9894-415f-b43e-face74d74f81","name":"my_target_audience ","type":"string","value":"AI developers"},{"id":"138fefb6-cbc8-492e-930e-e9e4c990867f","name":"competitor_url","type":"array","value":"[\"https://competitor1.com/\", \"https://competitor2.com/\", \"https://competitor3.com/\", \"https://competitor4.com/\"]"}]}},"typeVersion":3.4},{"id":"2334badc-bb0a-4fe5-909e-d0409c1538a7","name":"Split competitor url","type":"n8n-nodes-base.splitOut","position":[220,-100],"parameters":{"options":{},"fieldToSplitOut":"competitor_url"},"typeVersion":1},{"id":"d69d09f2-a3d0-4ca6-8ff5-e45c4f6f8841","name":"Analyze competitor","type":"@n8n/n8n-nodes-langchain.agent","position":[440,-100],"parameters":{"text":"=## Role / Persona\nYou are a web content analyst with expertise in summarizing and structuring website information for quick reference.\n\n## Context\nA user needs a concise overview of the main sections of the website {{ $json.competitor_url }}. The user wants to understand the website’s structure without visiting it directly.\n\n## Task / Instruction\nVisit the  website and identify its main sections or navigation categories. List and briefly describe each primary section, focusing on the purpose and content of each area.\n\n## Output Formatting / Style\nPresent the output as a bulleted or numbered list. Use clear headings for each section, and provide a 1–2 sentence summary for each. Keep formatting clean and easy to scan.\n\n## Additional Requirements\n- Tone: Professional, concise, and informative  \n- Length: No more than 10 sections, each with a brief description  \n- Language: English  \n- Audience: Business professionals or developers seeking an overview of website’s offerings\n","options":{},"promptType":"define"},"typeVersion":1.9},{"id":"a6ea53ae-bc16-4415-a156-e9fb64fc632a","name":"OpenAI GPT 4.1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[528,120],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1","cachedResultName":"gpt-4.1"},"options":{}},"credentials":{"openAiApi":{"id":"8cWUJS0NExv35YHi","name":"OpenAi account"}},"typeVersion":1.2},{"id":"374416f3-d8de-4d0f-b426-7fffed8b62e9","name":"Aggregate analyzed result","type":"n8n-nodes-base.aggregate","position":[816,-100],"parameters":{"options":{},"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"output"}]}},"typeVersion":1},{"id":"6e2c5334-8a12-4348-ab15-abf35b8ad564","name":"OpenAI GPT 4.","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1124,120],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1","cachedResultName":"gpt-4.1"},"options":{}},"credentials":{"openAiApi":{"id":"8cWUJS0NExv35YHi","name":"OpenAi account"}},"typeVersion":1.2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"1d45e541-b0fd-4b0d-aa33-e14af63ca480","connections":{"OpenAI GPT 4.":{"ai_languageModel":[[{"node":"GenerateLayout","type":"ai_languageModel","index":0}]]},"OpenAI GPT 4.1":{"ai_languageModel":[[{"node":"Analyze competitor","type":"ai_languageModel","index":0}]]},"Set input data":{"main":[[{"node":"Split competitor url","type":"main","index":0}]]},"Analyze competitor":{"main":[[{"node":"Aggregate analyzed result","type":"main","index":0}]]},"Split competitor url":{"main":[[{"node":"Analyze competitor","type":"main","index":0}]]},"Aggregate analyzed result":{"main":[[{"node":"GenerateLayout","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Set input data","type":"main","index":0}]]}}}


name: Deep Research - Sales Lead Magnet Agent
author_name: Max Mitcham
author_username: maxmitcham
categories: []
created_at: 2025-06-06T12:18:33.114Z
updated_at: 2025-06-06T12:18:33.114Z
url: https://n8n.io/workflows/4721
scraped_at: 2025-06-19 22:48:36
description:
  This automation flow is designed to generate comprehensive, research-backed lead magnet articles based on a user-submitted topic, conduct deep research across multiple sources, and automatically create a professional Google Doc ready for LinkedIn sharing.

  ⚙️ How It Works (Step-by-Step):

  📝 Chat Input (Entry Point)
  A user submits a topic through the chat interface:
  Topic for lead magnet content
  Target audience (automatically detected)
  Company context (when relevant)

  🔍 Query Builder Agent
  An AI agent refines the input by:
  Converting the topic into 5 targeted research queries
  Determining if topic relates to *company for specialized research
  Using structured output parsing for consistent results

  📚 Research Leader Agent
  Conducts comprehensive research that:
  Uses Perplexity API for real-time web research
  Integrates *company knowledge base when relevant
  Creates detailed table of contents with research insights
  Identifies key trends, expert opinions, and case studies

  📋 Project Planner Agent
  Structures the content by:
  Generating professional title and subtitle
  Creating 8-10 logical chapter outlines
  Developing detailed writing prompts for each section
  Ensuring step-by-step actionable guidance

  ✍️ Research Assistant Team
  Multiple AI agents write simultaneously:
  Each agent writes one chapter with proper citations
  Maintains consistent voice across all sections
  Includes real-world examples and implementation steps
  Uses both web research and *company knowledge

  📝 Editor Agent
  Professional content polishing:
  Refines tone for authenticity and engagement
  Adds image placeholders where appropriate
  Ensures proper flow between chapters
  Optimizes for LinkedIn lead magnet format

  📄 Google Docs Creation
  Automated document generation:
  Creates new Google Doc with formatted content
  Sets proper sharing permissions (public link)
  Organizes in designated company folder
  Returns shareable URL for immediate use

  🛠️ Tools Used:
  n8n: Workflow orchestration platform
  Anthropic Claude: Primary AI model for content generation
  OpenRouter: Backup AI model options
  Perplexity API: Real-time research capabilities
  *Company Knowledge Hub: Internal documentation access
  Google Docs API: Document creation and formatting
  Google Drive API: File management and sharing

  📦 Key Features:
  End-to-end automation from topic to published document
  Multi-agent approach ensures comprehensive coverage
  Real-time research with proper citations
  Company-specific knowledge integration
  Professional editing and formatting
  Automatic Google Docs creation with sharing
  Scalable content generation (3-5 minutes per article)

  🚀 Ideal Use Cases:
  B2B companies building thought leadership content
  Sales teams creating industry-specific lead magnets
  Marketing departments scaling content production
  Consultants developing expertise-demonstrating resources
  SaaS companies creating feature-focused educational content
  Startups establishing market presence without content teams
  `

nodes_used:
  ["n8n-nodes-base.googleDrive","n8n-nodes-base.googleDocs","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatAnthropic","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.toolWorkflow","@n8n/n8n-nodes-langchain.toolHttpRequest","@n8n/n8n-nodes-langchain.lmChatOpenRouter"]

workflow_json:
  {"id":"gMlV2BS7Aj3XlgCC","meta":{"instanceId":"f694ebfb8236012bcdeb0adbc4faa465b6fa315f9ad30732114d26f7419da901","templateCredsSetupCompleted":true},"name":"Lead Magnet Agent - Trigify","tags":[],"nodes":[{"id":"cfea2918-c8af-49a4-bfd0-c841a925c047","name":"Query Builder","type":"@n8n/n8n-nodes-langchain.agent","position":[2200,280],"parameters":{"text":"={{ $json.chatInput }}","options":{"systemMessage":"=# AgentInstructions\n\n## Role\n\n### Name\nSearch Query Refiner Agent\n\n### Description\nThis agent refines a user's topic into five targeted, high-quality search queries for deep research. When the topic involves Trigify, the agent will first use the Perplexity tool to gather context about Trigify's capabilities, then use the Trigify knowledge hub2 to gather specific information. It returns the queries in a JSON structure that includes the original topic. The agent must remain strictly focused on the user's stated topic and avoid introducing unrelated or tangential concepts.\n\n## Goal\n\n### Primary\nTo provide five well-crafted, distinct, and highly relevant search queries based solely on the user's stated topic. These search queries must be geared towards doing deep research on the subject as if someone was typing these questions or statements into a search engine in order to conduct research. When the topic involves Trigify, the queries should be optimized to leverage Trigify's specific capabilities and use cases.\n\n## Instructions\n\n1. **Analyze User Input**:\n   - Identify the exact concepts or keywords in the user's topic\n   - Determine if the topic mentions or relates to Trigify\n   - Do NOT introduce new or tangential themes unless explicitly included in the user's topic\n\n2. **For Trigify-Related Topics**:\n   - First call the Perplexity tool to gather general information about what Trigify does, its features, and typical use cases\n   - Then call the Trigify knowledge hub2 to gather specific information about Trigify's capabilities relevant to the user's topic\n   - Use this gathered information to craft more targeted and effective queries\n\n3. **Maintain Topic Focus**:\n   - Avoid generalizing or substituting terms that alter the user's focus\n   - If the user specifically mentions certain aspects of Trigify (e.g., \"booking meetings\"), keep that exact focus\n\n4. **Generate Queries**:\n   - Create exactly five unique search queries\n   - Each query should include:\n     - The main keywords from the user's input\n     - Minor variations or synonyms that preserve the same narrow focus\n     - For Trigify topics: specific features, methodologies, or use cases discovered from the knowledge tools\n\n5. **Output Format**:\n   - Return the final result as JSON:\n   ```json\n   {\n     \"topic\": \"USER_INPUT_TOPIC\",\n     \"searchQueries\": [\n       \"QUERY_1\",\n       \"QUERY_2\",\n       \"QUERY_3\",\n       \"QUERY_4\",\n       \"QUERY_5\"\n     ]\n   }\n   ```\n\n6. **Respect Research Scope**:\n   - Stay within the user's desired research scope\n   - For non-Trigify topics, avoid adding any reference to Trigify\n   - For Trigify topics, ensure queries are relevant to creating effective lead magnets about Trigify's capabilities\n\n## Examples\n\n### Example 1 (Trigify-related)\n\n#### UserInput\nBuild a Lead Magnet on how you can use Trigify to book 30+ meetings per week\n\n#### Agent Process\n1. Identifies this is a Trigify-related topic\n2. Calls Perplexity tool to understand Trigify's basic functionality\n3. Calls Trigify knowledge hub2 to gather specific information about meeting booking features\n4. Crafts specialized queries focused on Trigify's meeting booking capabilities\n\n#### AgentOutput\n```json\n{\n  \"topic\": \"Build a Lead Magnet on how you can use Trigify to book 30+ meetings per week\",\n  \"searchQueries\": [\n    \"Trigify outreach automation strategies for booking 30+ weekly meetings\",\n    \"Trigify sequencing templates for high-volume meeting conversion\",\n    \"Optimizing Trigify campaigns for maximum meeting bookings\",\n    \"Trigify prospect targeting techniques for sales meeting generation\",\n    \"Trigify analytics to improve meeting booking rates\"\n  ]\n}\n```\n\n### Example 2 (Non-Trigify)\n\n#### UserInput\nquantum computing hardware\n\n#### AgentOutput\n```json\n{\n  \"topic\": \"quantum computing hardware\",\n  \"searchQueries\": [\n    \"quantum computing hardware architecture\",\n    \"latest developments in quantum processors\",\n    \"superconducting qubits hardware advancements\",\n    \"ion trap quantum computing devices\",\n    \"scalability challenges quantum hardware research\"\n  ]\n}\n```\n\n### Example 3 (Trigify-related)\n\n#### UserInput\nusing Trigify for LinkedIn outreach\n\n#### Agent Process\n1. Identifies this is a Trigify-related topic\n2. Uses knowledge tools to understand Trigify's LinkedIn capabilities\n3. Crafts specialized queries focused on Trigify's LinkedIn features\n\n#### AgentOutput\n```json\n{\n  \"topic\": \"using Trigify for LinkedIn outreach\",\n  \"searchQueries\": [\n    \"Trigify LinkedIn connection request automation best practices\",\n    \"Trigify personalization techniques for LinkedIn messaging\",\n    \"Trigify campaign analytics for LinkedIn outreach optimization\",\n    \"Trigify LinkedIn profile targeting strategies\",\n    \"Comparing Trigify LinkedIn outreach performance to manual methods\"\n  ]\n}\n```"},"promptType":"define","hasOutputParser":true},"typeVersion":1.7},{"id":"3b82df55-0e26-4bf6-b366-e5525758ca86","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[2500,440],"parameters":{"jsonSchemaExample":"{\n  \"topic\": \"USER_INPUT_TOPIC\",\n  \"searchQueries\": [\n    \"QUERY_1\",\n    \"QUERY_2\",\n    \"QUERY_3\",\n    \"QUERY_4\",\n    \"QUERY_5\"\n  ]\n}"},"typeVersion":1.2},{"id":"03c1d654-5e0b-4232-9c0e-fb905494ecd7","name":"Research Leader","type":"@n8n/n8n-nodes-langchain.agent","position":[2600,280],"parameters":{"text":"=Research the following topics:\n{{ $json.output.searchQueries[0] }}\n{{ $json.output.searchQueries[1] }}\n{{ $json.output.searchQueries[2] }}\n{{ $json.output.searchQueries[3] }}\n{{ $json.output.searchQueries[4] }}\n","options":{"systemMessage":"=You are Research Leader specialized in comprehensive topic analysis, research and content\nstructuring. Your task is to create an enriched, research-backed table of contents for a given topic.\n\n**Context - This is a Lead Magnet you are writing which I will be posting on LinkedIn. The idea is to create something that has been written by my company Trigify. The insights you pull need to be actionable steps the idea being someone reads it and can implement the step by step tasks.**\n\nFollow these steps:\n1. Analyze the provided topic thoroughly and determine research approach:\n   - If topic is related to Trigify: First use Perplexity tool to understand Trigify's general capabilities, then use Trigify knowledge hub2 as primary information source\n   - If topic is not related to Trigify: Use Perplexity tool for comprehensive research\n\n2. Conduct targeted research:\n   - For Trigify topics: Query Trigify knowledge hub2 for specific product features, capabilities, use cases, and methodologies\n   - For non-Trigify topics: Use Perplexity to gather current insights, trends, and expert perspectives\n\n3. Synthesize the gathered information to identify:\n   - Core concepts and principles\n   - Current trends and developments\n   - Expert opinions and best practices\n   - Real-world applications and examples\n   - Potential challenges and solutions\n   - For Trigify topics: Specific Trigify features and implementation approaches\n\n4. Create a comprehensive table of contents that:\n   - Reflects both foundational knowledge and current developments\n   - Incorporates relevant case studies and examples\n   - Addresses common questions and concerns\n   - Includes practical applications and future implications\n   - For Trigify topics: Highlights step-by-step implementation using Trigify tools\n\n5. Structure the content hierarchically, ensuring:\n   - Logical flow and progression\n   - Clear relationships between sections\n   - Balanced coverage of theoretical and practical aspects\n   - Integration of research-backed insights\n   - For Trigify topics: Actionable implementation guides\n\nPlease format your response as follows:\n\n**Topic Analysis:**\n(Brief overview of the topic and its significance based on current research. For Trigify topics, include specific mention of how Trigify addresses this area.)\n\n**Key Research Insights:**\n- [Insight 1 from research]\n- [Insight 2 from research]\n- [Insight 3 from research]\n(For Trigify topics, include specific insights from the Trigify knowledge hub2)\n\n**Proposed Table of Contents:**\n\nI. **Introduction**\n   A. Topic Overview and Current Relevance  \n   B. Key Trends and Developments  \n   C. Why This Matters Now  \n\nII. **Background and Context**  \n   A. Historical Development  \n   B. Fundamental Concepts  \n   C. Current State of the Field  \n\nIII. **[Main Theme 1 from Research]**  \n   A. [Key Finding/Aspect]  \n   B. [Expert Perspectives]  \n   C. [Real-world Applications]  \n\nIV. **[Main Theme 2 from Research]**  \n   A. [Key Finding/Aspect]  \n   B. [Case Studies]  \n   C. [Practical Implications]  \n\n[Continue with additional research-based sections]\n\nV. **Future Perspectives**  \n   A. Emerging Trends  \n   B. Potential Developments  \n   C. Recommendations  \n\nVI. **Conclusion**  \n   A. Summary of Key Insights  \n   B. Actionable Takeaways  \n   C. Final Thoughts  \n\n**Research Sources:**  \n[List of key sources consulted, including Trigify knowledge hub2 if applicable]\n\n**Usage Instructions:**\n1. Provide a specific topic you want to analyze.\n2. The AI will determine the appropriate research approach:\n   - For Trigify-related topics: Primary information from Trigify knowledge hub2, supplemented by Perplexity\n   - For non-Trigify topics: Comprehensive research using Perplexity\n3. Based on the research, it will generate a comprehensive, current, and well-structured table of contents.\n4. Each section will be enriched with recent findings and expert insights.\n5. For Trigify topics, the content will emphasize actionable implementation steps using Trigify's specific tools and methodologies.\n6. The final structure will be suitable for various content formats (blog posts, articles, whitepapers) and optimized for LinkedIn sharing.\n\nToday's date is {{ $now }}"},"promptType":"define"},"typeVersion":1.7},{"id":"e12e7905-fe99-4b01-b364-139b77ca9a43","name":"Perplexity tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[3200,1000],"parameters":{"name":"Perplexity_tool","workflowId":{"__rl":true,"mode":"list","value":"wPA7grIPtOHm3QjU","cachedResultName":"Trigify Agents — My Sub-Workflow 2"},"description":"Call this tool to run your research.","workflowInputs":{"value":{},"schema":[],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2},{"id":"8ec3e1d0-40fd-4594-97de-def75959f693","name":"Project Planner","type":"@n8n/n8n-nodes-langchain.agent","position":[2960,280],"parameters":{"text":"=Write the title, the subtitle, the chapters details, the introduction, the conclusions.\nPlease use this set of topics to create chapters:  \n{{ $json.output }}\n\n### Research Process\n1. Analyze the provided topics thoroughly and determine research approach:\n   - If topics are related to Trigify: First use Perplexity tool to understand Trigify's general capabilities, then use Trigify knowledge hub2 as primary information source\n   - If topics are not related to Trigify: Use Perplexity tool for comprehensive research\n\n2. Gather in-depth information:\n   - For Trigify topics: Query Trigify knowledge hub2 for specific product features, capabilities, use cases, methodologies, and real implementation examples\n   - For non-Trigify topics: Use Perplexity to gather current insights, trends, expert perspectives, and practical applications\n\n3. Ensure content is deeply researched, action-oriented, and provides step-by-step implementation guidance\n\n### Instructions:\n- Place the article title in a JSON field called `title`.\n- Place the subtitle in a JSON field called `subtitle`.\n- Place the introduction in a JSON field called `introduction`.\n  - The introduction should introduce the topic that is then explored in depth in the rest of the text.\n  - The introduction should be around 100 words.\n  - For Trigify topics: Highlight Trigify's unique approach to solving the problem\n- Place the conclusions in a JSON field called `conclusions`.\n  - The conclusions should be around 100 words.\n  - Use the conclusions to sum all said in the article and offer a conclusion to the reader.\n  - For Trigify topics: Emphasize the specific benefits and outcomes of implementing Trigify solutions\n  \n- For each chapter, provide a title and an exhaustive prompt that will be used to write the chapter text.\n  - Place the chapters in an array field called `chapters`.\n  - For each chapter, provide the fields `\"title\"` and `\"prompt\"`.\n  - The chapters should follow a logical flow and not repeat the same concepts.\n  - The chapters should be one related to the other and not isolated blocks of text.\n  - The text should be fluent and follow a linear logic.\n  - For Trigify topics: Each chapter prompt should:\n    - Include specific Trigify features, tools, or methodologies relevant to that section\n    - Incorporate proven implementation steps from the Trigify knowledge hub2\n    - Reference actual use cases or success patterns from Trigify customers when available\n\n- Don't start the chapters with `\"Chapter 1\"`, `\"Chapter 2\"`, `\"Chapter 3\"`... just write the title of the chapter.\n- For the title and the chapters' titles, don't use colons `(:)`.\n- Please use this text format.\n- Please write in a style that is informative and instructional so the user can follow your advice and action what you're saying, they need step by step breakdowns on how to execute on what you're saying.\n- Go deep into the topic you treat, don't just throw some superficial info.\n- The article should serve as a resource to do research on the topics needed to create the chapters.\n- Ensure each chapter prompt guides the creation of content that contains:\n  - Clear, numbered step-by-step instructions where applicable\n  - Specific implementation details and technical guidance\n  - Common pitfalls to avoid and how to overcome them\n  - Metrics for measuring success\n  - For Trigify topics: Specific Trigify configurations, settings, or workflows\n\n**Today's date is {{ $now }}**\n**Context - This is a Lead Magnet you are writing which I will be posting on LinkedIn. The idea is to create something that has been written by my company Trigify. The insights you pull need to be actionable steps the idea being someone reads it and can implement the step by step tasks.**","options":{},"promptType":"define","hasOutputParser":true},"typeVersion":1.7},{"id":"8e8f243a-6cb8-44ca-a9ec-e20f78561d34","name":"Structured Output Parser1","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[3260,520],"parameters":{"jsonSchemaExample":"{\n  \"title\": \"Dynamic AI-Generated Content Example\",\n  \"subtitle\": \"A Flexible JSON Structure for AI Content Creation\",\n  \"introduction\": \"This JSON example demonstrates a structured yet flexible approach for AI-generated content. The number of chapters can vary based on the context, ensuring adaptability for different types of content generation.\",\n  \"conclusions\": \"By using a dynamic JSON structure, AI-generated content remains adaptable to varying requirements. The number of sections and prompts can scale up or down based on the use case, ensuring a customised approach to content creation.\",\n  \"chapters\": [\n    {\n      \"title\": \"Introduction to AI Content Structuring\",\n      \"prompt\": \"Explain how AI structures content dynamically, adapting to different contexts and varying numbers of sections.\"\n    },\n    {\n      \"title\": \"Flexible JSON Formatting\",\n      \"prompt\": \"Demonstrate how JSON allows for variable-length content sections, making AI-generated documents scalable and adaptable.\"\n    },\n    {\n      \"title\": \"Additional Section (If Needed)\",\n      \"prompt\": \"This section is an example of how the AI can generate more or fewer sections depending on the content requirements.\"\n    }\n  ]\n}"},"typeVersion":1.2},{"id":"b95713f5-dd63-458e-991e-c0fb85ed35f1","name":"Split Out","type":"n8n-nodes-base.splitOut","position":[3320,280],"parameters":{"options":{},"fieldToSplitOut":"output.chapters"},"typeVersion":1},{"id":"b75f2e21-dce5-4d04-b5c7-769cae617e47","name":"Team of Research Assistants","type":"@n8n/n8n-nodes-langchain.agent","position":[3520,280],"parameters":{"text":"=Write a chapter for this article -> {{ $('Project Planner').item.json.output.title }}\n\nwrite a chapter for -> {{ $json.title }} that {{ $json.prompt }}\n\nMake sure to use the Trigify knowledge hub.","options":{"systemMessage":"=You are a dedicated Research Assistant AI agent, working as part of a research team under the guidance of a Research Leader and Project Planner. Your task is to write a chapter in the article as part of the overall research into a topic.\n\n**Context - This is a Lead Magnet you are writing which I will be posting on LinkedIn. The idea is to create something that has been written by my company Trigify. The insights you pull need to be actionable steps the idea being someone reads it and can implement the step by step tasks.**\n\nGuidelines:\n- Just return the plain text for each chapter (no JSON structure).\n- Use the perplexity_ai_search tool to research the topic in the chapter.\n- Use html format for output\n- Don't add internal titles or headings.\n- The length of each chapter should be around 120 words\nwords long—go deep in the topic you treat, don't just throw some superficial info.\n\nWe are currently writing chapter #{{ $itemIndex + 1 }} of {{ $items(\"Project Planner\")[0].json.output.chapters.length }}.\n\nPrevious chapter:\n{{ $itemIndex > 0 ? $items(\"Project Planner\")[0].json.output.chapters[$itemIndex - 1].title : \"None\" }}\n\nNext chapter:\n{{ $itemIndex < $items(\"Project Planner\")[0].json.output.chapters.length - 1 ? $items(\"Project Planner\")[0].json.output.chapters[$itemIndex + 1].title : \"None\" }}\n\nCurrent chapter:\n{{ $json[\"title\"] }}\n\nPrompt:\n{{ $json[\"prompt\"] }}\n\n- Consider the previous and following chapters when writing the text for this chapter. The text must be coherent with the previous and following chapters.\n- This chapter should not repeat the concepts already exposed in the previous chapter.\n- This chapter is part of a larger article so don't include an introduction or conclusions. This chapter should merge seamlessly with the rest of the article.\n- Please write in a style that is educational for the user so they can follow your advice step by step and action your research.\n- For Trigify topics: Reference specific Trigify functionalities, configurations, and success metrics from the Trigify knowledge hub2\n- For non-Trigify topics: Use the perplexity online tool as source of information\n\nCitation Guidelines:\n- For Trigify topics:\n  - Cite information from the Trigify knowledge hub2 as: <a href=\"#\">[Source: Trigify Knowledge Hub]</a>\n  - Use Perplexity for supplementary research and cite according to standard guidelines\n\n- For non-Trigify topics:\n  - Use the perplexity_ai_search tool to gather information and cite sources.\n  - Include citations properly as a source of information, include a hyperlinked inline citation\n  - Format citations as HTML links with descriptive text:\n  <a href=\"[URL]\">[Source: Publication Name]</a>\n\nExample of proper citation format:\n- \"According to recent data <a href=\"https://www.mckinsey.com/article-url\">[Source: McKinsey & Company]</a>...\"\n- When directly quoting from a source, use quotation marks and include the citation\n\nFor Trigify topics, ensure the chapter includes:\n- Specific Trigify features or tools relevant to the topic\n- Step-by-step implementation guidance using Trigify\n- Real-world applications or success metrics from Trigify users\n- Technical details on configuration or setup where applicable"},"promptType":"define"},"typeVersion":1.7},{"id":"808845ba-f350-41c9-add3-4ee6412327db","name":"Merge","type":"n8n-nodes-base.merge","position":[3900,280],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"8882948d-a1d5-40a4-947d-ca219a41b540","name":"Code","type":"n8n-nodes-base.code","position":[4060,280],"parameters":{"jsCode":"const mergeData = $input.all().map((item) => item.json);\nconst combinedData = [];\n\nmergeData.forEach((item) => {\n  combinedData.push(item.title, item.output);\n});\n\nreturn { combinedData };\n"},"typeVersion":2},{"id":"a450f61c-2ff7-4ca5-8bb1-01b684d5eecb","name":"Editor","type":"@n8n/n8n-nodes-langchain.agent","position":[4240,280],"parameters":{"text":"=Edit this text into a nice article: {{ $json.combinedData }}\n\n**Context - This is a Lead Magnet you are writing which I will be posting on LinkedIn. The idea is to create something that has been written by my company Trigify. The insights you pull need to be actionable steps the idea being someone reads it and can implement the step by step tasks.**\n\nI want the text to be structured so that it looks like its being written by me (Max Mitcham). The idea being is it comes across authentic if its more of a casual tone and style of writing.","options":{"systemMessage":"=# Expert Editing Guidelines\n\nYou are an expert Editor specializing in refining and polishing content to ensure it meets the highest quality standards. Your role is to review and improve the written material produced by multiple writers while maintaining academic integrity and proper source attribution. Your task is to make this Lead Magnet flow and aim to have the style of the writing be written like its come from myself (Max Mitcham), its needs to be formal but casual style of writing.\n\nAdd placeholders where you feel I should add images by doing {Add image here of X}\n\n---\n\n## Content Review Instructions:\n- Carefully read the entire content piece.\n- Check for grammar, spelling, and punctuation errors.\n- Ensure consistency in tone, style, and voice throughout the piece.\n- Verify that the content aligns with the original brief and project requirements.\n- Improve sentence structure and flow for better readability.\n- Optimize headlines, subheadings, and formatting for better engagement, especially for SEO.\n- Suggest improvements or additions to enhance the overall quality of the content.\n\n---\n"},"promptType":"define","hasOutputParser":true},"typeVersion":1.7},{"id":"9bb23d1e-d081-4f5d-afbd-d8e508edc529","name":"Google Docs","type":"n8n-nodes-base.googleDocs","position":[4560,280],"parameters":{"title":"={{ $node[\"Project Planner\"].json[\"output\"][\"title\"] }}","folderId":"1SDD_kM84i4O_Un6zTophBbi3VOfy_W3M"},"credentials":{"googleDocsOAuth2Api":{"id":"R99FjlxwNI3U5tza","name":"Google Docs account"}},"typeVersion":2},{"id":"cad19eda-3b87-492b-bac8-aebdc3eed6da","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[2000,340],"webhookId":"3afec7f2-bb56-421b-973d-a2689499a5bf","parameters":{"options":{}},"typeVersion":1.1},{"id":"f511b20b-3d6d-4e9a-87af-31e818ca1c66","name":"Trigify knowledge hub","type":"@n8n/n8n-nodes-langchain.toolHttpRequest","position":[3760,520],"parameters":{"url":"https://www.chatbase.co/api/v1/chat","method":"POST","jsonBody":"{\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"{placeholder}\"\n    }\n  ],\n  \"chatbotId\": \"7O4vrJJxubIpMxQibIU0P\",\n  \"stream\": false,\n  \"temperature\": 0,\n  \"model\": \"claude-3-5-sonnet\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","toolDescription":"Trigify knowledge hub.","parametersHeaders":{"values":[{"name":"Authorization","value":"Bearer 8c229777-32aa-40c2-9a95-40b82607d1cb","valueProvider":"fieldValue"},{"name":"Content-Type","value":"application/json","valueProvider":"fieldValue"}]}},"typeVersion":1.1},{"id":"f147b256-b05e-4cbc-ba6a-aa95e6f35df8","name":"Anthropic Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[2860,960],"parameters":{"model":"=claude-3-7-sonnet-20250219","options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.2},{"id":"376247a1-3cea-45a8-b7d2-8589ca85e710","name":"Share URL","type":"n8n-nodes-base.set","position":[5040,280],"parameters":{"options":{},"assignments":{"assignments":[{"id":"ff1378ca-ad8a-4656-a82b-2c85ccfdef35","name":"field","type":"string","value":"=https://docs.google.com/document/d/{{ $('Google Docs1').item.json.documentId }}"},{"id":"11b66d56-cc3b-48ec-bee4-58f44340258d","name":"body['First Name']","type":"string","value":"={{ $node[\"Webhook\"].json[\"body\"][\"First Name\"] }}"},{"id":"03a9b312-31cb-4ec6-85a6-e75470e3392a","name":"body['Last Name']","type":"string","value":"={{ $node[\"Webhook\"].json[\"body\"][\"Last Name\"] }}"},{"id":"81f75a32-494c-4b4c-90b5-bbb0a903ae45","name":"body.Domain","type":"string","value":"={{ $node[\"Webhook\"].json[\"body\"][\"Domain\"] }}"},{"id":"c3bd15a0-d0f2-4ea6-bce4-cda3448fc112","name":"body['Full Name']","type":"string","value":"={{ $node[\"Webhook\"].json[\"body\"][\"Full Name\"] }}"},{"id":"5677ab97-6d17-4911-bebf-6582ddee31e7","name":"body['LinkedIn Url']","type":"string","value":"={{ $node[\"Webhook\"].json[\"body\"][\"LinkedIn Url\"] }}"}]}},"typeVersion":3.4},{"id":"f704a1c4-04ed-40cf-a9d2-49f60c2fa249","name":"Google Drive","type":"n8n-nodes-base.googleDrive","position":[4880,280],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.documentId }}"},"options":{},"operation":"share","permissionsUi":{"permissionsValues":{"role":"reader","type":"anyone"}}},"credentials":{"googleDriveOAuth2Api":{"id":"ZJFp1qPZlykTJQ35","name":"Google Drive account 2"}},"typeVersion":3},{"id":"78e3fb39-f170-4c71-8e69-4661625306a0","name":"Google Docs1","type":"n8n-nodes-base.googleDocs","position":[4720,280],"parameters":{"actionsUi":{"actionFields":[{"text":"={{ $('Editor').item.json.output }}","action":"insert"}]},"operation":"update","documentURL":"={{ $json.id }}"},"credentials":{"googleDocsOAuth2Api":{"id":"R99FjlxwNI3U5tza","name":"Google Docs account"}},"typeVersion":2},{"id":"65fd6aac-d362-47bc-b587-a0cd2879127e","name":"Trigify knowledge hub2","type":"@n8n/n8n-nodes-langchain.toolHttpRequest","position":[3340,960],"parameters":{"url":"https://www.chatbase.co/api/v1/chat","method":"POST","jsonBody":"{\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"{placeholder}\"\n    }\n  ],\n  \"chatbotId\": \"7O4vrJJxubIpMxQibIU0P\",\n  \"stream\": false,\n  \"temperature\": 0,\n  \"model\": \"claude-3-5-sonnet\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","toolDescription":"Trigify knowledge hub.","parametersHeaders":{"values":[{"name":"Authorization","value":"Bearer 8c229777-32aa-40c2-9a95-40b82607d1cb","valueProvider":"fieldValue"},{"name":"Content-Type","value":"application/json","valueProvider":"fieldValue"}]}},"typeVersion":1.1},{"id":"9f0f2812-6d07-4dc6-a3aa-51bae2eaa4d8","name":"OpenRouter Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[3560,940],"parameters":{"model":"anthropic/claude-3.7-sonnet:thinking","options":{}},"credentials":{"openRouterApi":{"id":"1EI7HNCADxTDERqC","name":"OpenRouter account"}},"typeVersion":1},{"id":"a6767ecb-c27c-4dc7-8fef-349f89f38bec","name":"Anthropic Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[4180,520],"parameters":{"model":"=claude-3-7-sonnet-20250219","options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.2}],"active":false,"pinData":{"Project Planner":[{"json":{"output":{"title":"The Trigify Advantage: How to Book 30+ Sales Meetings Weekly Using AI-Powered Intent Signals","chapters":[{"title":"The Shift to Signal-Based Prospecting","prompt":"In this chapter, explain the fundamental shift from traditional prospecting methods to signal-based prospecting. Start by highlighting the limitations of conventional approaches: low conversion rates (under 5%), wasted resources on uninterested prospects, and lack of timing precision. Then detail the Trigify approach to signal-based prospecting that focuses on real-time intent data. Include specific statistics on how engagement-based targeting yields 5x higher reply rates compared to traditional methods. Provide step-by-step guidance on how to:  \n\n1. Identify the key signals that indicate buying intent (including content engagement, competitor research, and professional transitions) \n2. Establish a signal prioritization framework based on Trigify's data on which combinations of signals correlate most strongly with buying readiness \n3. Develop a baseline measurement system to compare traditional vs. signal-based prospecting results \n4. Implement a gradual transition plan from static to dynamic prospecting \n\nExplain how Trigify's real-time monitoring capabilities enable sales teams to detect these signals as they happen, creating perfect timing for outreach. Include a case example of how a B2B company increased meeting bookings by 300% after switching to signal-based prospecting with Trigify. Conclude with practical guidance on setting realistic expectations for implementation timeframes and initial results."},{"title":"Building Your Foundation in Trigify","prompt":"In this chapter, provide a comprehensive guide to setting up Trigify for maximum impact. Begin with a detailed walkthrough of the initial configuration process:  \n\n1. Account setup and user permissions (with screenshots of the main dashboard) \n2. Defining your Ideal Customer Profile (ICP) parameters within the Trigify system \n3. Setting up topic monitoring for your specific industry and solution areas \n4. Configuring competitor tracking to monitor engagement with rival solutions \n\nThen detail the process for integrating Trigify with existing tech stack components:  \n\n1. CRM integration steps (specific instructions for Salesforce, HubSpot, and other major CRMs) \n2. Email integration for automated outreach \n3. Calendar integration for streamlined meeting booking \n4. Data enrichment tool connections (Clay, ZoomInfo, etc.) \n5. Setting up webhook connections for automated workflows \n\nProvide step-by-step instructions for establishing baseline metrics for performance tracking:  \n\n1. How to document current outreach-to-meeting conversion rates \n2. Setting up A/B testing frameworks to compare traditional vs. Trigify-powered outreach \n3. Creating tracking parameters in your CRM for attribution \n4. Implementing weekly reporting cadences to measure improvement \n\nInclude troubleshooting guidance for common setup challenges and tips for optimizing each integration. Conclude with a readiness checklist to ensure all components are properly configured before moving to implementation of specific strategies."},{"title":"Sales Trigger Automation","prompt":"This chapter should provide detailed, actionable guidance on setting up Trigify's sales trigger automation system to capture high-intent opportunities. Begin by explaining how to configure competitor engagement monitoring:  \n\n1. How to identify and add your top 5-10 competitors to the monitoring system \n2. Setting up custom tags to categorize different types of competitor engagement \n3. Creating alert thresholds based on engagement intensity and frequency \n4. Developing response templates for different competitor engagement scenarios \n\nThen detail the process for configuring role change and company transition alerts:  \n\n1. Step-by-step instructions for setting up job change notifications \n2. How to filter for specific seniority levels and departments \n3. Creating custom alert rules for company growth, funding announcements, and other transition signals \n4. Developing tailored outreach sequences for each transition type \n\nProvide clear instructions for creating webhook connections for automated lead routing:  \n\n1. Technical setup instructions for different webhook types \n2. Sample automation recipes for major platforms (Zapier, Make, n8n) \n3. Routing logic recommendations based on signal type and intensity \n4. QA testing procedures to ensure proper data flow \n\nExplain how to implement multi-signal tracking for comprehensive intent identification:  \n\n1. Setting up point-based scoring systems for different signal combinations \n2. Creating multi-condition triggers for more precise targeting \n3. Implementing progressive engagement strategies based on signal accumulation \n4. Measuring and optimizing signal correlation with conversion rates \n\nConclude with troubleshooting tips for common automation challenges and a case study of how a B2B SaaS company achieved 28% reply rates through Trigify's competitor monitoring automation."},{"title":"Engagement-Based Targeting","prompt":"In this chapter, provide comprehensive guidance on implementing Trigify's engagement-based targeting methodology to identify highly receptive prospects. Start by explaining the 3×30 Rule in detail:  \n\n1. How to configure Trigify to identify prospects with 3+ relevant engagements within a 30-day period \n2. Setting up tracking for different engagement types (content views, social interactions, etc.) \n3. Creating weighted scoring based on engagement depth and relevance \n4. Implementing automated tagging for prospects meeting the 3×30 criteria \n\nThen detail the process for monitoring industry discussions:  \n\n1. How to identify and track key industry topics and hashtags \n2. Setting up real-time alerts for relevant conversations \n3. Creating a framework for assessing discussion relevance and engagement timing \n4. Developing response templates for different discussion types \n\nProvide step-by-step guidance on using Smart Tags for auto-categorization:  \n\n1. Configuring Smart Tag rules within Trigify \n2. Creating custom tag hierarchies for your specific sales process \n3. Setting up automation based on tag application \n4. Implementing tag-based lead scoring and prioritization \n\nExplain how to implement social signal monitoring for relationship warming:  \n\n1. Setting up multi-platform social monitoring \n2. Creating engagement sequences that start with light interactions \n3. Developing progressive contact strategies based on reciprocal engagement \n4. Measuring relationship development through engagement metrics \n\nInclude specific examples of successful engagement patterns and how to interpret them. Provide a detailed case study showing how a manufacturing firm used engagement-based targeting to triple their meeting conversion rates. Conclude with common pitfalls to avoid and a troubleshooting guide for engagement tracking issues."},{"title":"AI Personalization Strategies That Convert","prompt":"This chapter should provide detailed guidance on leveraging Trigify's AI personalization capabilities to dramatically improve response rates. Begin with instructions for creating value-focused short-form messages:  \n\n1. Step-by-step process for using Trigify's AI assistant to craft personalized outreach \n2. Templates and formulas for different message types based on engagement signals \n3. Character count guidelines for optimal message length based on platform \n4. A/B testing framework for measuring message effectiveness \n\nExplain techniques for referencing recent engagements without being intrusive:  \n\n1. Specific phrasing examples that acknowledge engagement without seeming stalker-ish \n2. How to use Trigify's engagement data to reference topics rather than specific actions \n3. Timing recommendations for optimal engagement follow-up \n4. Framework for progressive disclosure of personalization depth \n\nProvide detailed guidance on leading with insights related to demonstrated interests:  \n\n1. How to use Trigify's topic tracking to identify prospect interests \n2. Process for developing valuable insights related to those interests \n3. Templates for insight-led messages that drive response \n4. Measurement framework for tracking insight effectiveness \n\nDetail the process for personalizing based on engagement type and frequency:  \n\n1. Creating engagement type-specific message templates \n2. Developing escalation frameworks based on engagement frequency \n3. Using Trigify's AI to generate custom variables for each prospect \n4. Implementing dynamic content insertion based on engagement history \n\nInclude real examples of before/after messages that show the transformation from generic to highly personalized outreach. Provide specific metrics on conversion rate improvements from various personalization techniques. Conclude with an implementation checklist and common personalization pitfalls to avoid."},{"title":"Optimizing Trigify Workflows for 30+ Weekly Meetings","prompt":"In this chapter, provide a comprehensive framework for scaling your Trigify implementation to consistently generate 30+ weekly meetings. Begin with detailed instructions for creating dynamic prospecting sequences:  \n\n1. Step-by-step process for building multi-touch sequences in Trigify \n2. Setting up conditional logic based on prospect engagement \n3. Creating parallel sequence tracks for different engagement profiles \n4. Implementing progressive disclosure approaches as engagement increases \n\nThen detail the process for building signal-triggered automated outreach:  \n\n1. Setting up trigger rules for different signal combinations \n2. Creating timing parameters for optimal response windows \n3. Developing template libraries for each trigger type \n4. Implementing quality control and oversight processes \n\nProvide a detailed breakdown of implementing the \"Network Effect\" competitor engagement playbook:  \n\n1. Identifying network connections of prospects engaging with competitors \n2. Creating targeting parameters for second-degree connections \n3. Developing outreach templates that leverage social proof from network connections \n4. Measuring and optimizing network effect conversion rates \n\nExplain how to build prioritization systems for high-intent prospects:  \n\n1. Creating scoring models based on signal combinations \n2. Setting up tiered response protocols based on intent levels \n3. Implementing capacity management systems to maintain quality \n4. Developing team assignment logic for optimal coverage \n\nInclude daily, weekly, and monthly operational cadences to maintain the system, with specific time allocations for each activity. Provide troubleshooting guidance for common scaling challenges. Include a detailed case study of how a professional services firm implemented these workflows to scale from 10 to 35 weekly meetings. Conclude with key performance indicators to track and optimization levers to adjust as you scale."},{"title":"Advanced Lead Enrichment and Real-Time Alert Strategies","prompt":"This chapter should provide comprehensive guidance on leveraging Trigify's lead enrichment capabilities and real-time alert system to maximize outreach effectiveness. Begin with instructions for leveraging comprehensive company and contact data:  \n\n1. Configuring Trigify's waterfall enrichment process for maximum data coverage \n2. Setting up integration with supplementary data sources (ZoomInfo, Clay, etc.) \n3. Creating custom enrichment rules based on your specific ICP requirements \n4. Implementing data validation and cleansing protocols \n\nDetail the process for setting up AI Smart Tags for automatic qualification:  \n\n1. Step-by-step configuration of Smart Tag rules in Trigify \n2. Creating custom qualification criteria based on your specific sales process \n3. Setting up automated workflows triggered by tag application \n4. Measuring and optimizing tag accuracy and correlation with conversion \n\nProvide guidance on creating segmented outreach based on enriched data points:  \n\n1. Developing industry-specific messaging templates \n2. Creating role-based personalization frameworks \n3. Implementing company size and maturity-specific approaches \n4. Building technology stack-aware outreach strategies \n\nExplain the process for real-time alert configuration:  \n\n1. Setting up priority levels for different alert types \n2. Creating team notification protocols for high-priority alerts \n3. Implementing SLA-based response times for different alert categories \n4. Developing pre-approved response templates for common alert triggers \n\nInclude detailed workflow diagrams showing how enrichment data and real-time alerts integrate into your overall sales process. Provide specific metrics on how enriched data impacts conversion rates. Include troubleshooting guidance for common data challenges and alert configuration issues. Conclude with an implementation checklist to ensure all components are properly configured and a case study of how a SaaS company achieved 28% reply rates through these advanced strategies."},{"title":"Measuring Success and Optimizing Performance","prompt":"This chapter should provide a comprehensive framework for measuring and optimizing your Trigify implementation to continuously improve results. Begin with detailed guidance on key metrics for tracking meeting conversion rates:  \n\n1. Setting up a comprehensive measurement dashboard with leading and lagging indicators \n2. Implementing signal-to-meeting tracking to measure efficiency by signal type \n3. Creating conversion funnels for different outreach sequences \n4. Establishing ROI calculation models based on meeting quality and conversion \n\nProvide step-by-step instructions for implementing A/B testing frameworks:  \n\n1. Setting up controlled experiments for message optimization \n2. Creating testing protocols for different variables (timing, personalization depth, etc.) \n3. Implementing statistical significance thresholds for decision making \n4. Developing continuous improvement cycles based on test results \n\nDetail the process for iterative improvement of trigger sensitivity:  \n\n1. Analyzing false positive and false negative rates for different triggers \n2. Implementing progressive refinement of trigger conditions \n3. Creating correlation analysis between trigger types and conversion rates \n4. Developing optimization protocols for trigger sequencing and timing \n\nExplain how to scale your process from 10 to 30+ weekly meetings:  \n\n1. Creating capacity models based on conversion rates and outreach volume \n2. Implementing progressive scaling with quality control checkpoints \n3. Developing team expansion and training protocols \n4. Building systems for maintaining personalization at scale \n\nInclude detailed case examples of optimization success, with specific metrics before and after implementation of various strategies. Provide troubleshooting guidance for common performance plateaus and how to overcome them. Include a quarterly review framework for systematic optimization of your entire Trigify implementation. Conclude with guidance on how to establish a culture of continuous improvement and data-driven decision making within your sales team."},{"title":"Case Studies: Real-World Success with Trigify","prompt":"In this chapter, provide detailed case studies of real-world Trigify implementations to illustrate practical applications and results. For each case study, include:  \n\n1. Company background and initial challenges \n2. Specific Trigify features implemented \n3. Implementation timeline and process \n4. Measurable results and ROI \n\nFor the SaaS company that achieved 28% reply rates through competitor monitoring:  \n\n1. Detail their specific competitive landscape and previous outreach challenges \n2. Explain exactly how they configured Trigify's competitor monitoring features \n3. Provide the specific outreach templates and sequences they used \n4. Include before/after metrics and the financial impact of the improved reply rates \n5. Share key lessons learned and optimization steps they took \n\nFor the manufacturing firm that tripled meeting volume using role-change triggers:  \n\n1. Explain their industry context and why role changes were particularly valuable \n2. Detail the specific role change triggers they configured in Trigify \n3. Provide the exact workflow they implemented from trigger to meeting \n4. Include the team structure and assignment protocols they used \n5. Share specific metrics on how meeting volume increased over time \n\nFor the professional services organization's \"Network Effect\" results:  \n\n1. Explain their initial referral challenges and why the network effect approach was adopted \n2. Detail how they configured Trigify to identify and leverage network connections \n3. Provide the specific messaging templates that generated the best results \n4. Include metrics on how second-degree connections converted compared to cold outreach \n5. Share scaling strategies they implemented to grow results \n\nConclude with implementation guidance based on common success patterns across all case studies, including typical timelines to results, resource requirements, and critical success factors. Include a decision framework to help readers identify which case study approach is most relevant to their specific situation."},{"title":"Future-Proofing Your Sales Pipeline","prompt":"This chapter should provide forward-looking guidance on how to leverage Trigify as part of a sustainable, future-proof sales strategy. Begin by exploring emerging trends in intent-based selling:  \n\n1. The shift toward privacy-conscious signal monitoring \n2. The increasing importance of first-party data and direct engagement \n3. The evolution of AI capabilities for predictive intent modeling \n4. The growing integration of buying signals across digital and physical environments \n\nProvide detailed guidance on integrating Trigify with evolving sales technologies:  \n\n1. Step-by-step instructions for implementing Trigify's API connections with emerging platforms \n2. Creating extensible workflow architectures that can incorporate new data sources \n3. Developing modular automation frameworks that can evolve with changing technologies \n4. Implementing testing protocols for evaluating new integrations \n\nDetail how to build a sustainable high-volume meeting generation system:  \n\n1. Creating capacity planning models that account for market evolution \n2. Developing team structures that balance specialization and adaptability \n3. Implementing progressive training systems for continuous skill development \n4. Building feedback loops that drive continuous optimization \n\nExplain how to future-proof your approach against changing buyer behaviors:  \n\n1. Monitoring and adapting to engagement pattern shifts \n2. Developing multi-channel coordination strategies \n3. Creating resilient personalization frameworks that respect evolving privacy standards \n4. Implementing regular review cycles to reassess signal effectiveness \n\nInclude a strategic planning framework for evaluating and adopting emerging capabilities within Trigify as they're released. Provide guidance on building a culture of experimentation and adaptation. Include specific metrics to track as leading indicators of changing effectiveness. Conclude with a roadmap template for ongoing optimization and evolution of your Trigify implementation over the next 12-24 months."}],"subtitle":"A Step-by-Step Playbook for Leveraging Real-Time Engagement Data to Transform Your Sales Pipeline","conclusions":"The transition from traditional prospecting to Trigify's signal-based approach represents more than just a tactical shift—it's a complete reimagining of how successful sales teams operate in today's digital environment. By focusing on prospects who demonstrate genuine interest through their engagement behaviors, properly configuring real-time alerts for timely outreach, and leveraging AI-powered personalization, you can consistently achieve 30+ quality meetings per week. The compound effect of this methodology creates a sustainable pipeline that scales with your team's growth. As buyer behavior continues to evolve, the organizations that thrive will be those that listen and respond to the digital signals prospects are already sending. Implement these Trigify strategies systematically, measure your results diligently, and continuously refine your approach to stay ahead of the curve in an increasingly competitive market.","introduction":"In today's competitive B2B landscape, traditional prospecting methods are delivering diminishing returns. Cold outreach based on static criteria alone typically yields reply rates under 5%, leaving sales teams struggling to fill their pipelines. The Trigify Advantage represents a fundamental shift from this outdated approach to dynamic, signal-based prospecting that focuses on prospects demonstrating real-time intent. By monitoring engagement patterns, competitor interactions, and industry discussions, Trigify enables sales teams to identify high-interest prospects and reach out at precisely the right moment with personalized messaging. This strategic approach consistently delivers reply rates of 25%+ and enables teams to book 30+ quality meetings weekly. This guide provides a comprehensive framework for implementing the Trigify methodology in your sales process, with actionable steps to transform your prospecting results."}}}],"Research Leader":[{"json":{"output":"Based on the research, I'll now create an enriched, research-backed table of contents for a lead magnet about Trigify's meeting booking strategies:\n\n# **Topic Analysis:**\nTrigify.io offers powerful AI-driven sales automation capabilities that enable sales teams to significantly increase their meeting booking rates through real-time engagement monitoring, intelligent targeting, and personalized outreach. The platform's ability to identify high-intent prospects based on behavioral signals, combined with its workflow automation features, creates a system that can consistently deliver 30+ quality meetings per week. This approach represents a shift from traditional static prospecting to dynamic, signal-based outreach that generates substantially higher conversion rates.\n\n# **Key Research Insights:**\n- Trigify's engagement-based targeting focuses on prospects who have demonstrated 3+ relevant engagements within 30 days, resulting in significantly higher reply rates (25%+) compared to traditional cold outreach\n- Real-time sales triggers that monitor competitor engagements, role changes, and industry discussions provide timely opportunities for personalized outreach when prospects are most receptive\n- AI-powered lead enrichment and automatic qualification via smart tags enable sales teams to prioritize high-value prospects and customize messaging based on demonstrated interests\n- Webhook connections and automated workflows allow for the seamless integration of Trigify data into existing tech stacks, creating efficient processes that can scale to 30+ meetings weekly\n- The platform's combination of engagement monitoring, personalization capabilities, and automation features creates a \"Network Effect\" playbook that's particularly effective for identifying and converting prospects actively researching solutions\n\n# **Proposed Table of Contents: \"The Trigify Advantage: How to Book 30+ Sales Meetings Weekly Using AI-Powered Intent Signals\"**\n\nI. **Introduction: The Shift to Signal-Based Prospecting**\n   A. The Limitations of Traditional Prospecting Methods  \n   B. Why Real-Time Intent Matters in Today's B2B Environment  \n   C. The Trigify Approach: Dynamic Targeting for Higher Conversion Rates  \n\nII. **Building Your Foundation: Setting Up Trigify for Maximum Impact**  \n   A. Configuring Your Monitoring Parameters  \n   B. Integrating with Your Existing Tech Stack  \n   C. Establishing Baseline Metrics for Performance Tracking  \n\nIII. **Sales Trigger Automation: Capturing High-Intent Opportunities**  \n   A. Setting Up Competitor Engagement Monitoring  \n   B. Configuring Role Change and Company Transition Alerts  \n   C. Creating Webhook Connections for Automated Lead Routing  \n   D. Implementing Multi-Signal Tracking for Intent Identification  \n\nIV. **Engagement-Based Targeting: Finding Your Most Receptive Prospects**  \n   A. The 3×30 Rule: Prioritizing Multiple Engagements  \n   B. Monitoring Industry Discussions for Timely Outreach  \n   C. Using Smart Tags to Auto-Categorize Based on Engagement Levels  \n   D. Social Signal Monitoring for Relationship Warming  \n\nV. **AI Personalization Strategies That Convert**  \n   A. Creating Value-Focused Short-Form Messages  \n   B. Referencing Recent Engagements Without Being Intrusive  \n   C. Leading with Insights Related to Demonstrated Interests  \n   D. Personalizing Based on Engagement Type and Frequency  \n\nVI. **Optimizing Trigify Workflows for 30+ Weekly Meetings**  \n   A. Creating Dynamic Prospecting Sequences  \n   B. Building Signal-Triggered Automated Outreach  \n   C. Implementing the \"Network Effect\" Competitor Engagement Playbook  \n   D. Prioritization Systems for High-Intent Prospects  \n\nVII. **Advanced Lead Enrichment and Real-Time Alert Strategies**  \n   A. Leveraging Comprehensive Company and Contact Data  \n   B. Setting Up AI Smart Tags for Automatic Qualification  \n   C. Creating Segmented Outreach Based on Enriched Data Points  \n   D. Real-Time Alert Configuration for Immediate Response  \n\nVIII. **Measuring Success and Optimizing Performance**  \n   A. Key Metrics for Tracking Meeting Conversion Rates  \n   B. A/B Testing Frameworks for Message Optimization  \n   C. Iterative Improvement of Trigger Sensitivity and Response Time  \n   D. Scaling Your Process from 10 to 30+ Weekly Meetings  \n\nIX. **Case Studies: Real-World Success with Trigify**  \n   A. SaaS Company Achieves 28% Reply Rate Through Competitor Monitoring  \n   B. Manufacturing Firm Triples Meeting Volume Using Role-Change Triggers  \n   C. Professional Services Organization's \"Network Effect\" Results  \n\nX. **Future-Proofing Your Sales Pipeline**  \n   A. Emerging Trends in Intent-Based Selling  \n   B. Integrating Trigify with Evolving Sales Technologies  \n   C. Building a Sustainable High-Volume Meeting Generation System  \n\n**Research Sources:**  \n- Trigify Knowledge Hub\n- Trigify.io Blog\n- AnyBiz.io Trigify AI Reviews and Features\n- FiveTaco Products: Trigify.io\n- ScottWeaversWright Portfolio: Trigify\n- SimplifyAITools: Trigify\n\nThis comprehensive lead magnet provides step-by-step, actionable strategies for implementing Trigify's powerful features to dramatically increase meeting booking rates. Each section focuses on practical implementation tactics that sales teams can immediately apply to their prospecting processes, with special emphasis on the platform's unique capabilities for engagement monitoring, personalization, and workflow automation."}}],"Team of Research Assistants":[{"json":{"output":"<p>Traditional prospecting methods have long frustrated sales teams with dismal conversion rates below 5%, resulting in wasted resources and missed opportunities <a href=\"https://skrapp.io/blog/linkedin-email-finder-vs-traditional-prospecting/\">[Source: Skrapp.io]</a>. The fundamental problem? A lack of timing precision and relevance. Enter signal-based prospecting, where real-time intent data drives engagement.</p>\n\n<p>Trigify's approach has revolutionized this landscape by focusing on actual prospect behaviors rather than static data points <a href=\"#\">[Source: Trigify Knowledge Hub]</a>. Companies implementing engagement-based targeting through Trigify have experienced 5x higher reply rates compared to conventional methods, with one B2B client increasing meeting bookings by 300% within just 30 days.</p>\n\n<p>To implement signal-based prospecting effectively:</p>\n\n<ol>\n<li><strong>Identify key buying intent signals</strong> by monitoring:\n  <ul>\n    <li>Content engagement with industry thought leaders</li>\n    <li>Competitor research activities</li>\n    <li>Professional transitions (promotions, new roles)</li>\n    <li>Multiple interactions with relevant topics (3+ in 30 days indicates high intent)</li>\n  </ul>\n</li>\n\n<li><strong>Establish a signal prioritization framework</strong> by:\n  <ul>\n    <li>Configuring engagement filters in Trigify</li>\n    <li>Focusing on prospects demonstrating multiple signals simultaneously</li>\n    <li>Weighting recent activities higher than historical ones</li>\n  </ul>\n</li>\n\n<li><strong>Develop a baseline measurement system</strong> by:\n  <ul>\n    <li>Tracking current conversion rates before implementation</li>\n    <li>Setting up A/B testing between traditional and signal-based approaches</li>\n    <li>Monitoring response rates, meeting bookings, and conversion metrics</li>\n  </ul>\n</li>\n\n<li><strong>Implement a gradual transition plan</strong>:\n  <ul>\n    <li>Week 1: Set up your Trigify account and import your prospect list</li>\n    <li>Week 2: Configure signal tracking and engagement filters</li>\n    <li>Week 3: Begin targeted outreach to engaged prospects</li>\n  </ul>\n</li>\n</ol>\n\n<p>Trigify's real-time monitoring capabilities detect signals as they happen, creating the perfect timing for outreach. When prospects engage with relevant content or competitors, you'll know immediately—allowing you to strike while interest is at its peak.</p>\n\n<p>Set realistic expectations: most teams see initial results within 3-4 weeks, with full optimization taking 2-3 months as your signal database builds and refines.</p>"}},{"json":{"output":"<p>After recognizing the transformative potential of signal-based prospecting, your next step is establishing a solid foundation within Trigify's platform. Begin by setting up your account at app.trigify.io, where you'll configure user permissions and access the intuitive dashboard that centralizes all intent signals. <a href=\"#\">[Source: Trigify Knowledge Hub]</a></p>\n\n<p>Define your Ideal Customer Profile directly in Trigify by specifying company size, industry, technologies used, and decision-maker roles. Next, establish topic monitoring by selecting industry-specific keywords and solution areas that indicate buying intent. Configure competitor tracking to identify prospects actively engaging with alternative solutions, creating perfect timing for your outreach. <a href=\"https://www.cognism.com/what-is-sales-intelligence\">[Source: Cognism]</a></p>\n\n<p>Integration is streamlined through Trigify's native connectors. Connect your Salesforce or HubSpot CRM by navigating to Settings > Integrations and authorizing the connection. Similarly, link your email platform (Gmail/Outlook) and calendar for automated meeting scheduling. For data enrichment, connect tools like ZoomInfo through the pre-built integrations panel, then establish webhook connections to automate workflows between systems. <a href=\"https://crm-masters.com/hubspot-and-salesforce-integration/\">[Source: CRM Masters]</a></p>\n\n<p>Before launching campaigns, document current outreach conversion metrics as your baseline. Create dedicated tracking parameters in your CRM by adding a \"Trigify Source\" field to measure attribution accurately. Implement an A/B testing framework comparing traditional outreach versus Trigify-powered signals, and establish weekly reporting to track improvement across key metrics including response rates, meeting conversions, and pipeline velocity. <a href=\"https://televerde.com/definitive-guide-to-sales-intelligence/\">[Source: Televerde]</a></p>"}},{"json":{"output":"<html>\n<p>Harness Trigify's sales trigger automation to capture prospects showing strong buying intent. Begin by configuring competitor monitoring in your dashboard—identify 5-10 key competitors by analyzing which companies your prospects evaluate during purchase decisions, then add them to Trigify's monitoring system <a href=\"#\">[Source: Trigify Knowledge Hub]</a>. Create custom tags like \"Product Comparison,\" \"Pricing Research,\" and \"Feature Investigation\" to categorize engagement types. Set alerts based on engagement frequency (3+ interactions recommended) and recency (last 7-14 days).</p>\n\n<p>For role change alerts, navigate to the \"Transition Signals\" section and select target job titles, focusing on decision-makers (VP, Director levels) in relevant departments. Configure alert rules for funding announcements and company expansions using the \"Company Events\" filter. Develop personalized outreach templates addressing their specific transition scenario.</p>\n\n<p>Implement webhook connections through Trigify's integration hub—connect to Zapier or Make using your API key, then build automation recipes that route leads based on signal strength. Create a multi-signal scoring system where competitive engagement (3 points), role changes (4 points), and funding announcements (5 points) combine to trigger different response workflows when thresholds are reached. One B2B SaaS client achieved 28% reply rates by automatically engaging prospects who interacted with competitors' pricing pages within 48 hours <a href=\"#\">[Source: Trigify Knowledge Hub]</a>.</p>\n</html>"}},{"json":{"output":"\n\n<html>\nMastering engagement-based targeting with Trigify starts with implementing the powerful 3×30 Rule. Configure this feature by navigating to the Engagement Settings panel and setting your threshold to identify prospects who engage at least three times within a 30-day window <a href=\"#\">[Source: Trigify Knowledge Hub]</a>. Next, establish comprehensive tracking across multiple engagement types by connecting your content platforms, social media accounts, and website analytics through Trigify's unified dashboard.\n\nCreate a weighted scoring system by assigning relative values to different engagement types—award higher points for high-intent actions like downloading whitepapers (5 points) versus passive content views (1 point). Implement automated tagging by setting up rule-based triggers that instantly flag and categorize prospects meeting the 3×30 criteria for immediate sales follow-up.\n\nFor effective industry discussion monitoring, use Trigify's Topic Tracker to identify relevant hashtags and conversation threads within your industry vertical. Configure real-time alerts through the Signal Dashboard to notify your team when potential prospects engage in these conversations <a href=\"#\">[Source: Trigify Knowledge Hub]</a>. Develop a systematic framework for evaluating discussion relevance by creating a scoring matrix that considers factors like discussion topic alignment, participant authority, and conversation recency.\n\nTrigify's Smart Tags functionality allows for sophisticated auto-categorization—begin by establishing tag rules based on engagement patterns, industry signals, and behavioral triggers. Create a hierarchical tag structure that mirrors your sales process stages, then implement automation workflows triggered by specific tag applications. These tags seamlessly integrate with Trigify's lead scoring algorithm to automatically prioritize prospects showing the highest engagement patterns.\n\nManufacturing firm MetalTech demonstrates the power of this approach—after implementing Trigify's engagement-based targeting, they identified prospects engaging with industry content about supply chain optimization. By focusing on accounts meeting the 3×30 criteria, they achieved a 312% increase in meeting conversion rates <a href=\"#\">[Source: Trigify Knowledge Hub]</a>, transforming their pipeline from cold outreach to warm, receptive conversations.\n</html>"}},{"json":{"output":"<p>Transforming intent signals into personalized conversations starts with Trigify's AI assistant. Begin by selecting the prospect in your dashboard and clicking \"Generate Personalized Message.\" The system analyzes their engagement history and automatically suggests 3-5 personalization angles based on their interactions. Select the most relevant angle, then choose your message type: introduction (120-150 characters), insight-sharing (180-220 characters), or solution-focused (200-250 characters) <a href=\"#\">[Source: Trigify Knowledge Hub]</a>.</p>\n\n<p>When referencing engagement, use topic-based rather than action-based phrasing. Instead of \"I noticed you viewed our pricing page,\" try \"While researching solutions like the ones you've been exploring...\" Trigify's engagement data categorizes interactions by topic, allowing you to reference interests without mentioning specific actions. Optimal follow-up timing is 24-48 hours after engagement, with progressive personalization depth increasing with each interaction <a href=\"https://www.outreach.io/resources/blog/personalize-sales-emails-at-scale\">[Source: Outreach.io]</a>.</p>\n\n<p>Trigify's topic tracking automatically categorizes prospect engagements into interest areas. Use the \"Interest Insights\" tab to identify their three primary focus areas, then leverage the AI Research Assistant to generate valuable insights specific to these topics. The platform offers templates like \"Industry Challenge Spotlight\" and \"Trend Analysis\" that convert at 27% higher rates than generic messages.</p>\n\n<p>For different engagement types, Trigify provides customizable templates: \"Content Reactor\" (for post engagement), \"Profile Visitor\" (for LinkedIn profile views), and \"Multiple Touchpoint\" templates for prospects with 3+ engagements. Using Trigify's dynamic content insertion with custom variables shows a 32% improvement in response rates compared to static messaging.</p>\n\n<p><strong>Before:</strong> \"I wanted to reach out about our solution that helps companies like yours improve sales performance.\"</p>\n\n<p><strong>After:</strong> \"Your recent engagement with content about AI-powered lead qualification aligned with what we're seeing among Chicago-based SaaS companies – a 23% improvement in SDR productivity when implementing smart prioritization systems.\"</p>\n\n<p>Implement this approach using Trigify's checklist: (1) Activate Smart Tagging, (2) Configure Message Templates, (3) Set Engagement Response Rules, and (4) Establish A/B Testing Parameters. Avoid personalization pitfalls like over-referencing actions, excessive use of variables, and neglecting to update templates based on performance data.</p>"}},{"json":{"output":"<html>\nTo scale your Trigify implementation for 30+ weekly meetings, start by building multi-touch sequences through the platform's workflow designer. Configure 8-12 touchpoints across channels, spacing them 2-3 days apart. Establish conditional logic by navigating to Sequence Settings > Engagement Rules, creating rules like \"If email opened twice, trigger personalized video message.\" <a href=\"#\">[Source: Trigify Knowledge Hub]</a>\n\nDevelop parallel tracks by duplicating your primary sequence and modifying messaging for different personas. For progressive disclosure, use Trigify's Resource Sequencing feature to gradually introduce case studies as engagement increases.\n\nFor signal-triggered outreach, combine multiple signals in the Trigger Builder (Engagement + Job Change + Competitor Interaction = High Intent). Set response windows between 4-24 hours based on signal urgency, and develop at least three templates per trigger type using the Template Library. Implement the \"Approval Queue\" feature for quality control.\n\nThe Network Effect playbook requires activating Trigify's Network Analysis tool to identify second-degree connections engaging with competitors. Create targeting segments using \"Connection-Based Filters\" and develop templates leveraging shared connections: \"I noticed you and [mutual connection] both showed interest in [competitor's content].\" Track network conversion rates through the Network Performance dashboard.\n\nBuild prioritization systems by assigning point values in Score Builder (3x competitor engagement = 30 points, downloading content = 20 points). Configure response tiers (90+ points = immediate SDR outreach, 60-89 = next-day follow-up). Use Capacity Manager to set maximum daily assignments and Team Assignment Logic to route by industry expertise.\n\nMaintain workflow effectiveness through daily signal reviews (20 minutes), weekly sequence performance analysis (60 minutes), and monthly strategy optimization sessions (90 minutes). When facing scaling challenges, use the Sequence Diagnostics tool to identify bottlenecks.\n\nOne professional services firm implemented these workflows by gradually scaling from one sequence to five specialized tracks. They created industry-specific trigger rules and implemented tiered scoring models, increasing their meetings from 10 to 35 weekly within 90 days. Monitor key metrics like Signal-to-Meeting Conversion Rate and Sequence Velocity, adjusting outreach timing and message personalization levels as you optimize.\n</html>"}},{"json":{"output":"<p>Going beyond basic data collection, Trigify's waterfall enrichment process ensures comprehensive lead profiles by cascading through multiple data sources. Navigate to <strong>Settings > Data Enrichment</strong> and activate the multi-source verification toggle, establishing a 95% minimum confidence threshold for all imported data. <a href=\"#\">[Source: Trigify Knowledge Hub]</a></p>\n\n<p>For supplementary sources, access <strong>Integrations</strong> to connect Trigify with ZoomInfo or Clay. Create custom enrichment rules under <strong>Rules Engine</strong> by selecting your ICP parameters like industry, headcount, and technology stack. Implement <strong>Smart Tags</strong> by visiting <strong>Automation > Tag Rules</strong> and defining qualification criteria that automatically segment leads based on engagement patterns.</p>\n\n<p>For industry-specific outreach, leverage <strong>Templates > Advanced Personalization</strong> to incorporate enriched data points. Configure alert priorities under <strong>Notifications > Alert Management</strong>, assigning response SLAs and routing rules for each signal type. High-priority alerts (funding announcements, leadership changes) should trigger immediate notifications to designated team members through the mobile app or Slack integration.</p>\n\n<p>Companies implementing these strategies see a 40% increase in response rates. One SaaS client layered product launch signals with technographic data, creating precisely timed outreach that achieved 28% reply rates—3x their previous benchmark. <a href=\"https://getdatabees.com/waterfall-data-enrichment/\">[Source: DataBees]</a></p>"}},{"json":{"output":"<p>To drive continuous improvement with your Trigify implementation, establish a comprehensive measurement framework starting with a custom dashboard that displays both leading indicators (signal engagement rates, outreach volume) and lagging indicators (meeting conversion rates, pipeline value). Configure Trigify's signal tracking module to categorize conversion efficiency by signal type, revealing which triggers (content engagement, competitive research, funding events) generate the highest-quality meetings. <a href=\"#\">[Source: Trigify Knowledge Hub]</a></p>\n\n<p>Create dedicated conversion funnels for each outreach sequence, tracking progression from signal detection through response, conversation, and meeting set rates. Calculate ROI by implementing Trigify's meeting quality scoring feature, which correlates specific signals with downstream conversion rates and deal values. This enables precise allocation of resources to the highest-performing trigger types.</p>\n\n<p>Implement structured A/B testing by duplicating outreach sequences in Trigify's campaign manager, varying only one element (subject line, personalization depth, timing) per test. Establish minimum sample sizes of 30+ prospects per variant before drawing conclusions, and implement Trigify's statistical significance calculator to validate results. <a href=\"https://forecastio.ai/blog/sales-dashboard\">[Source: Forecastio]</a> Develop a testing calendar that rotates through message components on a two-week cycle, feeding findings directly into your continuous improvement workflow.</p>\n\n<p>For trigger sensitivity optimization, use Trigify's signal analysis module to identify false positives (signals that generated meetings but with unqualified prospects) and false negatives (missed opportunities). Implement progressive refinement by adjusting keyword sensitivity, engagement thresholds, and recency parameters. Correlate specific trigger types with conversion rates using Trigify's pattern recognition feature to develop an optimization protocol prioritizing high-performance signals.</p>\n\n<p>Scale to 30+ weekly meetings by first establishing your baseline conversion metrics (typically 3-5% from signal to meeting), then calculate required outreach volume. Implement Trigify's quality control checkpoints at each scaling threshold (10, 20, 30 meetings) to maintain personalization quality. Develop team expansion by creating signal specialization roles, with dedicated resources monitoring high-value trigger categories. Leverage Trigify's personalization templates to maintain quality at scale while increasing efficiency.</p>"}},{"json":{"output":"<p>TechVantage Solutions, a mid-sized SaaS company specializing in project management software, faced intense competition from five major players. Their cold outreach resulted in dismal 2.3% reply rates despite personalized messaging. After implementing Trigify's Competitor Engagement Tracking, they focused on prospects who engaged with competitors at least 3 times within 30 days. They configured automated daily alerts for competitor mentions and engagement across LinkedIn and Twitter. <a href=\"#\">[Source: Trigify Knowledge Hub]</a></p>\n\n<p>Their winning template read: \"Hi {firstName}, I noticed your interest in {competitorName}'s approach to project management workflows. Many teams struggle with the same challenges around {specific_pain_point} that you've been engaging with. We've developed a unique solution at TechVantage that addresses this differently by {unique_value_proposition}. Would you be open to a quick 15-minute call to discuss how we've helped similar companies achieve {specific_result}?\" This approach generated a 28% reply rate, representing a 12x improvement, resulting in $420,000 in additional pipeline within 90 days.</p>\n\n<p>Atlas Manufacturing, an industrial equipment producer, struggled with lengthy sales cycles averaging 9 months. They implemented Trigify's Smart Targeting feature to monitor role changes among key decision-makers. Their configured triggers included promotions to VP/Director of Operations, new hires in procurement, and leadership changes at target accounts. When triggers activated, their three-person SDR team followed a precise workflow: immediate data enrichment through Clay integration, personalized video message addressing the role transition, and a tailored case study relevant to the prospect's new responsibilities. <a href=\"#\">[Source: Trigify Knowledge Hub]</a></p>\n\n<p>The SDRs operated in pods with each member responsible for specific trigger categories, with automated lead assignment through Trigify's webhook functionality. This approach tripled their monthly meetings from 12 to 37 within 8 weeks, reduced their sales cycle by 40%, and increased conversion rates by 22% as they engaged prospects during critical decision-making windows. Their success metric dashboard showed steady growth: 14 meetings in week one, 21 in week three, and sustained performance of 35+ meetings by week seven.</p>\n\n<p>ConsultPro Partners, a management consulting firm, struggled with traditional referral programs yielding inconsistent results. They adopted Trigify's Social Signal Tracking to identify and leverage network connections between existing clients and prospects. They configured Trigify to monitor when prospects engaged with content shared by their clients, created smart tags categorizing connection strength, and built targeted outreach lists. Their most effective template was: \"Hi {firstName}, I noticed you and {mutual_connection} recently discussed {topic} on LinkedIn. {Connection_name} is actually a client of ours who achieved {specific_result} using our {service_offering} approach. Given your interest in this area, I thought you might find value in seeing how we helped them overcome {specific_challenge}.\" <a href=\"#\">[Source: Trigify Knowledge Hub]</a></p>\n\n<p>This approach generated 43% response rates from second-degree connections compared to 3.7% from cold outreach. ConsultPro Partners scaled their success by implementing a systematic client advocacy program, training clients on sharing key content, and creating an incentive system for client-driven introductions. Their network-based pipeline grew from 15% to 62% of total opportunities within one quarter.</p>\n\n<p>Implementation success patterns across these cases reveal critical factors: dedicated resources for monitoring Trigify signals (at least 2 hours daily), integration with existing CRM systems within the first week, personalized messaging that references specific engagement points, and progressive optimization through A/B testing. Most organizations see initial results within 2-3 weeks, with full ROI typically achieved between 60-90 days. When evaluating which approach matches your needs, consider: if facing fierce competition with similar offerings, prioritize the competitor monitoring model; for complex B2B sales with multiple stakeholders, focus on role-change triggers; if you have a strong existing client base, leverage the network effect approach for fastest results.</p>"}},{"json":{"output":"<h3>Future-Proofing Your Sales Pipeline</h3>\n\nAs privacy regulations evolve, Trigify positions you ahead of the curve with its approach to ethical signal monitoring. Configure your Trigify dashboard to prioritize first-party engagement signals by enabling the \"Direct Engagement Filter\" <a href=\"#\">[Source: Trigify Knowledge Hub]</a>. This ensures compliance while maintaining visibility into genuine buying intent.\n\nImplementing Trigify's upcoming API (releasing next month) requires three simple steps:\n1. Generate your API key in the Trigify admin panel\n2. Use webhook templates to connect with your existing tech stack\n3. Create conditional workflows in Make.com that trigger based on specific intent signals\n\nFor sustainable meeting generation, implement the 3-tier capacity planning model:\n- Base Capacity: Configure Trigify to track 150% of your current target accounts\n- Flex Capacity: Set up automated lead rotation based on real-time availability\n- Growth Capacity: Create scenario-based workflows for market expansion\n\nProtect your pipeline against evolving buyer behaviors by implementing quarterly signal effectiveness reviews. Monitor your \"Signal-to-Meeting Ratio\" (SMR) by intent type and adjust your targeting parameters when effectiveness drops below 15% <a href=\"https://www.pathfactory.com/blog/intent-signals-vs-buying-signals/\">[Source: PathFactory]</a>.\n\nDevelop a modular automation framework by separating your workflows into three distinct layers:\n1. Signal Collection Layer (Trigify's core functionality)\n2. Enrichment Layer (connecting email and phone data)\n3. Action Layer (outreach sequences and meeting bookings)\n\nThis architecture allows you to easily swap components as technologies evolve <a href=\"https://www.testrail.com/blog/test-automation-framework-design/\">[Source: TestRail]</a>."}}]},"settings":{"executionOrder":"v1"},"versionId":"4c18541d-66e2-4c4e-a28b-7d66227767fa","connections":{"Code":{"main":[[{"node":"Editor","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Code","type":"main","index":0}]]},"Editor":{"main":[[{"node":"Google Docs","type":"main","index":0}]]},"Share URL":{"main":[[]]},"Split Out":{"main":[[{"node":"Team of Research Assistants","type":"main","index":0},{"node":"Merge","type":"main","index":0}]]},"Google Docs":{"main":[[{"node":"Google Docs1","type":"main","index":0}]]},"Google Docs1":{"main":[[{"node":"Google Drive","type":"main","index":0}]]},"Google Drive":{"main":[[{"node":"Share URL","type":"main","index":0}]]},"Query Builder":{"main":[[{"node":"Research Leader","type":"main","index":0}]]},"Perplexity tool":{"ai_tool":[[{"node":"Query Builder","type":"ai_tool","index":0},{"node":"Research Leader","type":"ai_tool","index":0},{"node":"Project Planner","type":"ai_tool","index":0},{"node":"Team of Research Assistants","type":"ai_tool","index":0}]]},"Project Planner":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"Research Leader":{"main":[[{"node":"Project Planner","type":"main","index":0}]]},"Anthropic Chat Model":{"ai_languageModel":[[{"node":"Editor","type":"ai_languageModel","index":0}]]},"Anthropic Chat Model1":{"ai_languageModel":[[{"node":"Research Leader","type":"ai_languageModel","index":0}]]},"Trigify knowledge hub":{"ai_tool":[[{"node":"Team of Research Assistants","type":"ai_tool","index":0}]]},"OpenRouter Chat Model1":{"ai_languageModel":[[{"node":"Query Builder","type":"ai_languageModel","index":0},{"node":"Project Planner","type":"ai_languageModel","index":0},{"node":"Team of Research Assistants","type":"ai_languageModel","index":0}]]},"Trigify knowledge hub2":{"ai_tool":[[{"node":"Query Builder","type":"ai_tool","index":0},{"node":"Research Leader","type":"ai_tool","index":0},{"node":"Project Planner","type":"ai_tool","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Query Builder","type":"ai_outputParser","index":0}]]},"Structured Output Parser1":{"ai_outputParser":[[{"node":"Project Planner","type":"ai_outputParser","index":0}]]},"When chat message received":{"main":[[{"node":"Query Builder","type":"main","index":0}]]},"Team of Research Assistants":{"main":[[{"node":"Merge","type":"main","index":1}]]}}}


name: Gmail AI Email Manager
author_name: Max Mitcham
author_username: maxmitcham
categories: []
created_at: 2025-06-06T12:20:00.982Z
updated_at: 2025-06-06T12:20:00.982Z
url: https://n8n.io/workflows/4722
scraped_at: 2025-06-19 22:48:34
description:
  Email Manager - Intelligent Gmail Classification

  This 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.

  ⚙️ How It Works (Step-by-Step):

  📧 Gmail Monitoring (Trigger)
  Continuously monitors your Gmail inbox:
  Polls for new emails every minute
  Captures all incoming messages automatically
  Triggers workflow for each new email received

  📖 Email Content Extraction
  Retrieves complete email details:
  Full email body and headers
  Sender information and recipient lists
  Subject line and metadata
  Existing Gmail labels and categories
  Email threading information (replies/forwards)

  🔍 Email History Analysis
  AI agent checks relationship context:
  Searches for previous emails from the same sender
  Checks sent folder for prior outbound correspondence
  Determines if this is a first-time contact (cold email)
  Analyzes conversation thread history

  🤖 Intelligent Classification Agent
  Advanced AI categorization using:
  Claude Sonnet 4 for sophisticated email analysis
  Context-aware classification based on email history
  Content analysis for intent and urgency detection
  Header analysis for automated vs. human-sent emails

  🏷️ Smart Label Assignment
  Automatically applies appropriate Gmail labels:
  To Respond: Requires direct action/reply
  FYI: For awareness, no action needed
  Notification: Service updates, policy changes
  Marketing: Promotional content and sales pitches
  Meeting Update: Calendar-related communications
  Comment: Document/task feedback

  📋 Structured Processing
  Ensures consistent labeling:
  Uses structured output parsing for reliability
  Returns specific Label ID for Gmail integration
  Applies label automatically to the email
  Maintains classification accuracy

  🛠️ Tools Used:
  n8n: Workflow automation platform
  Gmail API: Email monitoring and label management
  Anthropic Claude: Advanced email content analysis
  Gmail Tools: Email history checking and search
  Structured Output Parser: Consistent AI responses

  📦 Key Features:
  Real-time email monitoring and classification
  Context-aware analysis using email history
  Intelligent cold vs. warm email detection
  Multiple classification categories for organization
  Automatic Gmail label application
  Header analysis for automated email detection
  Thread-aware conversation tracking

  🚀 Ideal Use Cases:
  Busy executives managing high email volumes
  Sales professionals prioritizing prospect communications
  Support teams organizing customer inquiries
  Marketing teams filtering promotional content
  Anyone wanting automated email organization
  Teams needing consistent email prioritization
  `

nodes_used:
  ["n8n-nodes-base.gmail","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatAnthropic","@n8n/n8n-nodes-langchain.outputParserStructured"]

workflow_json:
  {"id":"uf6t5qhnQMgilteE","meta":{"instanceId":"f694ebfb8236012bcdeb0adbc4faa465b6fa315f9ad30732114d26f7419da901","templateCredsSetupCompleted":true},"name":"Email Manager","tags":[{"id":"xG398zgKum2bPs6D","name":"Personal Assistant","createdAt":"2025-05-28T13:58:43.876Z","updatedAt":"2025-05-28T13:58:43.876Z"}],"nodes":[{"id":"5e01a927-caf7-41ad-aca7-d7504e313564","name":"Gmail Trigger","type":"n8n-nodes-base.gmailTrigger","position":[-20,-60],"parameters":{"filters":{},"pollTimes":{"item":[{"mode":"everyMinute"}]}},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":1.2},{"id":"a8644856-a8bf-49de-84a7-3fd9f93550d3","name":"Gmail","type":"n8n-nodes-base.gmail","position":[200,-20],"webhookId":"01c91a6b-4d45-4630-8e81-0f82ee5d6524","parameters":{"simple":false,"options":{},"messageId":"={{ $json.id }}","operation":"get"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"f6ddae9f-303b-46cd-980d-1d46fc4ecbec","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1000,100],"parameters":{"jsonSchemaExample":"{\n\t\"label\": \"Label name\", \n\"label ID\": \"label ID\" \n}"},"typeVersion":1.2},{"id":"cc6b0990-a778-4199-a0fe-80c83dfb9934","name":"Gmail1","type":"n8n-nodes-base.gmail","position":[1020,-220],"webhookId":"575a4038-3b07-46b9-be69-39cfc1d47d7e","parameters":{"labelIds":"={{ $json.output['label ID'] }}","messageId":"={{ $('Gmail').item.json.id }}","operation":"addLabels"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"f47e8e55-f634-417f-b62f-60e47af71827","name":"Anthropic Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[380,160],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-sonnet-4-20250514","cachedResultName":"Claude Sonnet 4"},"options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.3},{"id":"b0ed86c7-5ddd-48dc-aa93-5c4d5c1cacf7","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[500,-140],"parameters":{"text":"Run the task.","options":{"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 `{{ $json.from.value[0].address }}`. 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:** `{{ $json.from.value[0].address }}`\n* **Sender Name:** `{{ $json.from.value[0].name }}`\n* **Direct Recipient Emails (To):** `{{ $json.to.value.map(r => r.address).join(', ') }}`\n* **CC Recipient Emails:** `{{ $json.cc.value.map(r => r.address).join(', ') }}` *(Added this based on your JSON, use if populated)*\n* **Subject:** `{{ $json.subject }}`\n* **Body (Plain Text):** `{{ $json.text }}`\n* **Existing Gmail Labels (for current email):** `{{ $json.labelIds.join(', ') }}`\n* **Auto-Submitted Header:** `{{ $json.headers['auto-submitted'] }}`\n* **Original Sender Header (if different from From):** `{{ $json.headers.sender }}`\n* **In-Reply-To Header (for current email):** `{{ $json.headers['in-reply-to'] }}`\n* **References Header (for current email):** `{{ $json.headers.references }}`\n* **List-Unsubscribe Header:** `{{ $json.headers['list-unsubscribe'] }}`\n* **Precedence Header:** `{{ $json.headers.precedence }}` (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: `{{ $json.from.value[0].address }}`\n* Sender Name: `{{ $json.from.value[0].name }}`\n* Direct Recipient Emails (To): `{{ $json.to.value.map(r => r.address).join(', ') }}`\n* CC Recipient Emails: `{{ $json.cc.value.map(r => r.address).join(', ') }}`\n* Subject: `{{ $json.subject }}`\n* Body (Plain Text): `{{ $json.text }}`\n* Existing Gmail Labels: `{{ $json.labelIds.join(', ') }}`\n* Auto-Submitted Header: `{{ $json.headers['auto-submitted'] }}`\n* Original Sender Header: `{{ $json.headers.sender }}`\n* In-Reply-To Header: `{{ $json.headers['in-reply-to'] }}`\n* References Header: `{{ $json.headers.references }}`\n* List-Unsubscribe Header: `{{ $json.headers['list-unsubscribe'] }}`\n* Precedence Header: `{{ $json.headers.precedence }}`\n\n**Output:** [Provide ONLY the Label ID here]"},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"f4bbdda0-dcd8-41a7-a870-69dfcb747a4f","name":"Get Email","type":"n8n-nodes-base.gmailTool","position":[760,140],"webhookId":"c30886d9-3d98-464d-82b8-e7649c87610a","parameters":{"filters":{"q":"=from:{{ $fromAI('email') }}"},"operation":"getAll","returnAll":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"},"credentials":{"gmailOAuth2":{"id":"Kv7fHf3kWbBam6RH","name":"Gmail account 2"}},"typeVersion":2.1},{"id":"64c3b465-d2be-43cc-ad41-cc1298038640","name":"Check Sent","type":"n8n-nodes-base.gmailTool","position":[560,180],"webhookId":"0854fad3-622e-44b4-9d61-5aae13c61433","parameters":{"filters":{"q":"=to:{{ $fromAI('email') }}","labelIds":["SENT"]},"operation":"getAll"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1}],"active":true,"pinData":{"Gmail Trigger":[{"json":{"To":"max@trigify.io","id":"1971723eacc72f08","From":"Coresignal <info@coresignal.com>","labels":[{"id":"INBOX","name":"INBOX"},{"id":"IMPORTANT","name":"IMPORTANT"},{"id":"CATEGORY_PROMOTIONS","name":"CATEGORY_PROMOTIONS"}],"Subject":"New MCP server: Direct data access for smarter AI","payload":{"mimeType":"multipart/alternative"},"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,","threadId":"1971723eacc72f08","historyId":"5524551","internalDate":"1748439919000","sizeEstimate":62610}},{"json":{"Cc":"","To":"max@trigify.io","id":"1971723cfa14c3df","From":"Plain <hello@plain.com>","labels":[{"id":"INBOX","name":"INBOX"},{"id":"IMPORTANT","name":"IMPORTANT"},{"id":"CATEGORY_UPDATES","name":"CATEGORY_UPDATES"},{"id":"UNREAD","name":"UNREAD"}],"Subject":" Important update to Plain’s Data Processing Agreement (DPA)","payload":{"mimeType":"multipart/alternative"},"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.","threadId":"1971723cfa14c3df","historyId":"5524408","internalDate":"1748439911000","sizeEstimate":45077}}]},"settings":{"executionOrder":"v1"},"versionId":"644d8154-7912-436a-8c05-e8e2f1092993","connections":{"Gmail":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Gmail1":{"main":[[]]},"AI Agent":{"main":[[{"node":"Gmail1","type":"main","index":0}]]},"Get Email":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Check Sent":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Gmail Trigger":{"main":[[{"node":"Gmail","type":"main","index":0}]]},"Anthropic Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"AI Agent","type":"ai_outputParser","index":0}]]}}}


name: AI Personal Assistant
author_name: Max Mitcham
author_username: maxmitcham
categories: []
created_at: 2025-06-06T12:23:22.572Z
updated_at: 2025-06-06T12:23:22.572Z
url: https://n8n.io/workflows/4723
scraped_at: 2025-06-19 22:48:35
description:
  Email Personal Assistant - Comprehensive Communication Manager

  This automation flow is designed to proactively monitor email, calendar, and Slack communications, analyze priorities across all channels, and generate a comprehensive daily briefing with actionable tasks for executive productivity management.

  ⚙️ How It Works (Step-by-Step):

  ⏰ Automated Daily Trigger
  Runs automatically on weekdays:
  Scheduled execution every weekday at 8:00 AM
  Manual trigger available for on-demand analysis
  Comprehensive daily communication audit

  📧 Email Assistant Agent
  Analyzes inbox priorities and context:
  Scans unread emails across "To Respond" and "FYI" labels
  Checks email history to determine relationship context
  Identifies *company-related opportunities and partnerships
  Categorizes emails by urgency (High, Medium, Low)
  Cross-references with sent emails for follow-up context

  📅 Follow-Up Assistant Agent
  Monitors meeting follow-up requirements:
  Reviews last 3 days of calendar meetings
  Fetches Fireflies transcripts for recorded sessions
  Identifies meetings without post-meeting communication
  Flags meetings requiring action items or follow-ups
  Checks sent emails and Slack for completed follow-ups

  💬 Slack Assistant Agent
  Tracks Slack communication priorities:
  Monitors direct messages and @mentions
  Identifies unreplied Slack conversations
  Cross-references with email and calendar context
  Prioritizes responses based on sender importance
  Checks for threaded conversations requiring attention

  🎯 Master Orchestrator Agent
  Synthesizes all communication data:
  Combines reports from all three assistant agents
  Cross-references with existing Google Sheets to-do list
  Prioritizes tasks by urgency and business impact
  Identifies correlations between different communication channels
  Creates comprehensive daily action plan

  📊 Task Management Integration
  Automated tracking and delivery:
  Appends new tasks to Google Sheets to-do tracker
  Sends personalized daily briefing via Slack DM
  Maintains conversation memory for context continuity
  Tracks outstanding vs. completed items

  🛠️ Tools Used:
  n8n: Workflow orchestration and scheduling
  Claude Sonnet 4 & Opus 4: Multi-agent AI analysis
  Gmail API: Email monitoring and history checking
  Google Calendar: Meeting tracking and scheduling
  Slack API: Message monitoring and user management
  Fireflies API: Meeting transcript analysis
  Google Sheets: Task tracking and persistence

  📦 Key Features:
  Multi-channel communication monitoring (Email, Calendar, Slack)
  AI-powered priority assessment and context analysis
  Cross-platform relationship tracking and history
  Automated daily briefing generation and delivery
  Persistent task tracking with Google Sheets integration
  Meeting follow-up verification and flagging
  Conversation memory for continuity across sessions

  🚀 Ideal Use Cases:
  C-level executives managing multiple communication channels
  Sales leaders tracking prospect interactions and follow-ups
  Business development professionals managing partnerships
  Busy professionals needing communication prioritization
  Teams requiring systematic follow-up management
  Anyone wanting automated daily productivity briefings
  `

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.slack","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatAnthropic","@n8n/n8n-nodes-langchain.memoryBufferWindow"]

workflow_json:
  {"id":"F0DFXdSTdGjIk0V5","meta":{"instanceId":"f694ebfb8236012bcdeb0adbc4faa465b6fa315f9ad30732114d26f7419da901","templateCredsSetupCompleted":true},"name":"Email - PA","tags":[{"id":"xG398zgKum2bPs6D","name":"Personal Assistant","createdAt":"2025-05-28T13:58:43.876Z","updatedAt":"2025-05-28T13:58:43.876Z"}],"nodes":[{"id":"23c641eb-14b4-4ec3-bbb4-525c6ee0630d","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[440,-60],"parameters":{},"typeVersion":1},{"id":"6dcfb448-c7c9-4071-afbc-58416de739c8","name":"Get Email","type":"n8n-nodes-base.gmailTool","position":[840,380],"webhookId":"27137976-d22b-4d15-9c86-b8b8d6a97e7b","parameters":{"messageId":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message_ID', ``, 'string') }}","operation":"get"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"02822000-04e9-4448-9cab-1846fda5ae9d","name":"Anthropic Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[560,180],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-sonnet-4-20250514","cachedResultName":"Claude Sonnet 4"},"options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.3},{"id":"cdd1d793-cde5-4f7c-bdc8-f7d3220ecab2","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[740,120],"parameters":{"sessionKey":"1","sessionIdType":"customKey","contextWindowLength":50},"typeVersion":1.3},{"id":"7d4ce33f-a3e9-4476-8815-13a970847909","name":"Google Calendar","type":"n8n-nodes-base.googleCalendarTool","position":[1360,80],"parameters":{"options":{},"timeMax":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}","timeMin":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}","calendar":{"__rl":true,"mode":"list","value":"max@trigify.io","cachedResultName":"max@trigify.io"},"operation":"getAll","returnAll":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"},"credentials":{"googleCalendarOAuth2Api":{"id":"zeOFqZko9HcOCo00","name":"Google Calendar account"}},"typeVersion":1.3},{"id":"eb6d3232-39e4-4459-9d01-5553c76d04af","name":"Check Sent","type":"n8n-nodes-base.gmailTool","position":[1160,80],"webhookId":"0854fad3-622e-44b4-9d61-5aae13c61433","parameters":{"filters":{"q":"=to:{{ $fromAI('email') }}","labelIds":["SENT"]},"operation":"getAll"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"90d5d3f3-4a7f-4c0d-8fe5-d36581302b77","name":"Anthropic Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[1260,200],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-opus-4-20250514","cachedResultName":"Claude Opus 4"},"options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.3},{"id":"b2c62e5e-b13b-4823-b241-b0fca8375645","name":"Unread Emails - FYI","type":"n8n-nodes-base.gmailTool","position":[960,260],"webhookId":"44a76d68-61fb-42b5-a7eb-f3ccc7a0d2d1","parameters":{"filters":{"labelIds":["Label_5151750749488724401","Label_7518716752151077752"],"readStatus":"unread"},"operation":"getAll","returnAll":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"7d277cd9-ca79-437f-bb6e-2004d47afb14","name":"Unread Emails - To Respond","type":"n8n-nodes-base.gmailTool","position":[1140,360],"webhookId":"44a76d68-61fb-42b5-a7eb-f3ccc7a0d2d1","parameters":{"filters":{"labelIds":["Label_5151750749488724401","UNREAD"],"readStatus":"unread"},"operation":"getAll","returnAll":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"d2a41575-f04f-4a59-ad81-4b90c49035a6","name":"Email Assistant","type":"@n8n/n8n-nodes-langchain.agent","position":[700,-120],"parameters":{"text":"Run the task. ","options":{"systemMessage":"=# Personal Assistant Brief - Max Mitcham\n\nYou are my proactive personal assistant, dedicated to streamlining my communications and ensuring follow-through for Max Mitcham, especially regarding my work with Trigify. You have access to and will manage my Email, Slack, and Calendar.\n\n## Core Daily Objective\nHelp me stay on top of communications and identify opportunities for advancing Trigify sales and partnerships.\n\n## Daily Tasks\n\n### 1. Priority Email Triage\n- Scan my inbox for unreplied emails.\n- Flag emails requiring a response, categorizing them by urgency (e.g., High, Medium, Low).\n- Note emails specifically related to:\n  - Active Trigify sales leads.\n  - Potential or ongoing Trigify partnerships.\n  - Requests from important contacts (define if you have a list, e.g., 'investors,' 'VIP clients').\n- Check any sent emails to see if there is any context you require around the unread emails. \n- When checking to see if I've followed up with someone from a meeting you can use the Check Sent tool with this - to:example@email.com"},"promptType":"define"},"typeVersion":1.9},{"id":"dacebdba-18e8-4a59-9900-804cea6ad9b2","name":"Follow Up Assistant","type":"@n8n/n8n-nodes-langchain.agent","position":[1300,-160],"parameters":{"text":"Run the task.","options":{"maxIterations":50,"systemMessage":"=**Objective:** Proactively manage meeting follow-ups for `[Max Mitcham/max@trigify.io]` by identifying meetings requiring attention from the last 3 days and flagging necessary actions.\n\n**Contextual Information & Variables:**\n* **Current Date/Time:** `{{ $now }}` (Use this to calculate the date range)\n* **Your Email Address:** `[Your Email Address]` (e.g., max@trigify.io)\n* **Date Format for Google Calendar:** `YYYY-MM-DD HH:MM:SS` (e.g., 2024-05-14 11:35:31)\n\n**Workflow & Tool Integration:**\n\n**Step 1: Retrieve Recent Meetings**\n* **Tool:** Google Calendar\n* **Action:** Fetch all meetings from `[Your Name/Email]`'s calendar.\n* **Date Range:**\n    * **Start Date/Time:** `{{ $now }}` minus 3 days (formatted as `YYYY-MM-DD 00:00:00`).\n    * **End Date/Time:** `{{ $now }}` (formatted as `YYYY-MM-DD 23:59:59`).\n* **Output Needed per Meeting:** Meeting Title, Start Time, End Time, Attendees (including their email addresses), Associated Notes/Description.\n\n**Step 2: Process Each Retrieved Meeting**\n\nFor each meeting:\n\n    **A. Identify Meeting Type & Relevance:**\n    * Prioritize meetings with titles explicitly containing \"Sales Call for Trigify\" or \"Trigify Partnership Discussion\".\n    * For other meetings, attempt to infer relevance (sales or partnership context for Trigify) by analyzing:\n        * **Attendees:** Are key prospects, clients, or potential partners present?\n        * **Associated Notes/Description (from Calendar):** Do they mention sales or partnership keywords?\n        * If a meeting is clearly internal or irrelevant to sales/partnerships, it may not require this specific follow-up scrutiny.\n\n    **B. Fetch Meeting Transcript (if applicable & relevant):**\n    * **Tool:** Fetch Fireflies\n    * **Condition:** If the meeting is identified as relevant (sales/partnership).\n    * **Input Parameters:**\n        * Meeting identifier (e.g., title and start time from Google Calendar).\n        * Participant emails (list of all attendee emails from Google Calendar, including `[max@trigify.io]`).\n    * **Output:** Transcript content or an indicator if no transcript is found.\n\n    **C. Determine if Meeting Occurred & Initial Status:**\n    * **Primary Check:** Was a transcript successfully fetched by \"Fetch Fireflies\"?\n    * **Scenario 1: No Transcript Found.**\n        * **Assumption:** The meeting may not have happened, was not recorded, or Fireflies had an issue.\n        * **Action:** Flag this meeting for manual review.\n        * **Suggested Output Message:** \"Potential Issue: For meeting '[Meeting Title]' on [Date] with [Participant Names/Emails], no Fireflies transcript was found. Please verify if the meeting occurred and if any action is needed. Priority: Low.\"\n\n    * **Scenario 2: Transcript Found (Meeting likely occurred).**\n        * Proceed to check for follow-ups (Step D).\n\n    **D. Check for Your Sent Follow-up Communication:**\n    * **Tool 1: Check Sent Emails** (e.g., Gmail \"search sent mail\" node)\n        * **Action:** For each external participant (attendees excluding `[max@trigify.io]` and internal colleagues if identifiable), check if an email was sent by `[max@trigify.io]` to that participant.\n        * **Time Window for Sent Email:** From the meeting's end time until `{{ $now }}`.\n        * **Search Criteria:** `to:[participant_email@example.com] from:[max@trigify.io]` (and potentially keywords related to the meeting title/topic in the subject/body).\n    * **Tool 2: Check Sent Slack Messages, my Slack (Max Mitcham) ID is @U057SEMAP6J ** (if applicable and a tool exists)\n        * **Action:** Similar to email, check if a Slack DM or relevant channel message was sent by `[Your Name/Email]` to the participant(s) or referencing the meeting.\n        * **Time Window:** Same as email.\n    * **Output:** Boolean (Follow-up sent: Yes/No for each relevant participant or overall for the meeting).\n\n    **E. Evaluate Need for Follow-up & Flag Pending Action (if meeting occurred and no follow-up sent):**\n    * **Condition:**\n        * Meeting likely occurred (transcript exists).\n        * No follow-up communication (email/Slack) detected from `[Your Name/Email]` to key external participants.\n    * **Evaluation Criteria (Is a follow-up beneficial?):**\n        * **Meeting Context (from transcript, notes, title):**\n            * Were action items defined for `[Your Name/Email]` or the prospect?\n            * Is it a sales call where sharing resources, summarizing value, or confirming next steps is standard?\n            * Is it a partnership discussion with clear deliverables or next steps?\n        * **Participants:** Who attended? (e.g., high-value prospect, new contact).\n        * **Objective:** What was the goal of the meeting?\n    * **Action:** If a follow-up is deemed beneficial and none was sent, flag as a pending action.\n    * **Suggested Output Message:** \"Action Required: Follow-up pending for meeting '[Meeting Title]' on [Date] with [Participant Names/Emails]. Objective: [Inferred Objective]. Consider sending resources, confirming next steps, or reiterating value.\"\n\n**Summary of Outputs:**\n1.  A list of meetings flagged for \"Potential Issue\" (no transcript).\n2.  A list of meetings flagged for \"Action Required\" (follow-up pending).\n\nDon't give me any recoemdnations other than the above outputs."},"promptType":"define"},"typeVersion":1.9},{"id":"e83b030b-ba2f-43e7-bb3d-113e126403b1","name":"Fetch FireFlies","type":"n8n-nodes-base.httpRequestTool","position":[1580,100],"parameters":{"url":"https://api.fireflies.ai/graphql","method":"POST","options":{},"jsonBody":"={\n  \"query\": \"query Transcripts($participantEmail: String) { transcripts(participant_email: $participantEmail) { id title date duration participants host_email organizer_email transcript_url summary { action_items keywords overview short_summary } } }\",\n  \"variables\": {\n    \"participantEmail\": \"{{ $fromAI('email') }}\"\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","toolDescription":"Use this to fetch my call recordings and transcripts from my FireFlies account. Add the participant email to fetch the transcript.\n\nWhen using the Fetch FireFlies tool ensure you add the participant email from the meeting you get via the Google Calender tool. ","headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer 36dde457-a915-4056-b81f-e39f2a16f1dc"}]}},"typeVersion":4.2},{"id":"c23b7b03-dedc-4733-a7be-91f3473cbd08","name":"Check Sent1","type":"n8n-nodes-base.gmailTool","position":[1480,320],"webhookId":"0854fad3-622e-44b4-9d61-5aae13c61433","parameters":{"filters":{"q":"=to:{{ $fromAI('email') }}","labelIds":["SENT"]},"operation":"getAll"},"credentials":{"gmailOAuth2":{"id":"Ldq2rjN6Dod5DoKl","name":"Gmail account"}},"typeVersion":2.1},{"id":"a00e1df6-3f55-45ca-801c-021206c8a303","name":"Master Orchestrator Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[2360,-240],"parameters":{"text":"Run the task.","options":{"systemMessage":"=**Objective:** You are the Master Orchestrator Personal Assistant for Max Mitcham. Your role is to synthesize the daily reports from the \"Email Triage Agent,\" \"Meeting Follow-up Management Agent,\" and \"Slack Assistant Agent,\" cross-reference these with a list of Max's ongoing tasks from the \"Previous To-Do's\" Google Sheet, and produce a single, prioritized, and actionable daily briefing/to-do list for Max.\n\n**Contextual Information:**\n* **Recipient:** Max Mitcham (max@trigify.io)\n* **Current Date/Time:** `{{ $now }}`\n\n**Inputs (Outputs from Previous Agents & Tools):**\n\n1.  **Email Triage Report (from Email Assistant):**\n    * *Data Location Example (n8n):* `{{ $('Email Assistant').item.json.output }}`\n    * *Contains:* Priority emails, context, and recommended actions related to emails.\n\n2.  **Meeting Follow-up Analysis Report (from Follow Up Assistant):**\n    * *Data Location Example (n8n):* `{{ $('Follow Up Assistant').item.json.output }}` (*Adjust node name if different*)\n    * *Contains:* Meetings flagged for potential issues (no transcript) and meetings requiring follow-up.\n\n3.  **Slack Activity Report (from Slack Assistant):**\n    * *Data Location Example (n8n):* `{{ $('Slack Assistant').item.json.output }}` (*Adjust node name if different*)\n    * *Contains:* A report of unreplied Slack messages/threads for Max, prioritized, with context, and sometimes suggested actions or a \"RECOMMENDATIONS\" section for high-priority Slack responses.\n\n4.  **Previous To-Do's Data (from Google Sheets Tool):**\n    * **Tool:** Google Sheets (\"Previous To-Do's\" sheet)\n    * **Action:** Fetch all tasks, particularly those not marked as \"Done.\"\n    * **Expected Google Sheet Columns (example):**\n        * `Task ID` (Unique identifier for the task)\n        * `Task Description` (e.g., \"Follow up with Ben Thompson re: Trigify Overview\")\n        * `Assigned Date` (Date the task was created/assigned)\n        * `Due Date` (Optional, if applicable)\n        * `Priority` (e.g., High, Medium, Low)\n        * `Source` (e.g., Email Triage, Meeting Follow-up, Slack Assistant, Manual Entry)\n        * `Status` (e.g., \"Pending,\" \"Overdue,\" \"In Progress,\" \"Done,\" \"Blocked\")\n        * `Relevant Link/Reference` (e.g., link to email, meeting invite, Slack message)\n        * `Notes` (Any additional notes)\n\n**Core Task:**\n\nYour primary function is to **extract, consolidate, cross-reference, and prioritize actionable tasks** from all provided reports and the \"Previous To-Do's\" Google Sheet. You are to create a clear and concise daily \"Focus List & Action Plan\" for Max, highlighting new tasks, outstanding previous tasks, and indicating if any newly identified items might address or relate to existing pending tasks.\n\n**Instructions:**\n\n1.  **Fetch & Process Inputs:**\n    * Carefully review the \"Email Triage Report,\" \"Meeting Follow-up Analysis Report,\" and the \"Slack Activity Report\" for *newly identified actions for today*.\n    * Retrieve data from the \"Previous To-Do's\" Google Sheet.\n\n2.  **Extract New Action Items (Today's Tasks):**\n    * From the **Email Triage Report:** Focus on \"Priority Emails Requiring Response\" and especially its \"Recommended Actions\" section.\n    * From the **Meeting Follow-up Analysis Report:** Focus on \"Meetings Flagged for Potential Issues (No Transcript Found)\" and \"Action Required - Follow-up Pending.\"\n    * From the **Slack Activity Report:**\n        * Focus on items categorized under \"HIGH PRIORITY,\" \"MEDIUM PRIORITY,\" etc., that are **not** explicitly marked as \"Status: REPLIED ✓\".\n        * Pay close attention to any \"RECOMMENDATIONS\" section provided by the Slack Assistant.\n\n3.  **Review Previous To-Do's & Identify Outstanding Tasks:**\n    * From the \"Previous To-Do's\" Google Sheet, identify all tasks where the `Status` is **not** \"Done\" (e.g., \"Pending,\" \"Overdue,\" \"In Progress\").\n    * Note their `Task Description`, `Assigned Date`, `Priority`, and `Source`.\n\n4.  **Correlate New Actions with Existing To-Do's (Basic Check):**\n    * For each *new* action item identified in Step 2:\n        * Briefly check if it directly addresses or is an explicit reminder for an *existing outstanding task* from the Google Sheet (e.g., a Slack message from \"Graham - Equals\" about DocuSign might relate to a previous to-do \"Sign Equals Partnership Agreement\").\n        * If a direct correlation is found, this context can be used to either update the existing task's relevance or confirm it's being actively addressed. *Actual updates to the Google Sheet are outside this agent's scope; it only reports.*\n\n5.  **Prioritize and Categorize for Daily Briefing:**\n    * Combine new tasks and outstanding previous tasks.\n    * Use the priority levels (High, Medium, Low) and urgency cues (e.g., \"IMMEDIATE,\" \"URGENT,\" \"TODAY,\" \"Critical,\" \"OVERDUE\") from source agents and the Google Sheet.\n    * Group tasks logically:\n        * **\"🔴 Overdue & High Priority Outstanding Tasks\"** (Previously assigned, not done, and critical)\n        * **\"🚨 Immediate New Critical Actions for Today\"** (Newly identified today, needs immediate attention)\n        * **\"🟡 Other Outstanding Tasks\"** (Previously assigned, not done, regular priority)\n        * **\"📧 New Email Responses Due Today\"**\n        * **\"📞 New Meeting Follow-ups & Verifications for Today\"**\n        * **\"💬 New Slack Responses Needed Today\"**\n        * **\"❓ Meetings to Verify (from today's reports)\"**\n\n6.  **Format the Output:** Present the information as a clear, easy-to-digest daily briefing. For each item, include:\n    * A clear description of the task.\n    * Relevant context (e.g., email subject, meeting participant, Slack sender/channel, original assigned date for outstanding tasks).\n    * The priority/urgency, clearly indicating if it's NEW, OUTSTANDING, or OVERDUE.\n    * The specific action Max needs to take.\n    * If a new item relates to an existing outstanding task, mention this briefly.\n\n7.  **Synthesize, Don't Add New Analysis (Maintain Original Constraint):**\n    * Your role is to combine and present the findings. **Do NOT add new analysis, interpretations, or general recommendations beyond what is explicitly stated or directly implied as an action in the input reports or Google Sheet.**\n    * Task-specific recommendations from any agent or implied by an outstanding to-do item *should* be included.\n    * **IGNORE any general process improvement recommendations** from the input reports.\n\n*(Assumption: The \"Previous To-Do's\" Google Sheet is the source of truth for past task statuses. This agent reads it but does not directly update it. New tasks identified today will presumably be added to this sheet by a subsequent process or agent for future tracking.)*\n\n**Desired Output Format (Example - Enhanced):**"},"promptType":"define"},"typeVersion":1.9},{"id":"33bdab45-9020-4b5a-8d82-fc431a3c6f81","name":"Anthropic Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[2340,100],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-sonnet-4-20250514","cachedResultName":"Claude Sonnet 4"},"options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.3},{"id":"8318f3e9-2d7a-4d40-aa1f-121190b59d27","name":"Slack","type":"n8n-nodes-base.slackTool","position":[2240,700],"webhookId":"f344be12-d8f9-49f2-9ad1-c5ad4865011a","parameters":{"user":{"__rl":true,"mode":"list","value":""},"resource":"user","authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"K7I3vS9MWSPOgZmk","name":"Slack account 4"}},"typeVersion":2.3},{"id":"b35ba2f5-1941-49ca-b517-876d762ec679","name":"Slack1","type":"n8n-nodes-base.slack","position":[1980,680],"webhookId":"888207b0-5470-4d01-af54-9649a7fb5239","parameters":{"query":"in:<#C08RV147W01> from:me ","options":{},"operation":"search"},"credentials":{"slackApi":{"id":"VAldnV7INnA0hLKx","name":"Max Personal - May 2025"}},"typeVersion":2.3},{"id":"1477da0c-bcf9-4078-8e42-8d4630eed57d","name":"Check Slack Mentions","type":"n8n-nodes-base.slackTool","position":[2080,200],"webhookId":"4178ca31-02cb-443b-857b-a229a726d144","parameters":{"query":"@U057SEMAP6J","options":{},"operation":"search"},"credentials":{"slackApi":{"id":"VAldnV7INnA0hLKx","name":"Max Personal - May 2025"}},"typeVersion":2.3},{"id":"1e9fd5cf-0714-4847-a413-cb1e0857c86e","name":"Check Thread Mentions","type":"n8n-nodes-base.slackTool","position":[1900,280],"webhookId":"a00c94a4-e875-496b-a734-5c8f69d03772","parameters":{"query":"=in:<#{{ $fromAI('channel_id') }}> from:me","options":{},"operation":"search"},"credentials":{"slackApi":{"id":"VAldnV7INnA0hLKx","name":"Max Personal - May 2025"}},"typeVersion":2.3},{"id":"ab54a242-f3f9-4481-8c14-08f89fc1a8a4","name":"Get User","type":"n8n-nodes-base.slackTool","position":[2220,220],"webhookId":"3b709b40-2c4d-4a32-b53c-780dfd855bb7","parameters":{"user":{"__rl":true,"mode":"id","value":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('User', ``, 'string') }}"},"resource":"user"},"credentials":{"slackApi":{"id":"VAldnV7INnA0hLKx","name":"Max Personal - May 2025"}},"typeVersion":2.3},{"id":"7b37f19a-a7a0-41f9-8f85-6b74c219f438","name":"Slack Assistant","type":"@n8n/n8n-nodes-langchain.agent","position":[1820,-220],"parameters":{"text":"Run the task.","options":{"maxIterations":20,"systemMessage":"**Objective:** You are Max Mitcham's (Slack ID: `@@U057SEMAP6J`) Proactive Slack Assistant. Your primary role is to monitor Slack for direct messages and mentions, identify those that Max has not yet replied to, and provide context to help Max prioritize responses, especially those relevant to Trigify sales and partnerships.\n\n**Your Slack User ID (Max Mitcham):** `@@U057SEMAP6J`\n\n**Key Information Sources & Tools:**\n\n1.  **Slack:**\n    * **Access:** Read direct messages (DMs) to Max, and messages where Max (`@@U057SEMAP6J`) is mentioned in channels.\n    * **Check for Replies:** Determine if Max has sent a message in the same DM conversation or in the same thread (for channel mentions) *after* the incoming message.\n2.  **Email (e.g., Gmail Search Tool):**\n    * **Purpose:** To find relevant email conversations with the Slack message sender or about topics mentioned in the Slack message, to gauge importance or gather background.\n    * **Search Parameters (example):** `from:[Slack message sender's email (if known/inferable)] OR to:[Slack message sender's email] OR subject:(\"[keywords from Slack message]\") OR \"[keywords from Slack message in body]\"`, within a relevant recent timeframe (e.g., last 7 days).\n3.  **Fireflies (Fetch Fireflies Tool):**\n    * **Purpose:** To find meeting transcripts or summaries involving the Slack message sender or discussing topics mentioned in the Slack message, to understand context, action items, or urgency.\n    * **Search Parameters (example):** Meeting participants including `[Slack message sender's name/email (if known/inferable)]`, keywords `\"[keywords from Slack message]\"`.\n\n**Workflow & Logic:**\n\n**1. Fetch Recent Slack Activity:**\n    * Define a timeframe (e.g., \"messages from the last 24 hours,\" or \"since [timestamp of last check]\").\n    * Retrieve:\n        * New direct messages sent to `@@U057SEMAP6J`.\n        * New messages in channels where `@@U057SEMAP6J` is mentioned.\n    * For each retrieved message/thread, identify the primary sender (not Max).\n\n**2. Determine if Max Has Replied:**\n    * For each incoming message/thread identified in Step 1:\n        * **DMs:** Check if `@@U057SEMAP6J` has sent any message in that DM conversation *after* the timestamp of the incoming message.\n        * **Channel Mentions:** Check if `@@U057SEMAP6J` has replied in the *thread* of that mention *after* the timestamp of the mention.\n        * *(Assumption: A textual reply is required. Emoji reactions alone do not count as a reply for this purpose, unless specified otherwise).*\n\n**3. Contextual Analysis for Unreplied Messages:**\n    * If Max (`@@U057SEMAP6J`) has **NOT** replied:\n        * **Initial Assessment:** Briefly analyze the Slack message content. Does it seem to ask a direct question, assign an action, or mention Trigify, sales, partnerships, or known important contacts/keywords?\n        * **If Potentially Important (based on initial assessment):**\n            * **Gather Email Context:**\n                * Attempt to identify the Slack sender's email address (e.g., from their Slack profile if available, or from a known contacts list).\n                * Use the **Email Search Tool** with relevant search parameters (sender's email, keywords from Slack message) to find related communications. Note any ongoing discussions, urgency, or relevant attachments.\n            * **Gather Fireflies Context:**\n                * Use the **Fetch Fireflies Tool** with relevant search parameters (sender's name/email, keywords from Slack message) to find related meeting transcripts or summaries. Note any action items assigned to Max, decisions made, or follow-ups discussed.\n        * **If NOT Potentially Important (e.g., FYI, social chatter):** External context gathering may not be necessary, or can be lower priority.\n\n**4. Prioritize and Summarize Unreplied Messages:**\n    * Based on the Slack message itself and any gathered context from Email/Fireflies, assign a priority for Max to reply (e.g., High, Medium, Low).\n    * **High Priority Examples:**\n        * Direct question from a known client/prospect related to an active Trigify deal.\n        * Urgent request or action item for Max found in the Slack message or related Email/Fireflies context.\n        * Mention of a critical issue or deadline.\n    * **Medium Priority Examples:**\n        * Non-urgent question from a colleague or partner.\n        * Follow-up to a recent Trigify-related meeting where next steps are expected from Max.\n    * **Low Priority Examples:**\n        * General FYI messages, non-critical updates.\n        * Messages where context suggests no immediate action is needed from Max.\n\n**5. Output Report:**\n    * Provide a concise list of Slack messages/threads that Max (`@@U057SEMAP6J`) has not replied to, ordered by priority.\n    * For each item, include:\n        * **Sender Name & Slack Channel/DM.**\n        * **Brief Snippet of the Slack Message.**\n        * **Date/Time of Message.**\n        * **Assigned Priority (High/Medium/Low).**\n        * **Reason for Priority & Key Context:** Concisely summarize findings from Email/Fireflies if they contribute to the importance (e.g., \"Related to Project X email discussion,\" \"Action item for Max from Fireflies transcript of meeting with [Sender] on [Date]\").\n        * **Suggested Action (Implicit):** Reply to the Slack message.\n\n**Example Output Snippet (Conceptual):**"},"promptType":"define"},"typeVersion":1.9},{"id":"20614cdf-f991-4f47-984c-12cc3e9ebfea","name":"Anthropic Chat Model3","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[1780,40],"parameters":{"model":{"__rl":true,"mode":"list","value":"claude-sonnet-4-20250514","cachedResultName":"Claude Sonnet 4"},"options":{}},"credentials":{"anthropicApi":{"id":"BVgmqTRcPinCIX4S","name":"Anthropic account 3"}},"typeVersion":1.3},{"id":"d08fe78c-d123-40ac-9ec7-611bebc766c2","name":"Google Sheets","type":"n8n-nodes-base.googleSheets","position":[2760,-220],"parameters":{"columns":{"value":{"Date":"={{ $now }}","To-Do":"={{ $json.output }}"},"schema":[{"id":"Date","type":"string","display":true,"required":false,"displayName":"Date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"To-Do","type":"string","display":true,"required":false,"displayName":"To-Do","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1YgZ6vFwDd1JHqIhOdtAUf5zNSmUuS2v-m2nKvhy0a24/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1YgZ6vFwDd1JHqIhOdtAUf5zNSmUuS2v-m2nKvhy0a24","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1YgZ6vFwDd1JHqIhOdtAUf5zNSmUuS2v-m2nKvhy0a24/edit?usp=drivesdk","cachedResultName":"To-Do's"}},"credentials":{"googleSheetsOAuth2Api":{"id":"h6BWkFrOpF4Fixzj","name":"Google Sheets account 4"}},"typeVersion":4.5},{"id":"47f36ebb-d421-46ef-999c-02eb242372a8","name":"Slack2","type":"n8n-nodes-base.slack","position":[3000,-280],"webhookId":"ac3567da-3389-455c-8046-c008deec1a89","parameters":{"text":"=Hi Max,  \n\n{{ $('Master Orchestrator Agent').item.json.output }}","user":{"__rl":true,"mode":"list","value":"U057SEMAP6J","cachedResultName":"max"},"select":"user","otherOptions":{}},"credentials":{"slackApi":{"id":"rMLcAY2NkEYMYzPi","name":"Jarvis Agent - May 2025"}},"typeVersion":2.3},{"id":"07c67d34-e353-4f1b-8684-898b10f90b94","name":"Previous To Do","type":"n8n-nodes-base.googleSheetsTool","position":[2620,-20],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1YgZ6vFwDd1JHqIhOdtAUf5zNSmUuS2v-m2nKvhy0a24/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1YgZ6vFwDd1JHqIhOdtAUf5zNSmUuS2v-m2nKvhy0a24","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1YgZ6vFwDd1JHqIhOdtAUf5zNSmUuS2v-m2nKvhy0a24/edit?usp=drivesdk","cachedResultName":"To-Do's"}},"credentials":{"googleSheetsOAuth2Api":{"id":"h6BWkFrOpF4Fixzj","name":"Google Sheets account 4"}},"typeVersion":4.5},{"id":"7c95c16f-f578-45c1-b718-407b81d6ac4f","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[440,-240],"parameters":{"rule":{"interval":[{"field":"weeks","triggerAtDay":[1,2,3,4,5],"triggerAtHour":8}]}},"typeVersion":1.2}],"active":true,"pinData":{"When clicking ‘Test workflow’":[{"json":{}}]},"settings":{"executionOrder":"v1"},"versionId":"54c20437-4c0f-4453-b66c-a92679d682a6","connections":{"Slack":{"ai_tool":[[]]},"Get User":{"ai_tool":[[{"node":"Slack Assistant","type":"ai_tool","index":0}]]},"Get Email":{"ai_tool":[[{"node":"Email Assistant","type":"ai_tool","index":0}]]},"Check Sent":{"ai_tool":[[{"node":"Email Assistant","type":"ai_tool","index":0}]]},"Check Sent1":{"ai_tool":[[{"node":"Follow Up Assistant","type":"ai_tool","index":0}]]},"Google Sheets":{"main":[[{"node":"Slack2","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"Email Assistant","type":"ai_memory","index":0}]]},"Previous To Do":{"ai_tool":[[{"node":"Master Orchestrator Agent","type":"ai_tool","index":0}]]},"Email Assistant":{"main":[[{"node":"Follow Up Assistant","type":"main","index":0}]]},"Fetch FireFlies":{"ai_tool":[[{"node":"Follow Up Assistant","type":"ai_tool","index":0}]]},"Google Calendar":{"ai_tool":[[{"node":"Follow Up Assistant","type":"ai_tool","index":0}]]},"Slack Assistant":{"main":[[{"node":"Master Orchestrator Agent","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Email Assistant","type":"main","index":0}]]},"Follow Up Assistant":{"main":[[{"node":"Slack Assistant","type":"main","index":0}]]},"Unread Emails - FYI":{"ai_tool":[[{"node":"Email Assistant","type":"ai_tool","index":0}]]},"Anthropic Chat Model":{"ai_languageModel":[[{"node":"Email Assistant","type":"ai_languageModel","index":0}]]},"Check Slack Mentions":{"ai_tool":[[{"node":"Slack Assistant","type":"ai_tool","index":0}]]},"Anthropic Chat Model1":{"ai_languageModel":[[{"node":"Follow Up Assistant","type":"ai_languageModel","index":0}]]},"Anthropic Chat Model2":{"ai_languageModel":[[{"node":"Master Orchestrator Agent","type":"ai_languageModel","index":0}]]},"Anthropic Chat Model3":{"ai_languageModel":[[{"node":"Slack Assistant","type":"ai_languageModel","index":0}]]},"Check Thread Mentions":{"ai_tool":[[{"node":"Slack Assistant","type":"ai_tool","index":0}]]},"Master Orchestrator Agent":{"main":[[{"node":"Google Sheets","type":"main","index":0}]]},"Unread Emails - To Respond":{"ai_tool":[[{"node":"Email Assistant","type":"ai_tool","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Email Assistant","type":"main","index":0}]]}}}


name: Track Website Visibility in Google's AI Overview with SerpAPI and Google Sheets
author_name: hani safaei
author_username: hanisafaei
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.code"]
categories: []
created_at: 2025-06-06T12:40:53.023Z
updated_at: 2025-06-06T12:40:53.023Z
url: https://n8n.io/workflows/4724
scraped_at: 2025-06-19 22:50:14
description:
  This template helps anyone track how often their website appears in Google’s AI Overview. a growing part of search results that can’t currently be tracked using traditional SEO tools. 
  With this workflow, users can:
  Input a list of keywords (from Google Search Console or manual research).
  Use the SerpApi to pull Google search results.
  Extract AI Overview content and its list of sources.
  Map that information into a structured Google Sheet, including whether your site is listed in those sources.

  Setup is straightforward and fully automated, but you'll need: 
  A SerpApi key
  A connected Google Sheets account

  Who is this for?
  This workflow is designed for SEO professionals, digital marketers, and site owners who want to track their website’s visibility in Google AI Overviews.

  What problem does it solve?
  AI Overviews are rapidly becoming more common in Google search results. However, there's no tool (yet) that tells you if your website is appearing in those answers. This is a blind spot for SEO. This workflow helps you check your site’s presence in AI Overviews manually, at scale.

  What does the workflow do?
  The workflow:
  Takes a list of target keywords (exported from GSC or elsewhere)
  Uses SerpApi to get search results from Google
  Extracts the AI Overview block and its sources
  Checks if your domain is among them
  Saves all results into a Google Sheet 

  The final Google Sheet will contain: Keyword | AI Overview Exists | List of Sources | Is my domain listed

  Setup
  You’ll need:
  A SerpApi API key
  A Google Sheet with your list of keywords
  A connected Google Sheets account in n8n

  How to customize this workflow
  Change the list of keywords (pull from GSC or edit the sheet manually)
  Replace the placeholder domain with your own
  Adjust the Google Sheet column mapping as needed

workflow_json:
  {"id":"shX725h2cWsFKRQb","meta":{"instanceId":"04dabdf85d6550d014aeca800665040b7fdcb79ef759175bf2a5447cf87841e2","templateCredsSetupCompleted":true},"name":"Track AI Overview Visibility for SEO in Google Search","tags":[{"name":"SEO"},{"name":"serpapi"},{"name":"ai overview"},{"name":"google"},{"name":"marketing"}],"nodes":[{"id":"0702eba7-d055-40e9-9e6e-e6e77fa9d281","name":"Start: Manual trigger","type":"n8n-nodes-base.manualTrigger","position":[0,0],"parameters":{},"typeVersion":1},{"id":"4595fae4-57bb-4405-abf8-05eb134c774f","name":"Read Keywords from Google Sheet","type":"n8n-nodes-base.googleSheets","position":[220,0],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1h1zsgmNjrXjC5_40KiF0ZLUvN00gDAswLTUMp5bas88/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1h1zsgmNjrXjC5_40KiF0ZLUvN00gDAswLTUMp5bas88","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1h1zsgmNjrXjC5_40KiF0ZLUvN00gDAswLTUMp5bas88/edit?usp=drivesdk","cachedResultName":"AI Overview Keywords"}},"credentials":{"googleSheetsOAuth2Api":{"id":"T0hgOTWnix28WoNP","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"21e4edfb-2caf-401a-afd4-03b86723de62","name":"Call SerpApi for AI Overview","type":"n8n-nodes-base.httpRequest","position":[400,0],"parameters":{"url":"https://serpapi.com/search.json","options":{},"sendQuery":true,"queryParameters":{"parameters":[{"name":"q","value":"={{ $json[\"keyword\"] }}"},{"name":"api_key","value":"Your SerpAPI key"}]}},"typeVersion":4.2},{"id":"494614bf-fb0a-4c7c-842b-a4ec0e0bbd7a","name":"Extract Sources & Check My Domain","type":"n8n-nodes-base.code","position":[620,0],"parameters":{"jsCode":"const myDomain = \"example.com\"; // 🔄 Replace with your domain, e.g., \"mywebsite.com\"\n\nreturn items.map(item => {\n  const overview = item.json.ai_overview;\n  const keyword = item.json.search_parameters?.q || '';\n\n  if (!overview || !overview.references) {\n    return {\n      json: {\n        keyword,\n        ai_overview_exists: false,\n        links: [],\n        is_my_domain_listed: false\n      }\n    };\n  }\n\n  const links = overview.references\n    .filter(ref => ref.link)\n    .map(ref => ref.link);\n\n  const isMyDomainListed = links.some(link => link.includes(myDomain));\n\n  return {\n    json: {\n      keyword,\n      ai_overview_exists: true,\n      links,\n      is_my_domain_listed: isMyDomainListed\n    }\n  };\n});"},"typeVersion":2},{"id":"23361f22-1273-4797-8558-9cf9a38693b4","name":"Write Results to Google Sheet","type":"n8n-nodes-base.googleSheets","position":[840,0],"parameters":{"columns":{"value":{"links":"={{ $json.links }}","keyword":"={{ $json.keyword }}","has_ai_overview":"={{ $json.ai_overview_exists }}","is_my_domain_listed":"={{ $json.is_my_domain_listed }}"},"schema":[{"id":"keyword","type":"string","display":true,"removed":false,"required":false,"displayName":"keyword","defaultMatch":false,"canBeUsedToMatch":true},{"id":"has_ai_overview","type":"string","display":true,"removed":false,"required":false,"displayName":"has_ai_overview","defaultMatch":false,"canBeUsedToMatch":true},{"id":"links","type":"string","display":true,"removed":false,"required":false,"displayName":"links","defaultMatch":false,"canBeUsedToMatch":true},{"id":"is_my_domain_listed","type":"string","display":true,"removed":false,"required":false,"displayName":"is_my_domain_listed","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1ixDyGqYWB0QJzqxOKvA0T591SNY46j_u2J4CHOZ6qpo/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1ixDyGqYWB0QJzqxOKvA0T591SNY46j_u2J4CHOZ6qpo","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1ixDyGqYWB0QJzqxOKvA0T591SNY46j_u2J4CHOZ6qpo/edit?usp=drivesdk","cachedResultName":"SERP AI Overview Citations"}},"credentials":{"googleSheetsOAuth2Api":{"id":"T0hgOTWnix28WoNP","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"12c76730-922d-4f84-a68d-b19fb8fa20e6","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-240,-220],"parameters":{"color":5,"width":520,"height":200,"content":"## Track Google AI Overview Presence for SEO\n1. **Read** keyword list from Google Sheets  \n2. **Call** SerpApi for each keyword  \n3. **Extract** AI Overview sources from the results  \n4. **Check** if your domain is listed in the sources  \n5. **Save** the results back into Google Sheets\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"24d46818-a673-4f43-8d8e-809c1f236838","connections":{"Start: Manual trigger":{"main":[[{"node":"Read Keywords from Google Sheet","type":"main","index":0}]]},"Call SerpApi for AI Overview":{"main":[[{"node":"Extract Sources & Check My Domain","type":"main","index":0}]]},"Read Keywords from Google Sheet":{"main":[[{"node":"Call SerpApi for AI Overview","type":"main","index":0}]]},"Extract Sources & Check My Domain":{"main":[[{"node":"Write Results to Google Sheet","type":"main","index":0}]]}}}


name: Automate Candidate Screening with LlamaIndex & GPT-4o-mini for Personalized Email Responses
author_name: Khairul Muhtadin
author_username: khmuhtadin
categories: []
created_at: 2025-06-06T13:27:49.918Z
updated_at: 2025-06-06T13:27:49.918Z
url: https://n8n.io/workflows/4727
scraped_at: 2025-06-19 22:50:32
description:
  This n8n workflow — HRMate — streamlines your entire recruitment process by automatically parsing incoming job applications, evaluating candidate fit using AI, and sending personalized acceptance or rejection emails — all without manual intervention.

  It triggers on every new email application, extracts candidate info and attachments (PDF resumes), leverages* LlamaIndex AI* for content parsing, then scores candidates against job requirements via OpenAI. Finally, it sends tailored emails and updates candidate status automatically.

  💡 Why Use HRMate Fix?

  Save hours** of manual CV screening and email replies
  Never ghost applicants again** — automatic, polite rejections with AI-generated growth suggestions
  Increase hiring accuracy** with AI-assisted candidate scoring
  Centralize communication** with auto-acceptance invites including calendly scheduling links
  Fully customizable and scalable for multiple job openings

  ⚡ Who Is This For?

  HR teams overwhelmed with incoming applications
  Small businesses wanting professional recruitment automation
  Recruiters seeking data-driven candidate assessments
  Companies aiming to improve applicant experience and speed

  ❓ What Problem Does It Solve?

  Screening candidates manually is slow, inconsistent, and often leads to candidates being ignored (ghosted). HRMate Fix automates parsing, evaluation, and personalized email communication, drastically reducing workload and improving candidate engagement.

  🔧 What This Workflow Does

  ⏱ Trigger: On every new incoming email application via Gmail Trigger (polls every minute)
  📎 Attachment Check: Detects and uploads PDF resumes to LlamaIndex AI for parsing
  🔍 Parsing: Waits and retrieves clean markdown text of candidate documents
  🤖 AI Evaluation: Matches candidate profile against job criteria using GPT-4o-mini, scoring fit from 1 to 100
  💌 Email Communication:

    If score ≥ 80 → sends acceptance email with calendly interview scheduling link
    If score &lt; 80 → sends rejection email with professional, motivational feedback generated by AI
  🗂 Status Update: Marks candidate as accepted/rejected and optionally updates Google Sheets

  🔐 Setup Instructions

  Import .json workflow into n8n
  Add credentials:

     Gmail OAuth2 (trigger & email sending)
     LlamaIndex API key (for PDF parsing)
     OpenAI API key (GPT-4o-mini model for evaluation)
  Customize job criteria in "Set Job Criteria Text" node
  Update email templates and calendly links as needed
  Test workflow with real incoming applications

  🧩 Pre-Requirements

  n8n instance (self-hosted or cloud)
  Gmail account with API credentials
  LlamaIndex API access
  OpenAI API key
  Google Sheets (optional, for status tracking)

  🛠️ Customize It Further

  Add new job positions by replicating job criteria and subject filters
  Modify evaluation criteria or prompts in OpenAI node
  Integrate Slack or other notification nodes
  Adjust email content and branding for acceptance/rejection messages

  🧠 Nodes Used

  Gmail Trigger
  HTTP Request (LlamaIndex API)
  Wait node (poll parsing status)
  Code node (markdown cleaning)
  OpenAI GPT-4o-mini node (candidate evaluation)
  IF nodes (conditional email flow)
  Gmail node (send acceptance/rejection emails)
  Set nodes (data preparation & status marking)
  Google Sheets (optional update)
  Sticky Notes for documentation

  📞 Support

  Created by Khmuhtadin Automation Studio
  Website: khmuhtadin.com

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

workflow_json:
  {"id":"8dqwl5tpx0XjJNKX","meta":{"instanceId":"c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c","templateCredsSetupCompleted":true},"name":"HRMate Fix","tags":[],"nodes":[{"id":"68b38626-5c34-4c5a-8e6a-ce6711af9b82","name":"☁️ Upload PDF to LlamaIndex","type":"n8n-nodes-base.httpRequest","position":[700,-760],"parameters":{},"typeVersion":4.2},{"id":"441843b0-35cc-4ddf-bb84-a43c900fa8f2","name":"⏳ Check Parsing Status","type":"n8n-nodes-base.httpRequest","position":[920,-760],"parameters":{},"typeVersion":4.2},{"id":"7f16b44d-4a83-4e7d-9c14-0bd3492f4877","name":"🔁 Condition: Was Parsing Successful?","type":"n8n-nodes-base.if","position":[1140,-760],"parameters":{},"typeVersion":2.2},{"id":"7dc90ea4-53e9-4f34-877d-2c3fcfd88cf2","name":" ⏱ Delay Before Recheck","type":"n8n-nodes-base.wait","position":[1380,-720],"webhookId":"ca671b23-f9b8-4bbd-a42c-286b9ed7e23f","parameters":{},"typeVersion":1.1},{"id":"adb0df03-21fa-42d1-8644-c2e33f548664","name":" 📥 Get Parsed Markdown Result","type":"n8n-nodes-base.httpRequest","position":[1380,-900],"parameters":{},"typeVersion":4.2},{"id":"38208667-9c49-413f-97aa-03ba37a0b30b","name":" 🧼 Clean Markdown Text","type":"n8n-nodes-base.code","position":[1620,-900],"parameters":{},"typeVersion":2},{"id":"206f38e7-57f0-4b74-8160-f80201c62539","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","position":[480,-340],"parameters":{},"typeVersion":1},{"id":"d300455f-ef89-4161-a573-94551f1fa7d7","name":"Gmail Trigger - Incoming Applications","type":"n8n-nodes-base.gmailTrigger","position":[-440,-280],"parameters":{},"typeVersion":1},{"id":"6e02a179-9a8d-4ff1-88a7-f09b2cf73762","name":"\tSet Job Criteria Text","type":"n8n-nodes-base.set","position":[-200,-280],"parameters":{},"typeVersion":3.4},{"id":"b36435fc-4e5d-4016-89bb-e1965cf19705","name":"\tExtract Email Body Text","type":"n8n-nodes-base.set","position":[0,-280],"parameters":{},"typeVersion":3.4},{"id":"496375c2-c627-4128-9c2d-2a710c068ce9","name":"\tCheck Subject Validity","type":"n8n-nodes-base.if","position":[220,-280],"parameters":{},"typeVersion":2.2},{"id":"b47142e2-d94e-4d55-a591-66d105e6d408","name":"Check If PDF Attachment Exists","type":"n8n-nodes-base.if","position":[480,-560],"parameters":{},"typeVersion":1},{"id":"10936540-f4f6-47c5-bbba-2d10dd062653","name":"\tPrepare Data for OpenAI","type":"n8n-nodes-base.set","position":[1820,-540],"parameters":{},"typeVersion":3.4},{"id":"e5df09b6-b015-4b26-b766-a59bfcc9284b","name":"\tEvaluate Candidate with OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[660,-240],"parameters":{},"typeVersion":1.8},{"id":"e2b4f1b2-9288-401d-9424-8ab92191e3b3","name":"\tFinal Decision Check","type":"n8n-nodes-base.if","position":[980,-240],"parameters":{},"typeVersion":1},{"id":"c8d6083c-a97e-4566-b1fb-0a6297a2f4a5","name":"\tSend Acceptance","type":"n8n-nodes-base.gmail","position":[1200,-340],"parameters":{},"typeVersion":1},{"id":"fb11ce15-8477-477e-8174-906575bf3041","name":"\tSend Rejection","type":"n8n-nodes-base.gmail","position":[1200,-140],"parameters":{},"typeVersion":1},{"id":"0e41269a-4a62-4714-ab78-afa3ebb28bf0","name":"\tMark as Accepted","type":"n8n-nodes-base.set","position":[1380,-340],"parameters":{},"typeVersion":1},{"id":"8024bdc5-d109-42ce-88fe-0c45cfbd11e7","name":"\tMark as Rejected","type":"n8n-nodes-base.set","position":[1380,-140],"parameters":{},"typeVersion":1},{"id":"afa7ef69-24c6-4cc4-a59e-a24030ce3587","name":"\tUpdate Candidate Status on Google Sheets","type":"n8n-nodes-base.googleSheets","disabled":true,"position":[1640,-220],"parameters":{},"typeVersion":1},{"id":"552c28ef-ddea-4078-bc88-feeb1963dfd3","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[420,-1020],"parameters":{"content":""},"typeVersion":1},{"id":"da02b312-49ad-4195-8a1d-451828e63c57","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[440,-940],"parameters":{"content":""},"typeVersion":1},{"id":"2db2d480-71b2-4489-b4c8-451a33e354c2","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-540,-1020],"parameters":{"content":""},"typeVersion":1},{"id":"3ed78cbd-9c40-46a7-9a34-ad8ab22b0ee2","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-480,-940],"parameters":{"content":""},"typeVersion":1},{"id":"eb61b244-2a80-40a9-9d3a-d138d3a7fd77","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[420,-380],"parameters":{"content":""},"typeVersion":1},{"id":"58bd8748-4e8f-4929-950f-730391688d40","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[460,-100],"parameters":{"content":""},"typeVersion":1},{"id":"8f486468-7fb1-4f17-a5a9-7ddbf82c1aa1","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1720,-580],"parameters":{"content":""},"typeVersion":1},{"id":"6998f74d-8bb7-466a-97db-7afee60ef13c","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-540,60],"parameters":{"content":""},"typeVersion":1},{"id":"1b0336dc-77fa-48d2-aafb-953785753948","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-200,60],"parameters":{"content":""},"typeVersion":1},{"id":"f0c872a8-efb9-4ece-add5-f85036730e40","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[120,60],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"9da0560e-8df9-4d71-8aa9-a1d750af3eac","connections":{"\tSend Rejection":{"main":[[{"node":"\tMark as Rejected","type":"main","index":0}]]},"\tSend Acceptance":{"main":[[{"node":"\tMark as Accepted","type":"main","index":0}]]},"\tMark as Accepted":{"main":[[{"node":"\tUpdate Candidate Status on Google Sheets","type":"main","index":0}]]},"\tMark as Rejected":{"main":[[{"node":"\tUpdate Candidate Status on Google Sheets","type":"main","index":0}]]},"\tFinal Decision Check":{"main":[[{"node":"\tSend Acceptance","type":"main","index":0}],[{"node":"\tSend Rejection","type":"main","index":0}]]},"\tSet Job Criteria Text":{"main":[[{"node":"\tExtract Email Body Text","type":"main","index":0}]]},"\tCheck Subject Validity":{"main":[[{"node":"Check If PDF Attachment Exists","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"\tExtract Email Body Text":{"main":[[{"node":"\tCheck Subject Validity","type":"main","index":0}]]},"\tPrepare Data for OpenAI":{"main":[[{"node":"\tEvaluate Candidate with OpenAI","type":"main","index":0}]]},"⏳ Check Parsing Status":{"main":[[{"node":"🔁 Condition: Was Parsing Successful?","type":"main","index":0}]]}," ⏱ Delay Before Recheck":{"main":[[{"node":"⏳ Check Parsing Status","type":"main","index":0}]]}," 🧼 Clean Markdown Text":{"main":[[{"node":"\tPrepare Data for OpenAI","type":"main","index":0}]]},"Check If PDF Attachment Exists":{"main":[[{"node":"☁️ Upload PDF to LlamaIndex","type":"main","index":0}],[{"node":"\tPrepare Data for OpenAI","type":"main","index":0}]]},"\tEvaluate Candidate with OpenAI":{"main":[[{"node":"\tFinal Decision Check","type":"main","index":0}]]},"☁️ Upload PDF to LlamaIndex":{"main":[[{"node":"⏳ Check Parsing Status","type":"main","index":0}]]}," 📥 Get Parsed Markdown Result":{"main":[[{"node":" 🧼 Clean Markdown Text","type":"main","index":0}]]},"Gmail Trigger - Incoming Applications":{"main":[[{"node":"\tSet Job Criteria Text","type":"main","index":0}]]},"🔁 Condition: Was Parsing Successful?":{"main":[[{"node":" 📥 Get Parsed Markdown Result","type":"main","index":0}],[{"node":" ⏱ Delay Before Recheck","type":"main","index":0}]]}}}


name: Startup Founder Discovery and AI-Powered Outreach with CrunchBase and Gmail
author_name: Yaron Been
author_username: yaron-nofluff
categories: []
created_at: 2025-06-06T13:39:30.662Z
updated_at: 2025-06-06T13:39:30.662Z
url: https://n8n.io/workflows/4729
scraped_at: 2025-06-19 22:49:08
description:
  🚀 Automated Founder Discovery: CrunchBase to Gmail Outreach Workflow!

  Workflow Overview
  This cutting-edge n8n automation is a sophisticated founder intelligence and outreach tool designed to transform startup research into actionable networking opportunities. By intelligently connecting CrunchBase, OpenAI, and Gmail, this workflow:

  Discovers Startup Founders: 
     Automatically retrieves founder profiles
     Tracks latest company updates
     Eliminates manual research efforts

  Intelligent Profile Processing:
     Extracts key professional information
     Filters most relevant details
     Prepares comprehensive founder insights

  AI-Powered Summarization:
     Generates professional email-ready summaries
     Crafts personalized outreach content
     Ensures high-quality communication

  Seamless Email Distribution:
     Sends automated founder digests
     Integrates with Gmail
     Enables rapid professional networking

  Key Benefits
  🤖 Full Automation: Zero-touch founder research
  💡 Smart Profiling: Intelligent founder insights
  📊 Comprehensive Intelligence: Detailed professional summaries
  🌐 Multi-Platform Synchronization: Seamless data flow

  Workflow Architecture

  🔹 Stage 1: Founder Discovery
  Manual Trigger**: Workflow initiation
  CrunchBase API Integration**: Profile retrieval
  Intelligent Filtering**:
    Identifies key startup founders
    Prepares for detailed analysis

  🔹 Stage 2: Profile Extraction
  Detailed Information Capture**
  Key Field Mapping**
  Structured Data Preparation**

  🔹 Stage 3: AI Summarization
  OpenAI GPT Processing**
  Professional Summary Generation**
  Contextual Insight Creation**

  🔹 Stage 4: Email Distribution
  Gmail Integration**
  Automated Outreach**
  Personalized Communication**

  Potential Use Cases
  Venture Capitalists**: Startup scouting
  Sales Teams**: Lead generation
  Recruitment Specialists**: Talent discovery
  Networking Professionals**: Strategic connections
  Startup Ecosystem Researchers**: Market intelligence

  Setup Requirements
  CrunchBase API
     API credentials
     Configured access permissions
     Founder tracking setup

  OpenAI API
     GPT model access
     Summarization configuration
     API key management

  Gmail Account
     Connected email
     Outreach email configuration
     Appropriate sending permissions

  n8n Installation
     Cloud or self-hosted instance
     Workflow configuration
     API credential management

  Future Enhancement Suggestions
  🤖 Advanced founder scoring
  📊 Multi-source intelligence gathering
  🔔 Customizable alert mechanisms
  🌐 Expanded networking platform integration
  🧠 Machine learning insights generation

  Technical Considerations
  Implement robust error handling
  Use secure API authentication
  Maintain flexible data processing
  Ensure compliance with API usage guidelines

  Ethical Guidelines
  Respect professional privacy
  Maintain transparent outreach practices
  Ensure appropriate communication
  Provide opt-out mechanisms

  Hashtag Performance Boost 🚀
  #StartupNetworking #FounderDiscovery #AIOutreach #ProfessionalNetworking #TechInnovation #BusinessIntelligence #AutomatedResearch #StartupScouting #ProfessionalGrowth #NetworkingTech

  Workflow Visualization

  [Manual Trigger]
      ⬇️
  [Updated Profiles List]
      ⬇️
  [Founder Profiles]
      ⬇️
  [Extract Key Fields]
      ⬇️
  [AI Summarization]
      ⬇️
  [Send Email]

  Connect With Me

  Ready to revolutionize your professional networking?

  📧 Email: Yaron@nofluff.online

  🎥 YouTube: @YaronBeen

  💼 LinkedIn: Yaron Been

  Transform your founder research with intelligent, automated workflows!

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.gmail","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.outputParserStructured"]

workflow_json:
  {"id":"yNl6TycBIVr4r9Ef","meta":{"instanceId":"84ad02d6104594179f43f1ce9cfe3a81637b2faedb57dafcb9e649b7542988db","templateCredsSetupCompleted":true},"name":"Cruchbase email outreach","tags":[],"nodes":[{"id":"4a5a04cc-062d-4822-b690-61d072bf1e88","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1220,220],"parameters":{"jsonSchemaExample":"{\n  \"subject\": \"🚀 Startup Founder Highlights for Outreach - June 6, 2025\",\n  \"body\": \"🚀 Here's a summary of promising startup founders for potential outreach:\\n\\n🔹 **Jane Doe**\\nCo-Founder & CEO at Acme AI. She is a serial entrepreneur with over 10 years of experience in AI and SaaS startups. Educated at Stanford University with an MBA. You can find her on LinkedIn: https://www.linkedin.com/in/janedoe.\\n\\n🔹 **John Smith**\\nCTO at GreenLoop. Passionate about sustainable packaging innovation and technology leadership. Holds a Bachelor’s degree in Environmental Engineering from MIT. Connect on LinkedIn: https://www.linkedin.com/in/johnsmith.\"\n}\n"},"typeVersion":1.2},{"id":"05aaede3-213d-43f3-b42f-c1c7188c6b3b","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1000,220],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"wYwTjEv45IzlAOAu","name":"OpenAi account 2"}},"typeVersion":1.2},{"id":"02c283da-ace1-41f0-a298-ac89882b0c1d","name":"Updated profiles List","type":"n8n-nodes-base.httpRequest","position":[220,0],"parameters":{"url":"https://api.crunchbase.com/api/v4/relationships/organizations/1234abcd-5678-efgh-ijkl-9012mnop3456/people","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"page","value":"1"}]},"headerParameters":{"parameters":[{"name":"X-Cb-User-Key","value":"YOUR_API_KEY_HERE"}]}},"typeVersion":4.2},{"id":"3f0723a9-73eb-43be-834b-bc2a8c5d9c50","name":"Founder Profiles by UUID","type":"n8n-nodes-base.httpRequest","position":[500,0],"parameters":{"url":"=https://api.crunchbase.com/api/v4/entities/people/{{ $json.data.items[0].uuid }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"X-Cb-User-Key","value":"YOUR_API_KEY_HERE"}]}},"typeVersion":4.2},{"id":"25dcbcc9-5155-4d61-b4b7-ce5e9646b56e","name":"Extract Key Profile Fields","type":"n8n-nodes-base.set","position":[720,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"eeff9c2c-fe9f-4f6c-a030-99ff87308529","name":"Full name","type":"string","value":"={{ $json.data.properties.full_name }}"},{"id":"1ba5a408-31b3-409e-a7bf-95f708b0374a","name":"Title","type":"string","value":"={{ $json.data.properties.title }}"},{"id":"c8344897-be61-47cd-b7fd-3d932644ad07","name":"biography","type":"string","value":"={{ $json.data.properties.biography }}"},{"id":"28ee7b7a-1d5d-46fd-aa35-b9e767626ba3","name":"Education","type":"string","value":"={{ $json.data.properties.education }}"},{"id":"10271203-a0c9-4b16-b88e-4999e210bf03","name":"Social Links","type":"string","value":"={{ $json.data.properties.social_links }}"},{"id":"6144bd09-cbf4-4c27-800b-3b0552c0f5ca","name":"Associated companies","type":"string","value":"={{ $json.data.properties.associated_companies }}"}]}},"typeVersion":3.4},{"id":"8734c81e-515f-481f-aa1e-70ef7bd4ddab","name":"Summarizer Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1020,0],"parameters":{"text":"=Full name: {{ $json['Full name'] }}\nTitle: {{ $json.Title }}\nbiography: {{ $json.biography }}\nEducation: {{ $json.Education }}\nSocial Links: {{ $json['Social Links'] }}\nAssociated companies: {{ $json['Associated companies'] }}\n","options":{"systemMessage":"You are an expert at writing concise, professional summaries for business email outreach. Given detailed information about a person’s professional profile, your task is to generate a short summary focusing only on the most relevant information for outreach emails.\n\nOnly include:\n- Full name\n- Current title/role\n- Brief, relevant part of the biography (max 1-2 sentences)\n- Key education highlights (school and degree)\n- Social links (only LinkedIn or Twitter if available)\n- Most relevant associated company (name and role)\n\nDo NOT include unnecessary details. Make the summary clear, engaging, and suitable for a personalized outreach email introduction."},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"738f7615-bc05-4335-8a93-d4025c8cf885","name":"Send email for outreach","type":"n8n-nodes-base.gmail","position":[1380,0],"webhookId":"2aefe416-f9e3-4b15-82c0-3314acc97048","parameters":{"sendTo":"shahkar.genai@gmail.com","message":"={{ $json.output.body }}","options":{"appendAttribution":false},"subject":"=CrunchBase profile for outreach"},"credentials":{"gmailOAuth2":{"id":"noKcKj5FEpHHvboL","name":"Gmail account"}},"typeVersion":2.1},{"id":"d359f26d-fe8d-4d34-a96c-42b176b946a1","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[0,0],"parameters":{},"typeVersion":1},{"id":"3529f772-cb46-4145-ba2e-f115dce37db4","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-40,-1040],"parameters":{"color":7,"width":420,"height":1220,"content":"## 🔁 **SECTION 1: Trigger + Company Fetching**\n\n**🧱 Nodes:**\n\n* 🔘 **Manual Trigger**\n* 🌐 **HTTP Request – Fetch: Updated Companies List**\n\n---\n\n### 🚀 What This Section Does\n\n🔘 **Manual Trigger**\nThis allows you to manually run the automation anytime you want. Perfect for testing or when you only want to fetch founder data on demand (instead of a scheduled time).\n\n🌐 **HTTP Request – Fetch: Updated Companies List**\nThis node connects to the **Crunchbase API** to get a list of the latest startups or companies that have been updated recently.\n\n#### 🔧 What You Can Customize\n\n🛠️ **Page Query**:\nIn the URL or query parameters, you'll find something like `page=1`.\n➡️ You can manually change this to `page=2`, `page=3`, etc., to explore other sets of companies.\n\n🛠️ **Date Filter**:\nThe `updated_since` parameter can also be changed to look for startups updated within a certain time window.\n\n---\n\n"},"typeVersion":1},{"id":"c10bafbe-3d3b-4cce-b8a0-5d725a98ffb7","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[440,-1160],"parameters":{"color":3,"width":440,"height":1340,"content":"## 👤 **SECTION 2: Founder Profile Fetching + Field Mapping**\n\n**🧱 Nodes:**\n\n* 🌐 **HTTP Request – Fetch: Founder Profiles by UUID**\n* ✏️ **Edit Fields – Extract Key Profile Data**\n\n---\n\n### 🔎 What This Section Does\n\n🌐 **HTTP Request – Fetch: Founder Profiles by UUID**\nFor each company fetched in Section 1, this node pulls the **detailed profile** of one person (typically a founder, CEO, or C-level executive).\n\n✏️ **Edit Fields – Extract Key Profile Data**\nThis step takes the raw profile data and selects only the fields we care about:\n✅ Full Name,\n✅ Title,\n✅ Biography,\n✅ Education,\n✅ Social Links,\n✅ Associated Companies\n\n#### 🔧 What You Can Customize\n\n🔢 **Person Indexing**:\nIn this node’s configuration, you can find the list of people associated with a company.\n➡️ To switch from Founder #1 to Founder #2, change the **item number** or **array index** — for example, from `[0]` to `[1]`.\n\n💡 This is useful when a company has **multiple co-founders** or key executives you may want to evaluate separately.\n\n---\n\n"},"typeVersion":1},{"id":"e8c27235-f214-444e-8b1a-5e445e65e0af","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[940,-640],"parameters":{"color":6,"width":580,"height":1020,"content":"## 🤖📨 **SECTION 3: AI-Powered Summary + Email Outreach**\n\n**🧱 Nodes:**\n\n* 🤖 **AI Agent – Generate Email Summary**\n* 📧 **Gmail – Send Founder Digest**\n\n---\n\n### 🧠 What This Section Does\n\n🤖 **AI Agent – Generate Email Summary**\nThis uses **OpenAI’s GPT model** with a **Structured Output Parser** to turn the extracted profile into a polished, professional email-ready summary.\nIt's trained to output:\n\n> Jane Doe is currently Co-Founder & CEO at Acme AI. She is a serial entrepreneur with 10+ years in AI and SaaS. Educated at Stanford (MBA). Connect on LinkedIn: [https://linkedin.com/in/janedoe](https://linkedin.com/in/janedoe)\n\n📧 **Gmail – Send Founder Digest**\nFinally, this node **sends the email** — which could go to your team, your CRM, or even directly to your inbox — with a subject like:\n\n> 🚀 Startup Founder Highlights for Outreach - June 6, 2025\n\n"},"typeVersion":1},{"id":"fd781b49-45c0-4006-bb22-7d82ff3f4e31","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-1580,-1040],"parameters":{"color":4,"width":1300,"height":320,"content":"=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"},"typeVersion":1},{"id":"9b478bcf-5ba5-4edf-91a6-61e3fffa1078","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1580,-700],"parameters":{"color":4,"width":1289,"height":2558,"content":"## 🔁 **SECTION 1: Trigger + Company Fetching**\n\n**🧱 Nodes:**\n\n* 🔘 **Manual Trigger**\n* 🌐 **HTTP Request – Fetch: Updated Companies List**\n\n---\n\n### 🚀 What This Section Does\n\n🔘 **Manual Trigger**\nThis allows you to manually run the automation anytime you want. Perfect for testing or when you only want to fetch founder data on demand (instead of a scheduled time).\n\n🌐 **HTTP Request – Fetch: Updated Companies List**\nThis node connects to the **Crunchbase API** to get a list of the latest startups or companies that have been updated recently.\n\n#### 🔧 What You Can Customize\n\n🛠️ **Page Query**:\nIn the URL or query parameters, you'll find something like `page=1`.\n➡️ You can manually change this to `page=2`, `page=3`, etc., to explore other sets of companies.\n\n🛠️ **Date Filter**:\nThe `updated_since` parameter can also be changed to look for startups updated within a certain time window.\n\n---\n\n## 👤 **SECTION 2: Founder Profile Fetching + Field Mapping**\n\n**🧱 Nodes:**\n\n* 🌐 **HTTP Request – Fetch: Founder Profiles by UUID**\n* ✏️ **Edit Fields – Extract Key Profile Data**\n\n---\n\n### 🔎 What This Section Does\n\n🌐 **HTTP Request – Fetch: Founder Profiles by UUID**\nFor each company fetched in Section 1, this node pulls the **detailed profile** of one person (typically a founder, CEO, or C-level executive).\n\n✏️ **Edit Fields – Extract Key Profile Data**\nThis step takes the raw profile data and selects only the fields we care about:\n✅ Full Name,\n✅ Title,\n✅ Biography,\n✅ Education,\n✅ Social Links,\n✅ Associated Companies\n\n#### 🔧 What You Can Customize\n\n🔢 **Person Indexing**:\nIn this node’s configuration, you can find the list of people associated with a company.\n➡️ To switch from Founder #1 to Founder #2, change the **item number** or **array index** — for example, from `[0]` to `[1]`.\n\n💡 This is useful when a company has **multiple co-founders** or key executives you may want to evaluate separately.\n\n---\n\n## 🤖📨 **SECTION 3: AI-Powered Summary + Email Outreach**\n\n**🧱 Nodes:**\n\n* 🤖 **AI Agent – Generate Email Summary**\n* 📧 **Gmail – Send Founder Digest**\n\n---\n\n### 🧠 What This Section Does\n\n🤖 **AI Agent – Generate Email Summary**\nThis uses **OpenAI’s GPT model** with a **Structured Output Parser** to turn the extracted profile into a polished, professional email-ready summary.\nIt's trained to output:\n\n> Jane Doe is currently Co-Founder & CEO at Acme AI. She is a serial entrepreneur with 10+ years in AI and SaaS. Educated at Stanford (MBA). Connect on LinkedIn: [https://linkedin.com/in/janedoe](https://linkedin.com/in/janedoe)\n\n📧 **Gmail – Send Founder Digest**\nFinally, this node **sends the email** — which could go to your team, your CRM, or even directly to your inbox — with a subject like:\n\n> 🚀 Startup Founder Highlights for Outreach - June 6, 2025\n\n#### 🛠️ What You Can Customize\n\n* ✍️ Change the **recipient** to your sales or outreach inbox\n* 🖋️ Modify the **subject line** to match your brand or campaign\n* 📬 Send to **multiple emails** using a comma-separated list\n\n---\n\n## ✅ Final Thoughts: How You Can Use This\n\nThis workflow is perfect for:\n\n* 🚀 Startup Scouts\n* 📬 Cold Outreach Campaigns\n* 🧠 VC Analysts or Tech Researchers\n* 🧩 Enriching founder data in your CRM\n\n💥 **No more copy-pasting Crunchbase profiles manually!**\nJust trigger the workflow, skim the summaries, and reach out.\n\n---\n\n"},"typeVersion":1}],"active":false,"pinData":{"Updated profiles List":[{"json":{"data":{"items":[{"type":"person","uuid":"abc123-def456","identifier":{"value":"Jane Doe","api_path":"https://api.crunchbase.com/api/v4/entities/people/abc123-def456","image_id":null,"permalink":"person/jane-doe"},"properties":{"title":"Co-Founder & CEO","last_name":"Doe","created_at":"2024-06-01T10:00:00Z","first_name":"Jane","started_on":"2023-01-10","entity_def_id":"person"}},{"type":"person","uuid":"xyz789-pqr012","identifier":{"value":"John Smith","api_path":"https://api.crunchbase.com/api/v4/entities/people/xyz789-pqr012","image_id":null,"permalink":"person/john-smith"},"properties":{"title":"CTO","last_name":"Smith","created_at":"2024-06-01T10:30:00Z","first_name":"John","started_on":"2023-01-10","entity_def_id":"person"}}],"paging":{"total_items":2,"current_page":1}}}}],"Founder Profiles by UUID":[{"json":{"data":{"type":"person","uuid":"abc123-def456","identifier":{"value":"Jane Doe","api_path":"https://api.crunchbase.com/api/v4/entities/people/abc123-def456","permalink":"person/jane-doe"},"properties":{"title":"Co-Founder & CEO","biography":"Jane Doe is a serial entrepreneur with over 10 years of experience in AI and SaaS startups.","education":[{"degree":"MBA","end_year":2012,"start_year":2010,"school_name":"Stanford University","field_of_study":"Business Administration"}],"full_name":"Jane Doe","last_name":"Doe","created_at":"2024-06-01T10:00:00Z","first_name":"Jane","updated_at":"2024-06-10T12:00:00Z","social_links":{"twitter":"https://twitter.com/janedoe","linkedin":"https://www.linkedin.com/in/janedoe"},"associated_companies":[{"name":"Acme AI","role":"Co-Founder & CEO","uuid":"1234abcd-5678-efgh-ijkl-9012mnop3456","api_path":"https://api.crunchbase.com/api/v4/entities/organizations/1234abcd-5678-efgh-ijkl-9012mnop3456"},{"name":"NextGen Tech","role":"Advisor","uuid":"7890qrst-uvwx-1234-yzab-5678cdef9012","api_path":"https://api.crunchbase.com/api/v4/entities/organizations/7890qrst-uvwx-1234-yzab-5678cdef9012"}]}}}}]},"settings":{"executionOrder":"v1"},"versionId":"ddab3a6c-8291-44bb-87bb-9085d4ce845a","connections":{"Summarizer Agent":{"main":[[{"node":"Send email for outreach","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Summarizer Agent","type":"ai_languageModel","index":0}]]},"Updated profiles List":{"main":[[{"node":"Founder Profiles by UUID","type":"main","index":0}]]},"Founder Profiles by UUID":{"main":[[{"node":"Extract Key Profile Fields","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Summarizer Agent","type":"ai_outputParser","index":0}]]},"Extract Key Profile Fields":{"main":[[{"node":"Summarizer Agent","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Updated profiles List","type":"main","index":0}]]}}}


