# templates

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-07-06 21:16:30
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: Zendesk: Visual Summarization, Sentiment Analysis, and Slack Integration
author_name: InfraNodus
author_username: infranodus
categories: []
created_at: 2025-06-05T13:01:17.102Z
updated_at: 2025-06-05T13:01:17.102Z
url: https://n8n.io/workflows/4688
scraped_at: 2025-07-06 21:16:30
description:
  Analyze and Explore your ZenDesk Support Requests using AI-Powered Knowledge Graph

  This template helps you create an interactive InfraNodus knowledge graph for your ZenDesk tickets using any search criteria (e.g. after a certain date, specific status, sender, keyword) that will automatically be sent to a selected Slack channel.

  Here's an example of the InfraNodus graph that shows the main topics and gaps in ZenDesk support tickets: 

  You can use the workflow to:

  Get an instant overview of the main topics your customers are talking about
  Generate business and product ideas based on the blind spots identified using the InfraNodus AI
  See which topics correlate to the negative / positive sentiment understanding the weak and strong sides of your product and support 
  Receive daily notifications on the main topics your customers are talking about via Slack / Telegram / Email and other channels
  Perform detailed search using a password-protected web form for tickets filtered by a certain date, status, tag, sender, keyword.
  Use the interactive graph to explore specific topics and concepts your customers are talking about — a great way to engage with their concerns in a non-linear way, bypassing the boring tabular interface
  Use the graph to explore the support requests by specific segments — e.g. status, priority, sentiment, tags, urgency.
  Use the graph generated as an AI expert available to your AI agents in other n8n workflows via InfraNodus GraphRAG. For instance, you could connect your knowledge base to the support tickets graph and let the agent discover possible solutions to your customers' most typical problems. See an sample template here.

  How it works
  You can start this workflow 

  manually, 
  with a daily / weekly trigger, or 
  via a password-protected web form, where you can provide search requests. 

  Once started, it will perform a ZenDesk tickets search with the default or your custom criteria. Then it will use the search results to generate an InfraNodus graph (or add the new data to an existing one), and — finally — use the InfraNodus AI endpoints to generate a topical summary and a product business idea based on the blind spots identified. The results are delivered a channel of your choice.

  Here's a description step by step:

  Start the workflow (manually or on schedule)
  Assign values to variables (search criteria, graph name)
  Perform ZenDesk support tickets search
  Convert the data received and submit it to InfraNodus to generate a knowledge graph
  Generate topical summary with InfraNodus
  Generate a business idea with InfraNodus (you can also change the setting to generate a question instead)
  Send a notification via Slack / Telegram / Email or back to the webform

  How to use

  You need an InfraNodus API account and key to use this workflow. You also need a ZenDesk account. It takes about 5 minutes to set everything up.

  Create an InfraNodus account.
  Get the API key at https://infranodus.com/api-access and create a Bearer authorization key for the InfraNodus HTTP nodes.
  Add the authorization key to all the InfraNodus HTTP nodes in the template (Steps 3, 5, and 6).
  Generate a ZenDesk authorization token following the instructions in n8n's ZenDesk node (Step 3).
  Optionally: connect your Slack or Telegram or Gmail account to receive automated notifications with the link to the graph, once the workflow is ready (it takes about 30 seconds to run).
  Run it with using the form to play around with the search criteria that works best for you (you can leave everything empty at first), then choose the parameters you like and activate the Daily Trigger node to receive executive summaries to a channel of your choice.
  Open the graph in InfraNodus and use our customer feedback analysis guide to explore the graph and generate new insights.

  Requirements

  An InfraNodus account and API key
  A ZenDesk API key
  (Optional) — a Slack / Telegram / Gmail connection for notifications

  FAQ

  1. What are the best use cases to try?

  I love to set the graph to deliver me a daily visual briefing of what's happening in my support portal. It shows me the main topics and gaps and generates product ideas based on them. Great to keep the pulse on the business. 

  I also really like generating a graph for the past week manually, using the form, and then exploring the graph in InfraNodus directly using the customer feedback analysis workflow to:

  discover main topics my customers are talking about?
  understand the topics that have the most negative connotation for them (using the sentiment filter)?
  discover some support tickets that need more attention or that talk about the topics I'm personally interested in and engage with the client
  identify the gaps in your customers' discourse based on the blind spots — useful for generating ideas, see the graph below with a demo of how it works:




  2. Why use the graph and not just AI summary?

  AI summary will just give you generic results. You'll see what you already know. Using the graph helps you deconstruct the discourse and get a much more nuanced understanding of the main pain points and interests of your customers. The auto-generated InfraNodus summary and business ideas have a direct explainable connection to the discourse, so you can always see where they are coming from and maintain the focus on all the topics, rather than the most prominent ones. 

  Additionally, having an interactive graph opens a possibility to explore your customers' concerns in a more engaging way, finding the topics and concepts that are relevant to your interests or to your agents' expertise, helping you find the conversations that you'd otherwise have missed.


  3. Is my customers' data safe?

  Absolutely. InfraNodus' terms of use and privacy policy state that the customers' data and text graphs are not used in AI training and are not offered to any third parties. Its underlying API system uses the Open API which explicitly states that data is not used for training either. So all the customers' data are private and safe. As an extra precaution, you can always delete the graphs after you analyzed them, in which case there is no trace of this data left on the servers.

  Customizing this workflow

  Check out the complete setup guide for this workflow at https://support.noduslabs.com/hc/en-us/articles/20447530961308-Zendesk-Tickets-Summarization-Sentiment-Analysis-and-Slack-Integration-with-n8n-and-InfraNodus

  For support with this template, please, contact 
  https://support.noduslabs.com

  For more InfraNodus n8n workflows, please, see our creators page:
  https://n8n.io/creators/infranodus/

  To learn more about InfraNodus, GraphRAG, and knowledge graph analysis:
  https://infranodus.com

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.slack","n8n-nodes-base.telegram","n8n-nodes-base.zendesk","n8n-nodes-base.gmail","n8n-nodes-base.code"]

workflow_json:
  {"id":"Ps6Vyn4fFbtSDAIa","meta":{"instanceId":"2a26454b0172ffcb8d70ba77c235b1209f92cd71bf06c79ba609c7173b416d68","templateCredsSetupCompleted":true},"name":"Summarize Zendesk Tickets and Generate Insights with Knowledge Graphs","tags":[{"id":"66wgFoDi9Xjl74M3","name":"Support","createdAt":"2025-05-21T17:06:32.355Z","updatedAt":"2025-05-21T17:06:32.355Z"},{"id":"9QurS5Kb1CkCYrnG","name":"Product","createdAt":"2025-05-21T17:06:29.704Z","updatedAt":"2025-05-21T17:06:29.704Z"},{"id":"Hd23erjIskV5mwPl","name":"Sales","createdAt":"2025-06-05T12:03:26.567Z","updatedAt":"2025-06-05T12:03:26.567Z"},{"id":"kldZpTCan1suEN8v","name":"Marketing","createdAt":"2025-05-20T13:16:20.459Z","updatedAt":"2025-05-20T13:16:20.459Z"},{"id":"sJk9cUvmMU8FkJXv","name":"AI","createdAt":"2025-05-20T13:16:15.636Z","updatedAt":"2025-05-20T13:16:15.636Z"}],"nodes":[{"id":"a90faec1-0007-4e18-b2cb-90c5ba40bc4c","name":"Zendesk","type":"n8n-nodes-base.zendesk","position":[500,120],"parameters":{"options":{"query":"=created>={{ $json.analyze_from_date }}{{$json.searh_query ? ` ${$json.searh_query}` : ``}}{{ $json.status ? ` status:${$json.status.toLowerCase()}` : `` }}"},"operation":"getAll"},"credentials":{"zendeskApi":{"id":"i5bOpw0SnJ616AzW","name":"Zendesk account"}},"typeVersion":1},{"id":"84bf6e0c-76a5-4b70-ae04-c3c684044be8","name":"InfraNodus Build a Text Knowledge Graph","type":"n8n-nodes-base.httpRequest","position":[1000,120],"parameters":{"url":"https://infranodus.com/api/v1/graphAndStatements?doNotSave=false&includeGraph=false&includeGraphSummary=true&includeStatements=false","method":"POST","options":{},"sendBody":true,"authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"name","value":"={{ $('Set Parameters').first().json.graph_name }}"},{"name":"statements","value":"={{ $json.statements }}"},{"name":"contextSettings","value":"={{{ \"partOfSpeechToProcess\":\"HASHTAGS_AND_WORDS\", \"doubleSquarebracketsProcessing\":\"EXCLUDE\", \"mentionsProcessing\":\"EXCLUDE\"} }}"},{"name":"categories","value":"={{ $json.categories }}"},{"name":"timestamps","value":"={{ $json.timestamps }}"}]},"genericAuthType":"httpBearerAuth"},"credentials":{"httpBearerAuth":{"id":"FPDx6PA5CtzGEIQc","name":"InfraNodus DeeMeeTree API Key"}},"typeVersion":4.2},{"id":"228b5644-60c1-438a-9568-9f616c44ac15","name":"Add meta data to tickets for graph filters","type":"n8n-nodes-base.code","position":[800,120],"parameters":{"jsCode":"\nlet statements = []\nlet categories = []\nlet timestamps = []\nfor (const item of $input.all()) {\n\n  const isChatMessage = item.json.description.includes('Offline transcript:') || false\n  \n  const fromSender = isChatMessage ? extractEmail(item.json.description) : item.json.via.source.from.address\n  const createdDate = item.json.created_at\n  const messageSubject = isChatMessage ? '' : item.json.subject + ' '\n  \n  const cleanMessageText = isChatMessage ? item.json.description.split('Offline transcript:')[1] : item.json.description\n  const messageText = messageSubject +\n  removeLineBreaks(removeHtmlCssScript(cleanMessageText))\n  \n  const messageUrl = item.json.url.split('/api/')[0] + '/agent/tickets/' + item.json.id\n  \n  const messageStatus = item.json.status\n  const messageType = item.json.type\n  const messagePriority = item.json.priority\n  const messageCategories = []\n  const messageTags = item.json.tags\n  if (messageStatus) messageCategories.push('status: ' + messageStatus)\n  if (messageType) messageCategories.push('type: ' + messageType)\n  if (messagePriority) messageCategories.push('priority: ' + messagePriority)\n  if (messageTags && messageTags.length > 0) messageTags.forEach(tag => messageCategories.push('tag: ' + tag))\n\n  statements.push('[[' + fromSender + ']] ' + messageText + ' ' + messageUrl)\n  categories.push(messageCategories)\n  timestamps.push(createdDate)\n}\n\nreturn { statements, categories, timestamps }\n\nfunction extractEmail(text) {\n  const match = text.match(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/);\n  const email = match ? match[0] : '';\n  return email\n}\nfunction removeLineBreaks(text) {\n  const cleanText = text.replaceAll('\\n', ' ')\n  return cleanText\n}\nfunction removeHtmlCssScript(text) {\n  if (!text || typeof text !== 'string') {\n    return '';\n  }\n  \n  let cleanText = text;\n  \n  // Remove script tags and their content (case insensitive)\n  cleanText = cleanText.replace(/<script[^>]*>[\\s\\S]*?<\\/script>/gi, '');\n  \n  // Remove style tags and their content (case insensitive)\n  cleanText = cleanText.replace(/<style[^>]*>[\\s\\S]*?<\\/style>/gi, '');\n  \n  // Remove HTML comments\n  cleanText = cleanText.replace(/<!--[\\s\\S]*?-->/g, '');\n  \n  // Remove all remaining HTML tags\n  cleanText = cleanText.replace(/<[^>]*>/g, '');\n  \n  // Decode common HTML entities\n  const htmlEntities = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\",\n    '&nbsp;': ' ',\n    '&copy;': '©',\n    '&reg;': '®',\n    '&trade;': '™'\n  };\n  \n  Object.keys(htmlEntities).forEach(entity => {\n    const regex = new RegExp(entity, 'g');\n    cleanText = cleanText.replace(regex, htmlEntities[entity]);\n  });\n  \n  // Clean up extra whitespace\n  cleanText = cleanText.replace(/\\s+/g, ' ').trim();\n  \n  return cleanText;\n}"},"typeVersion":2},{"id":"2354e6b3-a9de-47ba-a146-a3180126f59b","name":"Wait","type":"n8n-nodes-base.wait","position":[1280,120],"webhookId":"e9aad8e5-4d65-43b9-9af0-33e221c36e84","parameters":{"amount":10},"typeVersion":1.1},{"id":"6a070df2-3eb3-4686-ae03-e74b8a9530e5","name":"InfraNodus AI Summary & Graph Link","type":"n8n-nodes-base.httpRequest","position":[1480,120],"parameters":{"url":"https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&includeGraph=false&includeGraphSummary=true","method":"POST","options":{},"sendBody":true,"authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"aiTopics","value":"true"},{"name":"requestMode","value":"summary"},{"name":"name","value":"={{ $('Set Parameters').first().json.graph_name }}"}]},"genericAuthType":"httpBearerAuth"},"credentials":{"httpBearerAuth":{"id":"FPDx6PA5CtzGEIQc","name":"InfraNodus DeeMeeTree API Key"}},"retryOnFail":false,"typeVersion":4.2},{"id":"a66e966a-cfb6-41a7-901c-3df07392ad82","name":"Send Report to Telegram","type":"n8n-nodes-base.telegram","onError":"continueRegularOutput","position":[2460,580],"webhookId":"50dc4ad9-b803-4e13-8c5e-048f6f06ea47","parameters":{"text":"=💎 Visual **overview of your Zendesk tickets** is ready at [https://infranodus.com/Deemeetree/{{ $('Set Parameters').first().json.graph_name }}/edit](https://infranodus.com/Deemeetree/{{ $('Set Parameters').first().json.graph_name }}/edit)\n\n**💎 Topical summary:**\n{{ $('InfraNodus AI Summary & Graph Link').item.json.aiAdvice[0].text }}\n\n**💡 Idea to think about:**\n{{ $json.aiAdvice[0].text }}\n","chatId":"your_telegram_chat_id","additionalFields":{"appendAttribution":false}},"credentials":{"telegramApi":{"id":"jaBITBhfModUjHo9","name":"Telegram apartment notifications"}},"typeVersion":1.2},{"id":"8baa3b72-d15f-4757-bfd7-dfd73d573d89","name":"Send Full Report via Gmail","type":"n8n-nodes-base.gmail","onError":"continueRegularOutput","position":[2460,360],"webhookId":"18e8d5df-3ac6-45fb-ab41-d2e1e578fa51","parameters":{"sendTo":"your_own_email_12312dsadfas@gmail.com","message":"=Hello\n\nWe successfully analyzed your Zendesk tickets on {{ $('Set Parameters').first().json.lauch_time }}\n\n💎 Visual overview of your Zendesk tickets is ready at https://infranodus.com/Deemeetree/{{ $('Set Parameters').first().json.graph_name }}/edit\n\n📋 Search parameters:\nAnalyzing from date: {{ $('Set Parameters').first().json.analyze_from_date }}\nSearch query: {{ $('Set Parameters').first().json.search_query}} \nStatus: {{$('Set Parameters').first().json.status}}\n\n💎 Topical summary:\n{{ $('InfraNodus AI Summary & Graph Link').item.json.aiAdvice[0].text }}\n\n{{ $('InfraNodus AI Summary & Graph Link').item.json.graphSummary }}\n\n💡 Idea to think about:\n{{ $json.aiAdvice[0].text }}\n\nThank you, till next time!\n","options":{},"subject":"Zendesk Summary","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"w7b4H8WpgY9Oit56","name":"Gmail supadelicious"}},"typeVersion":2.1},{"id":"56204c2b-f70b-436b-aa52-7bc7b0994822","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","disabled":true,"position":[-80,200],"parameters":{"rule":{"interval":[{"triggerAtHour":10}]}},"typeVersion":1.2},{"id":"5f6ab402-79f7-468e-a8f1-770322136cb4","name":"Slack","type":"n8n-nodes-base.slack","onError":"continueRegularOutput","position":[2460,120],"webhookId":"6d836f75-04ad-4430-9461-27845de8ab8e","parameters":{"text":"=Zendesk Support Overview ran on {{ $('Set Parameters').first().json.lauch_time }}\n\n📋 Search parameters:\nAnalyzing from date: {{ $('Set Parameters').first().json.analyze_from_date }}\nSearch query: {{ $('Set Parameters').first().json.search_query}} \nStatus: {{$('Set Parameters').first().json.status}}\n\n\n💎 Visual overview of your Zendesk tickets is ready at [https://infranodus.com/Deemeetree/{{ $('Set Parameters').first().json.graph_name }}/edit](https://infranodus.com/Deemeetree/{{ $('Set Parameters').first().json.graph_name }}/edit)\n\n💎 Topical summary:\n{{ $('InfraNodus AI Summary & Graph Link').item.json.aiAdvice[0].text }}\n\n{{ $('InfraNodus AI Summary & Graph Link').item.json.graphSummary }}\n\n💡 Idea to think about:\n{{ $json.aiAdvice[0].text }}\n\nThank you, till next time!\n","select":"channel","channelId":{"__rl":true,"mode":"list","value":"C0905QEULAG","cachedResultName":"customer-support"},"otherOptions":{"includeLinkToWorkflow":false},"authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"nFuZU4b0kZ0PiHXR","name":"Slack account"}},"typeVersion":2.3},{"id":"187c5d5f-a984-4784-9da2-ca7db7b899f8","name":"Set Parameters","type":"n8n-nodes-base.set","position":[220,120],"parameters":{"mode":"raw","options":{},"jsonOutput":"={\n  \"analyze_from_date\": \"{{ $json[\"Starting from Date\"] || $today.minus({days: 1}).toString()}}\",\n  \"search_query\": \"{{ $json[\"Search Query\"] || `` }}\",\n  \"status\": \"{{ $json['Ticket Status to Filter'] || `` }}\",\n  \"graph_name\": \"{{ $json[\"Graph Name\"] || ($json.submittedAt ? `zendesk_tickets_${$json.submittedAt.split('.')[0].replaceAll(':', '_')}` : `zendesk_tickets_${$json.timestamp.split('.')[0].replaceAll(':','_')}`) }}\",\n  \"launch_time\": \"{{ $json.submittedAt ? $json.submittedAt.split('.')[0] : $json.timestamp.split('.')[0] }}\"\n}\n"},"typeVersion":3.4},{"id":"3629d33e-5b56-4a9a-a32d-be1125b0a1b9","name":"Wait Again","type":"n8n-nodes-base.wait","position":[1920,120],"webhookId":"0e4e854f-bac4-4d6f-b036-e277b4eb68ef","parameters":{"amount":2},"typeVersion":1.1},{"id":"2998db19-1fb6-46d1-8fbb-59e87b3c81ff","name":"InfraNodus Insight Generator","type":"n8n-nodes-base.httpRequest","position":[2100,120],"parameters":{"url":"https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&optimize=gap&includeGraph=false&includeGraphSummary=true","method":"POST","options":{},"sendBody":true,"authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"aiTopics","value":"true"},{"name":"requestMode","value":"idea"},{"name":"name","value":"={{ $('Set Parameters').first().json.graph_name }}"}]},"genericAuthType":"httpBearerAuth"},"credentials":{"httpBearerAuth":{"id":"FPDx6PA5CtzGEIQc","name":"InfraNodus DeeMeeTree API Key"}},"typeVersion":4.2},{"id":"2f06e74a-dcb1-4228-8a5e-688b1fbedbb6","name":"On form submission","type":"n8n-nodes-base.formTrigger","position":[-80,40],"webhookId":"34bdb9d4-1b26-4810-bab6-33427bec0331","parameters":{"options":{"appendAttribution":false,"respondWithOptions":{"values":{"formSubmittedText":"You will receive a notification via the channel of your choice once this workflow completes."}}},"formTitle":"Visual Summary of Zendesk Tickets","formFields":{"values":[{"fieldType":"date","fieldLabel":"Starting from Date"},{"fieldLabel":"Search Query"},{"fieldType":"dropdown","fieldLabel":"Ticket Status to Filter","fieldOptions":{"values":[{"option":"Open"},{"option":"Closed"},{"option":"Pending"},{"option":"New"},{"option":"On Hold"}]}},{"fieldLabel":"Graph Name","placeholder":"e.g. zendesk_tickets_search"}]},"authentication":"basicAuth","formDescription":"Create a knowledge graph from your Zendesk tickets and send a notification via Slack with the insights."},"credentials":{"httpBasicAuth":{"id":"dnRnDRFSRoubvTh8","name":"Basic n8n Form Auth"}},"typeVersion":2.2},{"id":"dba86f3f-6f65-4339-b720-26da46c62a0b","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[160,-280],"parameters":{"height":660,"content":"## 2. Set Parameters\n\n### Set ticket search parameters and graph name to save to. \n\nFor Zendesk search parameters, please, refer to their [search parameters support page](https://developer.zendesk.com/documentation/api-basics/working-with-data/searching-with-the-zendesk-YOUR_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE/)\n\nYou can also set search parameters directly in the Zendesk node in the Step 3."},"typeVersion":1},{"id":"513993e9-a258-4b45-a4b8-6691779689ab","name":"Form Response","type":"n8n-nodes-base.form","onError":"continueRegularOutput","position":[2460,780],"webhookId":"e4c7f004-04c7-45f4-ba09-2bac2967093f","parameters":{"options":{"formTitle":"Zendesk Analysis Results"},"operation":"completion","completionTitle":"The workflow is complete","completionMessage":"=Visual overview of your Zendesk tickets is delivered to your channels of choice and is ready at https://infranodus.com/Deemeetree/{{ $('Set Parameters').first().json.graph_name }}/edit"},"typeVersion":1},{"id":"5e7c5976-c1bb-414a-a4bc-ec6776ebe9e2","name":"If","type":"n8n-nodes-base.if","position":[1660,200],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"cb0387d5-e633-4885-a91b-cf9cb889e7f9","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{ $json.error }}","rightValue":""}]}},"typeVersion":2.2},{"id":"2a2134ba-3d8c-4d79-bf90-affa433bd17c","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-140,-280],"parameters":{"height":660,"content":"## 1. Set a Trigger\n\n### Start with the search form first or set up a scheduled daily or weekly trigger.\n\nYou can leave all the fields empty. Once you find the search parameters you like, you can specify them in the Step 2 and have an automated trigger run the workflow for you. "},"typeVersion":1},{"id":"13976533-6e27-48c1-81dd-73c9a65f724f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[440,-280],"parameters":{"height":660,"content":"## 3. Get ZenDesk Tickets\n\n### We use search criteria defined in the Step 2. You can also set your own in this node directly. \n\n🚨 Set up your ZenDesk connection here. \n\n"},"typeVersion":1},{"id":"56bf6145-fc79-4c12-a505-fc0be369997f","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[720,-280],"parameters":{"width":480,"height":660,"content":"## 4. Process Tickets and Generate an [InfraNodus](https://infranodus.com) Knowledge Graph\n\n### You will get a link to an interactive graph at [InfraNodus](https://infranodus.com) where you can see the main topics and concepts and sort your tickets by \n\n- ticket status\n- priority\n- tag\n- urgency\n- sentiment\n\n\n🚨 Set up your InfraNodus API connection here.\n\n"},"typeVersion":1},{"id":"97ff4272-6b64-44a7-aef6-280c98b0d894","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1240,-280],"parameters":{"width":600,"height":660,"content":"## 5. Generate Topical Summary\n\n### Using the [InfraNodus AI text analysis](https://infranodus.com) we generate a topical summary of the tickets you searched for. You will discover:\n\n- the main topics (good for an overview)\n- main keywords (userful for SEO)\n- content gaps (good for product ideas)\n\n\n🚨 Set up your InfraNodus API connection here.\n\n"},"typeVersion":1},{"id":"42300a56-8816-4274-a6ba-703a2ddce1e4","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[1880,-280],"parameters":{"width":380,"height":660,"content":"## 6. Generate a Business Idea\n\n### Using the [InfraNodus AI](https://infranodus.com) we generate a business idea based on the gap found in your Zendesk tickets\n\n*You can also change the `requestMode` to `question` to generate an interesting question instead. For more parameters, refer to the [InfraNodus API documentation](https://support.noduslabs.com/hc/en-us/sections/13605105764124-InfraNodus-API).*\n\n\n🚨 Set up your InfraNodus API connection here.\n\n"},"typeVersion":1},{"id":"deee904a-832f-4e73-8851-89d75c07458e","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[2320,-280],"parameters":{"width":380,"height":1260,"content":"## 7. Notify of Results via Slack / Email / Telegram / Form\n\n### Receive a summary with the link to the interactive graph to a channel of your choice, once the workflow is ready.\n\nYou can deactivate the channels you don't want to use. We provide multiple channels, so you have an option. \n\n🚨 Set up your API connections here.\n\n"},"typeVersion":1},{"id":"e69ffee3-5d11-4a6c-afe9-93b3187016e6","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-140,-1080],"parameters":{"color":6,"width":760,"height":760,"content":"# Generate Visual Topical Summary and Business Ideas from ZenDesk Tickets\n\n### Using this workflow, you can generate an [InfraNodus knowledge graph](https://infranodus.com) based on your ZenDesk tickets (using any search criteria) to:\n\n- Learn what your customers are talking about (main topical clusters)\n- Discover the topics and concepts they mention with a negative / positive sentiment\n- Find the support requests for a certain topic\n- Explore the requests in a non-linear way, based on the agent's expertise\n- Identify the content gaps, generate business ideas based on them\n\n\nFor support, please, contact us at [https://support.noduslabs.com](https://support.noduslabs.com)\n\nAn example of the graph that shows the main topics:\n[![Zendesk knowledge graph made with InfraNodus](https://support.noduslabs.com/hc/article_attachments/20447708129820)](https://infranodus.com)"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"40b28280-3224-450f-a045-9609c06ee1be","connections":{"If":{"main":[[{"node":"InfraNodus AI Summary & Graph Link","type":"main","index":0}],[{"node":"Wait Again","type":"main","index":0}]]},"Wait":{"main":[[{"node":"InfraNodus AI Summary & Graph Link","type":"main","index":0}]]},"Zendesk":{"main":[[{"node":"Add meta data to tickets for graph filters","type":"main","index":0}]]},"Wait Again":{"main":[[{"node":"InfraNodus Insight Generator","type":"main","index":0}]]},"Set Parameters":{"main":[[{"node":"Zendesk","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Set Parameters","type":"main","index":0}]]},"On form submission":{"main":[[{"node":"Set Parameters","type":"main","index":0}]]},"InfraNodus Insight Generator":{"main":[[{"node":"Send Report to Telegram","type":"main","index":0},{"node":"Send Full Report via Gmail","type":"main","index":0},{"node":"Slack","type":"main","index":0},{"node":"Form Response","type":"main","index":0}]]},"InfraNodus AI Summary & Graph Link":{"main":[[{"node":"If","type":"main","index":0}]]},"InfraNodus Build a Text Knowledge Graph":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Add meta data to tickets for graph filters":{"main":[[{"node":"InfraNodus Build a Text Knowledge Graph","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-07-06 21:16:30
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: 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-07-06 21:16:30
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: AI Agent that updates its own rules to modify behavior
author_name: GiovanniSegar
author_username: giosegar
categories: []
created_at: 2025-06-05T14:54:35.685Z
updated_at: 2025-06-05T14:54:35.685Z
url: https://n8n.io/workflows/4694
scraped_at: 2025-07-06 21:16:30
description:
  Summary of agent
  This agent can write and rewrite its own rules, allowing you to mold its behavior. It receives rules from a database as system instructions and has tools to create, edit, or delete them. This is a great baseline for new agent builds.

  You can tell it things like "Next time, use present tense when talking about this subject" and it will use a tool to save this as a rule, then receive that instruction in all future iterations. 

  How to start using it

  Option 1: With a Postgres database (e.g., Supabase)
  Supabase Schema: Create a table (e.g., agent_rules) with the following columns:
      id: bigint (Primary Key, auto-incrementing)
      created_at: timestamp with time zone (Default: now())
      rule_text: text
      agent: text
  Workflow Updates:
      Update the Postgres credentials in the "Get rules from database," "Insert rule into database," and "Execute query on rule database" nodes.
      Update the agent value (currently 'TestAgent') in the "Get rules from database" and "Insert rule into database" nodes if you want a different agent name.
      Update the Anthropic API credentials.

  Option 2: With Google Sheets
  Google Sheet Setup: Create a Google Sheet with columns for rule_text and agent.
  Workflow Updates:
      Example Google Sheets nodes are included. You will need to:
          Connect your Google Sheets credentials.
          Select your Google Sheet (with rule_text and agent columns) in all relevant Google Sheets nodes.
          Replace the existing Postgres nodes ("Get rules from database", "Insert rule into database", "Execute query on rule database") with the configured Google Sheets nodes.
      Update the agent value (currently 'TestAgent') in the Google Sheets nodes if you want a different agent name.
      Update the Anthropic API credentials.
      Agent Instructions: Update the agent's system message and remove the database schema section as it is no longer relevant

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

workflow_json:
  {"meta":{"instanceId":"59761dc282918b63de68f8544bab8098be77f63f00c94bc04dd5d71886f7d2e1","templateCredsSetupCompleted":true},"nodes":[{"id":"c7c148ea-7896-4e51-b360-6f7fc59ceda8","name":"Ultimate Assistant1","type":"@n8n/n8n-nodes-langchain.agent","position":[1120,-80],"parameters":{"text":"={{ $json.body.message }}","options":{"systemMessage":"=# Overview\nYou are the ultimate personal assistant. Your job is to figure out the right tool to use, if applicable to the user's prompt.\n\n## Rules\n{{ \"- \" + $json.rules.join(\"\\n- \") }}\n\n## Rule Database Schema: \nTable name: datos_agent_rules\n[\n  {\n    \"column_name\": \"id\",\n    \"data_type\": \"bigint\",\n    \"character_maximum_length\": null,\n    \"is_nullable\": \"NO\",\n    \"column_default\": null\n  },\n  {\n    \"column_name\": \"created_at\",\n    \"data_type\": \"timestamp with time zone\",\n    \"character_maximum_length\": null,\n    \"is_nullable\": \"NO\",\n    \"column_default\": \"now()\"\n  },\n  {\n    \"column_name\": \"rule_text\",\n    \"data_type\": \"text\",\n    \"character_maximum_length\": null,\n    \"is_nullable\": \"YES\",\n    \"column_default\": null\n  },\n  {\n    \"column_name\": \"agent\",\n    \"data_type\": \"text\",\n    \"character_maximum_length\": null,\n    \"is_nullable\": \"YES\",\n    \"column_default\": null\n  }\n]\n\n## Final Context:\n- Here is the current date/time: {{ $now.toISO() }}\n- UNIX timestamp for current date/time: {{ $now.toMillis() }}\n- The user's timezone is PST\n- The user's name is Giovanni Segar (or Gio for short)","returnIntermediateSteps":true},"promptType":"define"},"typeVersion":1.7},{"id":"7f623864-efc7-4873-8a94-becaa4b507da","name":"Chat History1","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[1180,180],"parameters":{"contextWindowLength":10},"typeVersion":1.3},{"id":"b3bfd8ea-511b-407e-9f40-2c33115d8521","name":"Anthropic Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatAnthropic","position":[1000,180],"parameters":{"model":"=claude-sonnet-4-20250514","options":{"temperature":0.2}},"credentials":{"anthropicApi":{"id":"9n2PuVH0HamhCE46","name":"Anthropic account"}},"typeVersion":1.2},{"id":"90557906-3244-4dd0-b511-f20d64380183","name":"Get rules from database","type":"n8n-nodes-base.postgres","position":[460,-200],"parameters":{"query":"SELECT rule_text FROM datos_agent_rules WHERE agent = 'TestAgent';","options":{},"operation":"executeQuery"},"credentials":{"postgres":{"id":"1UmU4low0qyDbv99","name":"Datos Postgres"}},"typeVersion":2.6},{"id":"1b462765-5889-4688-af7d-3cebd51efa05","name":"Merge","type":"n8n-nodes-base.merge","position":[900,-80],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3.1},{"id":"7d3a71f9-79f5-4b4b-920c-fc37f148602c","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[680,-200],"parameters":{"options":{},"fieldsToAggregate":{"fieldToAggregate":[{"renameField":true,"outputFieldName":"rules","fieldToAggregate":"rule_text"}]}},"typeVersion":1},{"id":"a5df493e-27ba-485c-a14b-ad3217d3232f","name":"Insert rule into database","type":"n8n-nodes-base.postgresTool","position":[1560,160],"parameters":{"table":{"__rl":true,"mode":"list","value":"datos_agent_rules","cachedResultName":"datos_agent_rules"},"schema":{"__rl":true,"mode":"list","value":"public"},"columns":{"value":{"agent":"TestAgent","rule_text":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('rule_text', `Write a simple reminder for the future based on the user's instructions. `, 'string') }}"},"schema":[{"id":"id","type":"number","display":true,"removed":true,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"created_at","type":"dateTime","display":true,"removed":true,"required":false,"displayName":"created_at","defaultMatch":false,"canBeUsedToMatch":true},{"id":"rule_text","type":"string","display":true,"required":false,"displayName":"rule_text","defaultMatch":false,"canBeUsedToMatch":true},{"id":"agent","type":"string","display":true,"required":false,"displayName":"agent","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"descriptionType":"manual","toolDescription":"This should be used when the user corrects you in some way to add a rule that will be included in the future prompts. This can be specific to a certain client or can be a general rule for how to do things. Make sure to let the user know if you added a rule."},"credentials":{"postgres":{"id":"1UmU4low0qyDbv99","name":"Datos Postgres"}},"typeVersion":2.6},{"id":"6382b5f0-2aab-49ee-ad89-bc329e24d6e4","name":"Execute query on rule database","type":"n8n-nodes-base.postgresTool","position":[1740,160],"parameters":{"query":"{{ $fromAI('valid_postgres_sql_query', 'Write any valid SQL query for the Postgres rule database.', 'string') }}","options":{},"operation":"executeQuery","descriptionType":"manual","toolDescription":"Use this to get rules and their IDs for modification, delete items, add multiple items, or any other operation not covered by the simple insert tool"},"credentials":{"postgres":{"id":"1UmU4low0qyDbv99","name":"Datos Postgres"}},"typeVersion":2.6},{"id":"3c8d3c66-bddf-47ab-85ca-a4146a6b59cb","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[180,-60],"webhookId":"8f2b6d22-043e-4dab-b39a-44a8bbef4694","parameters":{"options":{}},"typeVersion":1.1},{"id":"5a62af2c-6952-4a7d-b945-cf5c1c437aaf","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-460,180],"parameters":{"width":1000,"height":760,"content":"## Summary of agent\nThis agent can write and rewrite its own rules, allowing you to mold its behavior. It receives rules from a database as system instructions and has tools to create, edit, or delete them. This is a great baseline for new agent builds.\n\n## How to start using it\n\n### Option 1: With a Postgres database (e.g., Supabase)\n1.  **Supabase Schema:** Create a table (e.g., `agent_rules`) with the following columns:\n    *   `id`: `bigint` (Primary Key, auto-incrementing)\n    *   `created_at`: `timestamp with time zone` (Default: `now()`)\n    *   `rule_text`: `text`\n    *   `agent`: `text`\n2.  **Workflow Updates:**\n    *   Update the **Postgres credentials** in the \"Get rules from database,\" \"Insert rule into database,\" and \"Execute query on rule database\" nodes.\n    *   Update the `agent` value (currently 'TestAgent') in the \"Get rules from database\" and \"Insert rule into database\" nodes if you want a different agent name.\n    *   Update the **Anthropic API credentials**.\n\n### Option 2: With Google Sheets\n1.  **Google Sheet Setup:** Create a Google Sheet with columns for `rule_text` and `agent`.\n2.  **Workflow Updates:**\n    *   Example Google Sheets nodes are included. You will need to:\n        *   Connect your **Google Sheets credentials**.\n        *   Select your Google Sheet (with `rule_text` and `agent` columns) in all relevant Google Sheets nodes.\n        *   Replace the existing Postgres nodes (\"Get rules from database\", \"Insert rule into database\", \"Execute query on rule database\") with the configured Google Sheets nodes.\n    *   Update the `agent` value (currently 'TestAgent') in the Google Sheets nodes if you want a different agent name.\n    *   Update the **Anthropic API credentials**.\n    *   **Agent Instructions:** Update the agent's system message and remove the database schema section as it is no longer relevant"},"typeVersion":1},{"id":"d4bb6943-7806-4630-9991-8dd5a177352c","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[700,400],"parameters":{"color":4,"width":1240,"height":540,"content":"## Prefer Google Sheets? Here are nodes to replace Postgres"},"typeVersion":1},{"id":"a90397f4-b7c7-4477-84d1-7466d0e700bf","name":"Get rules from sheets","type":"n8n-nodes-base.googleSheets","position":[780,500],"parameters":{"sheetName":{"__rl":true,"mode":"list","value":""},"documentId":{"__rl":true,"mode":"list","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"12","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"d7e5e896-5479-4ea5-817b-7e8b8763a926","name":"Add rule to sheet","type":"n8n-nodes-base.googleSheetsTool","position":[1040,520],"parameters":{"operation":"append","sheetName":{"__rl":true,"mode":"list","value":""},"documentId":{"__rl":true,"mode":"list","value":""},"descriptionType":"manual","toolDescription":"Use this to add rules to the google sheet"},"credentials":{"googleSheetsOAuth2Api":{"id":"12","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"6abf1348-2822-426b-ac6a-9c0cb439e081","name":"Update rule in sheet","type":"n8n-nodes-base.googleSheetsTool","position":[1220,520],"parameters":{"operation":"update","sheetName":{"__rl":true,"mode":"list","value":""},"documentId":{"__rl":true,"mode":"list","value":""},"descriptionType":"manual","toolDescription":"Use this to update an existing rule in the sheet"},"credentials":{"googleSheetsOAuth2Api":{"id":"12","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"53b15f2a-1f33-4d1c-b270-f687aa1f0e85","name":"Delete rule in sheet","type":"n8n-nodes-base.googleSheetsTool","position":[1360,520],"parameters":{"operation":"delete","sheetName":{"__rl":true,"mode":"list","value":""},"documentId":{"__rl":true,"mode":"list","value":""},"descriptionType":"manual","toolDescription":"Use this to delete an existing rule in the sheet"},"credentials":{"googleSheetsOAuth2Api":{"id":"12","name":"Google Sheets account"}},"typeVersion":4.6}],"pinData":{},"connections":{"Merge":{"main":[[{"node":"Ultimate Assistant1","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Chat History1":{"ai_memory":[[{"node":"Ultimate Assistant1","type":"ai_memory","index":0}]]},"Ultimate Assistant1":{"main":[[]]},"Anthropic Chat Model":{"ai_languageModel":[[{"node":"Ultimate Assistant1","type":"ai_languageModel","index":0}]]},"Get rules from database":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Insert rule into database":{"ai_tool":[[{"node":"Ultimate Assistant1","type":"ai_tool","index":0}]]},"When chat message received":{"main":[[{"node":"Merge","type":"main","index":1},{"node":"Get rules from database","type":"main","index":0}]]},"Execute query on rule database":{"ai_tool":[[{"node":"Ultimate Assistant1","type":"ai_tool","index":0}]]}}}


name: Conversational Telegram Bot with GPT-4o for Text and Voice Messages
author_name: Roninimous
author_username: roninimous
categories: []
created_at: 2025-06-05T15:13:35.483Z
updated_at: 2025-06-05T15:13:35.483Z
url: https://n8n.io/workflows/4696
scraped_at: 2025-07-06 21:16:30
description:
  This n8n workflow leverages a Telegram Message Trigger to activate an intelligent AI Agent capable of processing both text and voice messages. When a user sends a message in text or in voice format, the workflow captures and transcribes it (if necessary), then passes it to the AI Agent for understanding and response generation.

  To enhance user experience, the bot also displays a typing indicator while processing requests, simulating a natural, human-like interaction.

  Key Features
  Multi-Modal Input: Supports both text messages and voice notes from users.
  Real-Time Interaction: Shows a “typing…” action in Telegram while the AI processes the input.
  AI Agent Integration: Provides intelligent, context-aware, and conversational responses.
  Seamless Feedback Loop: Replies are sent directly back to the user within Telegram for smooth interaction.

  How It Works
  The workflow triggers whenever a message or voice note is received on Telegram.
  If the input is a voice note, the workflow transcribes it into text.
  The text input is sent to the AI Agent for processing.
  While processing, the bot sends a typing indicator to the user.
  Once the AI generates a response, the workflow sends it back to the user in Telegram.

  Setup Instructions
  Create a Telegram Bot:
  	Use @BotFather to create a bot and obtain your bot token.
  Configure n8n Credentials:
  	Add Telegram API credentials in n8n with your bot token.
  	Add credentials for any speech-to-text service used for voice transcription (e.g., Open AI Transcribe A Recording).
  Import the Workflow:
  	Import this workflow into your n8n instance.
  	Update all credential nodes to use your Telegram and transcription service credentials.
  Set Webhook URLs:
  	Ensure Telegram webhook is set properly for your bot to receive messages.
  	Make sure your n8n instance is publicly accessible for Telegram callbacks.
  Test the Workflow:
  	Send text messages and voice notes to your Telegram bot and observe the AI responses.

  Customization Guidance
  Add new message handlers: Extend the workflow to handle additional message types (images, documents, etc.).
  Improve transcription: Swap or add speech-to-text services for better accuracy or language support.
  Enhance AI Agent: Customize prompts and context management to tailor the AI’s personality and responses.
  AI Model Flexibility: Swap between different AI models (e.g., GPT-4, Claude, or custom LLMs) based on task type, cost, or performance preferences.
  Tool-Based Control: Add custom tools to the AI Agent such as calendar access, Notion, Google Sheets, web search, database queries, or custom APIs—allowing for dynamic, multi-functional agents

  Security and Implementation 
  Notes The Telegram node manages message reception and sending but does not directly handle AI processing.
  Voice transcription requires integration with external APIs; secure those credentials in n8n and monitor usage.
  To simulate typing, the workflow uses Telegram’s “sendChatAction” API method, providing users with feedback that the bot is processing.
  Ensure your AI API keys and Telegram tokens are securely stored in n8n credentials and not exposed in workflows or logs.

  Benefits
  Handles natural conversational inputs with text or voice.
  Provides a smooth, engaging user experience via typing indicators.
  Easy integration of advanced AI conversational agents with Telegram.
  Flexible for personal assistants, helpdesks, or interactive chatbots.

nodes_used:
  ["n8n-nodes-base.telegram","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"RV4zArpzN5InxYND","meta":{"instanceId":"1e9c5d216f82eece259bdabdf191aced054cce6456f87af0ff7807ca2b37638a","templateCredsSetupCompleted":true},"name":"Conversational Telegram Bot with GPT-4o for Text and Voice Messages","tags":[{"id":"hlEHEpOdSg5lhIqi","name":"Template","createdAt":"2025-06-05T15:35:52.689Z","updatedAt":"2025-06-05T15:35:52.689Z"}],"nodes":[{"id":"a33e3f45-f16e-4107-937e-0ce1d230060f","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","position":[-660,-180],"webhookId":"912e007f-19d9-4b5a-a90e-12ba01c9978d","parameters":{"updates":["message","*"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"ya9idB8joP5s1Xf4","name":"Your Telegram Access Token"}},"typeVersion":1.2},{"id":"e17f452c-4f9a-48f8-91a2-526260159676","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[520,420],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"gpt-4o"},"options":{}},"credentials":{"openAiApi":{"id":"WOlQJiwanaNPGe2f","name":"OpenAi Credential"}},"typeVersion":1.2},{"id":"9b33ec46-8772-4bfb-a448-fea5a673bbaa","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[740,460],"parameters":{"sessionKey":"={{ $json.sessionId }}","sessionIdType":"customKey","contextWindowLength":10},"typeVersion":1.3},{"id":"8cdd7ba8-c998-4ea7-b861-8dcaf12febfe","name":"Get Voice","type":"n8n-nodes-base.telegram","position":[80,0],"webhookId":"1962cd81-9991-4199-a78a-2250bf29631a","parameters":{"fileId":"={{ $json.message.voice.file_id }}","resource":"file"},"credentials":{"telegramApi":{"id":"ya9idB8joP5s1Xf4","name":"Your Telegram Access Token"}},"typeVersion":1.2},{"id":"7fa34d0e-5215-44e5-b1d3-1e8abb5771ae","name":"Text Or Voice","type":"n8n-nodes-base.switch","position":[-240,-180],"parameters":{"rules":{"values":[{"outputKey":"Text","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"0a236099-525e-4748-a57d-8b8e2c63c48b","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{ $json.message.text }}","rightValue":""}]},"renameOutput":true},{"outputKey":"Voice","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"24b7e8b8-6fce-4ddc-94b6-30b852891995","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{  $json.message.voice.file_id }}","rightValue":""}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"b90a586b-5d90-4f76-8e4e-bd44095f9aac","name":"Transcribe The Voice","type":"@n8n/n8n-nodes-langchain.openAi","position":[280,0],"parameters":{"options":{},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"WOlQJiwanaNPGe2f","name":"OpenAi Credential"}},"typeVersion":1.8},{"id":"587adf8a-2e69-4078-a603-84f0322207cb","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[720,80],"parameters":{"text":"={{ $json.message.text }}","options":{"systemMessage":"=# Overview\nYou are a personal assistant that helps user to fulfill their request.\n\nWhen you are asked to perform a task on the current date, please use the current time and date: {{$now}}\n\n## Output\nYou should output the result and don't include any link. Just mentioned where you added it to."},"promptType":"define"},"typeVersion":1.9},{"id":"2455c7cb-f341-4891-9096-dc62116298c0","name":"Typing Action","type":"n8n-nodes-base.telegram","position":[-240,-360],"webhookId":"2479f7f8-6d54-4d45-921e-af6dcfae768e","parameters":{"chatId":"={{ $json.message.chatId }}","operation":"sendChatAction"},"credentials":{"telegramApi":{"id":"ya9idB8joP5s1Xf4","name":"Your Telegram Access Token"}},"typeVersion":1.2},{"id":"8c2b6195-6101-4652-848c-505d13a3c1d2","name":"Send Response To Telegram","type":"n8n-nodes-base.telegram","position":[1340,80],"webhookId":"76e4b8a4-1086-4d24-b60e-b96942d83bdf","parameters":{"text":"={{ $json.output }}","chatId":"={{$('Telegram Trigger').first().json.message.chat.id}}","additionalFields":{"appendAttribution":false}},"credentials":{"telegramApi":{"id":"ya9idB8joP5s1Xf4","name":"Your Telegram Access Token"}},"typeVersion":1.2},{"id":"c8fd047d-8575-484e-939a-46064b81d035","name":"Send Context To AI Agent","type":"n8n-nodes-base.set","position":[460,-200],"parameters":{"options":{},"assignments":{"assignments":[{"id":"590b803f-833c-4854-bde7-5241d25b2b32","name":"message.text","type":"string","value":"={{ $json.message.text }}"},{"id":"303e0b5d-3d37-48fc-bbd3-ce62dbe7ef78","name":"sessionId","type":"string","value":"={{ $json.message.chat.id }}"}]}},"typeVersion":3.4},{"id":"f7e90526-08a5-4a59-956f-d39e6ff472f0","name":"Send Transcribe Context To AI Agent","type":"n8n-nodes-base.set","position":[460,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"2bb71aef-0ca1-4c26-95e1-c0c83bc82068","name":"message.text","type":"string","value":"={{ $json.text }}"},{"id":"692a2bae-35da-41d3-be8d-32c0f5dfbbef","name":"sessionId","type":"string","value":"={{ $('Telegram Trigger').item.json.message.chat.id }}"}]}},"typeVersion":3.4}],"active":false,"pinData":{},"settings":{"timezone":"Australia/Sydney","callerPolicy":"workflowsFromSameOwner","executionOrder":"v1"},"versionId":"3a29c25b-e7bd-41a7-91ee-4438fa9c1c1a","connections":{"AI Agent":{"main":[[{"node":"Send Response To Telegram","type":"main","index":0}]]},"Get Voice":{"main":[[{"node":"Transcribe The Voice","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Text Or Voice":{"main":[[{"node":"Send Context To AI Agent","type":"main","index":0}],[{"node":"Get Voice","type":"main","index":0}]]},"Typing Action":{"main":[[]]},"Telegram Trigger":{"main":[[{"node":"Text Or Voice","type":"main","index":0},{"node":"Typing Action","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Transcribe The Voice":{"main":[[{"node":"Send Transcribe Context To AI Agent","type":"main","index":0}]]},"Send Context To AI Agent":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Send Transcribe Context To AI Agent":{"main":[[{"node":"AI Agent","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-07-06 21:16:30
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: 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-07-06 21:16:30
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-07-06 21:16:30
description:
  Want to check out all my flows, follow me on:

  https://maxmitcham.substack.com/

  https://www.linkedin.com/in/max-mitcham/


  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":"[REDACTED_INSTANCE_ID]","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":"[REDACTED_WORKFLOW_ID]","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":"[REDACTED_FOLDER_ID]"},"credentials":{"googleDocsOAuth2Api":{"id":"[REDACTED_GOOGLE_DOCS_CRED_ID]","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":"[REDACTED_WEBHOOK_ID]","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\": \"[REDACTED_CHATBOT_ID]\",\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 [REDACTED_API_TOKEN]","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":"[REDACTED_ANTHROPIC_CRED_ID]","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":"[REDACTED_GOOGLE_DRIVE_CRED_ID]","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":"[REDACTED_GOOGLE_DOCS_CRED_ID]","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\": \"[REDACTED_CHATBOT_ID]\",\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 [REDACTED_API_TOKEN]","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":"[REDACTED_OPENROUTER_CRED_ID]","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":"[REDACTED_ANTHROPIC_CRED_ID]","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-07-06 21:16:30
description:
  Want to check out all my flows, follow me on:

  https://maxmitcham.substack.com/

  https://www.linkedin.com/in/max-mitcham/

  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":"[REDACTED_INSTANCE_ID]","templateCredsSetupCompleted":true},"name":"Email Manager","tags":[{"id":"[REDACTED_TAG_ID]","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":"[REDACTED_GMAIL_CRED_ID]","name":"Gmail account"}},"typeVersion":1.2},{"id":"a8644856-a8bf-49de-84a7-3fd9f93550d3","name":"Gmail","type":"n8n-nodes-base.gmail","position":[200,-20],"webhookId":"[REDACTED_WEBHOOK_ID]","parameters":{"simple":false,"options":{},"messageId":"={{ $json.id }}","operation":"get"},"credentials":{"gmailOAuth2":{"id":"[REDACTED_GMAIL_CRED_ID]","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":"[REDACTED_WEBHOOK_ID]","parameters":{"labelIds":"={{ $json.output['label ID'] }}","messageId":"={{ $('Gmail').item.json.id }}","operation":"addLabels"},"credentials":{"gmailOAuth2":{"id":"[REDACTED_GMAIL_CRED_ID]","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":"[REDACTED_ANTHROPIC_CRED_ID]","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 `[REDACTED_EMAIL]`)** 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):** `[REDACTED_EMAIL]`\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 `[REDACTED_EMAIL]` 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 `[REDACTED_EMAIL]`.\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 `[REDACTED_EMAIL]` 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":"[REDACTED_WEBHOOK_ID]","parameters":{"filters":{"q":"=from:{{ $fromAI('email') }}"},"operation":"getAll","returnAll":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"},"credentials":{"gmailOAuth2":{"id":"[REDACTED_GMAIL_CRED_ID_2]","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":"[REDACTED_WEBHOOK_ID]","parameters":{"filters":{"q":"=to:{{ $fromAI('email') }}","labelIds":["SENT"]},"operation":"getAll"},"credentials":{"gmailOAuth2":{"id":"[REDACTED_GMAIL_CRED_ID]","name":"Gmail account"}},"typeVersion":2.1}],"active":true,"pinData":{"Gmail Trigger":[{"json":{"To":"[REDACTED_EMAIL]","id":"[REDACTED_MESSAGE_ID]","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":"[REDACTED_EMAIL]","id":"[REDACTED_MESSAGE_ID]","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-07-06 21:16:30
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":"[REDACTED_INSTANCE_ID]","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":"[REDACTED_GMAIL_CRED_ID]","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":"[REDACTED_ANTHROPIC_CRED_ID]","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":"[REDACTED_EMAIL]","cachedResultName":"[REDACTED_EMAIL]"},"operation":"getAll","returnAll":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"},"credentials":{"googleCalendarOAuth2Api":{"id":"[REDACTED_GOOGLE_CALENDAR_CRED_ID]","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 [REDACTED_FIREFLIES_API_TOKEN]"}]}},"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-YOUR_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE_OPENAI_KEY_HERE 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":"@[REDACTED_SLACK_USER_ID]","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/[REDACTED_GOOGLE_SHEETS_DOC_ID]/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"[REDACTED_GOOGLE_SHEETS_DOC_ID]","cachedResultUrl":"https://docs.google.com/spreadsheets/d/[REDACTED_GOOGLE_SHEETS_DOC_ID]/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":"[REDACTED_SLACK_USER_ID]","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/[REDACTED_GOOGLE_SHEETS_DOC_ID]/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"[REDACTED_GOOGLE_SHEETS_DOC_ID]","cachedResultUrl":"https://docs.google.com/spreadsheets/d/[REDACTED_GOOGLE_SHEETS_DOC_ID]/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: Automated Investor Intelligence: CrunchBase to Google Sheets Data Harvester
author_name: Yaron Been
author_username: yaron-nofluff
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.code"]
categories: []
created_at: 2025-06-06T13:41:28.967Z
updated_at: 2025-06-06T13:41:28.967Z
url: https://n8n.io/workflows/4731
scraped_at: 2025-07-06 21:16:30
description:
  🚀 Automated Investor Intelligence: CrunchBase to Google Sheets Data Harvester!

  Workflow Overview
  This cutting-edge n8n automation is a sophisticated investor intelligence tool designed to transform market research into actionable insights. By intelligently connecting CrunchBase, data processing, and Google Sheets, this workflow:

  Discovers Investor Insights: 
     Automatically retrieves latest investor data
     Tracks key investment organizations
     Eliminates manual market research efforts

  Intelligent Data Processing:
     Filters investor-specific organizations
     Extracts critical investment metrics
     Ensures comprehensive market intelligence

  Seamless Data Logging:
     Automatically updates Google Sheets
     Creates real-time investor database
     Enables rapid market trend analysis

  Scheduled Intelligence Gathering:
     Daily automated tracking
     Consistent investor insight updates
     Zero manual intervention required

  Key Benefits
  🤖 Full Automation: Zero-touch investor research
  💡 Smart Filtering: Targeted investment insights
  📊 Comprehensive Tracking: Detailed investor intelligence
  🌐 Multi-Source Synchronization: Seamless data flow

  Workflow Architecture

  🔹 Stage 1: Investor Discovery
  Scheduled Trigger**: Daily market scanning
  CrunchBase API Integration**
  Intelligent Filtering**:
    Investor-specific organizations
    Key investment metrics
    Most recent data

  🔹 Stage 2: Data Extraction
  Comprehensive Metadata Parsing**
  Key Information Retrieval**
  Structured Data Preparation**

  🔹 Stage 3: Data Logging
  Google Sheets Integration**
  Automatic Row Appending**
  Real-Time Database Updates**

  Potential Use Cases
  Venture Capitalists**: Investment ecosystem mapping
  Startup Scouts**: Investor trend analysis
  Market Researchers**: Comprehensive investment insights
  Business Development**: Strategic partnership identification
  Investment Analysts**: Market intelligence gathering

  Setup Requirements
  CrunchBase API
     API credentials
     Configured access permissions
     Investor organization tracking setup

  Google Sheets
     Connected Google account
     Prepared tracking spreadsheet
     Appropriate sharing settings

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

  Future Enhancement Suggestions
  🤖 Advanced investment trend analysis
  📊 Multi-source investor aggregation
  🔔 Customizable alert mechanisms
  🌐 Expanded investment stage tracking
  🧠 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 business privacy
  Use data for legitimate research
  Maintain transparent information gathering
  Provide proper attribution

  Hashtag Performance Boost 🚀
  #InvestorIntelligence #VentureCapital #MarketResearch #AIWorkflow #DataAutomation #StartupEcosystem #InvestmentTracking #BusinessIntelligence #TechInnovation #StartupFunding

  Workflow Visualization

  [Daily Trigger]
      ⬇️
  [Fetch Investor Data]
      ⬇️
  [Extract Investor Fields]
      ⬇️
  [Log to Google Sheets]

  Connect With Me

  Ready to revolutionize your investor research?

  📧 Email: Yaron@nofluff.online

  🎥 YouTube: @YaronBeen

  💼 LinkedIn: Yaron Been

  Transform your market intelligence with intelligent, automated workflows!

workflow_json:
  {"id":"8hRFK0iEjVKmthLq","meta":{"instanceId":"84ad02d6104594179f43f1ce9cfe3a81637b2faedb57dafcb9e649b7542988db","templateCredsSetupCompleted":true},"name":"CrunchBase Invester Data","tags":[],"nodes":[{"id":"49130296-ad2e-43f6-8ec4-7f72161a3a1b","name":"Daily Investor Data Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[0,0],"parameters":{"rule":{"interval":[{"triggerAtHour":9}]}},"typeVersion":1.2},{"id":"24caa890-abba-435d-a385-18cdef03dfe2","name":"Fetch Crunchbase Investor Data","type":"n8n-nodes-base.httpRequest","position":[220,0],"parameters":{"url":"https://api.crunchbase.com/api/v4/searches/organizations","method":"POST","options":{},"jsonBody":"{\n  \"field_ids\": [\n    \"identifier\",\n    \"name\",\n    \"short_description\",\n    \"location_identifiers\",\n    \"investment_stage\"\n  ],\n  \"query\": [\n    {\n      \"type\": \"predicate\",\n      \"field_id\": \"organization_types\",\n      \"operator_id\": \"includes\",\n      \"values\": [\n        \"investor\"\n      ]\n    }\n  ],\n  \"limit\": 5\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer YOUR_TOKEN_HERE"},{"name":"Authorization","value":"Bearer YOUR_TOKEN_HERE"}]}},"typeVersion":4.2},{"id":"4de0847b-6e11-457d-b04b-d03b4fb1e3c1","name":"Extract Investor Fields","type":"n8n-nodes-base.code","position":[540,0],"parameters":{"jsCode":"const entities = items[0].json.entities;\n\nreturn entities.map(entity => {\n  return {\n    json: {\n      name: entity.name,\n      short_description: entity.short_description,\n      location_identifiers: entity.location_identifiers,\n      investment_stage: entity.investment_stage\n    }\n  };\n});\n"},"typeVersion":2},{"id":"a7d08f10-1fde-4e99-9127-bf12926d4197","name":"Append to Investor Sheet","type":"n8n-nodes-base.googleSheets","position":[780,0],"parameters":{"columns":{"value":{"Name":"={{ $json.name }}","Location":"={{ $json.location_identifiers }}","Investment Stage":"={{ $json.investment_stage }}","Short description":"={{ $json.short_description }}"},"schema":[{"id":"Name","type":"string","display":true,"required":false,"displayName":"Name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Short description","type":"string","display":true,"required":false,"displayName":"Short description","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Location","type":"string","display":true,"required":false,"displayName":"Location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Investment Stage","type":"string","display":true,"removed":false,"required":false,"displayName":"Investment Stage","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/1XOUvOgrhDdOorEj0-TL4EiVygMd1wpD3cktI2_bm-Ww/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1XOUvOgrhDdOorEj0-TL4EiVygMd1wpD3cktI2_bm-Ww","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1XOUvOgrhDdOorEj0-TL4EiVygMd1wpD3cktI2_bm-Ww/edit?usp=drivesdk","cachedResultName":"CrunchBase Invester List"}},"credentials":{"googleSheetsOAuth2Api":{"id":"Rp7XiR3hxJfv03ZO","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"45c6eb29-4d24-49a6-b849-938b178b66c9","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-40,-1700],"parameters":{"color":5,"width":420,"height":1900,"content":"### 🔷 **SECTION 1: Getting the Data from Crunchbase**\n\n#### 🧩 Nodes:\n\n1. 🕒 **Daily Investor Data Trigger**\n2. 🌐 **Fetch Crunchbase Investor Data**\n\n---\n\n#### 🔍 What Happens in This Section?\n\nThis section is all about **automatically pulling investor data from Crunchbase** on a scheduled basis, without any manual effort.\n\n---\n\n#### 🕒 1. **Daily Investor Data Trigger**\n\n> *\"When should the automation run?\"*\n\n* This **Schedule Trigger** node starts your workflow automatically at your chosen time.\n* For example, it could run every day at 8 AM.\n* It removes the need to remember to check Crunchbase manually.\n\n✅ *Beginner Benefit:*\n\n> Even if you’re not technical, you just set the schedule and let n8n run this job every day while you sleep ☕📊\n\n---\n\n#### 🌐 2. **Fetch Crunchbase Investor Data**\n\n> *\"Where do we get the data from?\"*\n\n* This **HTTP Request** node sends a **POST request** to [Crunchbase’s API](https://data.crunchbase.com/docs).\n\n* It includes a **filter** for organization types like `investor` and requests fields like:\n\n  * `name`\n  * `short_description`\n  * `location_identifiers`\n  * `investment_stage`\n\n* Crunchbase replies with a **JSON** file full of matching investors.\n\n✅ *Beginner Benefit:*\n\n> You don’t need to open a browser or search anything. This step collects live investor data from Crunchbase and brings it into your workflow for you 🚀\n\n---\n\n### ✅ What This Section Gives You:\n\nA **live, up-to-date snapshot** of investor information, **automatically pulled** from Crunchbase, without coding or clicking.\n\n---\n\n"},"typeVersion":1},{"id":"2dd2de36-770c-4833-884b-1525c1411d46","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[480,-1400],"parameters":{"color":6,"width":460,"height":1600,"content":"### 🔷 **SECTION 2: Processing and Saving the Data**\n\n#### 🧩 Nodes:\n\n3. 🧮 **Extract Investor Fields**\n4. 📄 **Append to Investor Sheet**\n\n---\n\n#### 🔍 What Happens in This Section?\n\nNow that we have raw investor data, this section **cleans it up** and **stores it in a Google Sheet** for easy access and analysis.\n\n---\n\n#### 🧮 3. **Extract Investor Fields**\n\n> *\"Let’s clean and format the response.\"*\n\n* This **Code** node uses JavaScript to loop through the list of investors and extract just what you care about:\n\n  * ✅ Name\n  * 📝 Short description\n  * 🌍 Location\n  * 💰 Investment stage\n\n* Each investor becomes a **separate row-ready item** for Google Sheets.\n\n✅ *Beginner Benefit:*\n\n> You don’t need to look at messy data. This step reshapes it into a clean format automatically ✨\n\n---\n\n#### 📄 4. **Append to Investor Sheet**\n\n> *\"Store it somewhere useful.\"*\n\n* This **Google Sheets** node takes the cleaned data and **adds it to a selected sheet**.\n* It works like a magic assistant, typing the investor data into your spreadsheet row-by-row.\n* You now have a **running list** of investors to use for:\n\n  * 📈 Market research\n  * 🎯 Outreach planning\n  * 💡 Competitor benchmarking\n\n"},"typeVersion":1},{"id":"75231f28-c911-4bdc-a6a2-c6255d293eb3","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-1820,-1680],"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":"c8a8156f-946e-4a50-8789-aff9c66bd9b6","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1820,-1340],"parameters":{"color":4,"width":1289,"height":3278,"content":"## ✨ n8n Workflow: Investor Data Automation from Crunchbase to Google Sheets\n\n---\n\n### 🔷 **SECTION 1: Getting the Data from Crunchbase**\n\n#### 🧩 Nodes:\n\n1. 🕒 **Daily Investor Data Trigger**\n2. 🌐 **Fetch Crunchbase Investor Data**\n\n---\n\n#### 🔍 What Happens in This Section?\n\nThis section is all about **automatically pulling investor data from Crunchbase** on a scheduled basis, without any manual effort.\n\n---\n\n#### 🕒 1. **Daily Investor Data Trigger**\n\n> *\"When should the automation run?\"*\n\n* This **Schedule Trigger** node starts your workflow automatically at your chosen time.\n* For example, it could run every day at 8 AM.\n* It removes the need to remember to check Crunchbase manually.\n\n✅ *Beginner Benefit:*\n\n> Even if you’re not technical, you just set the schedule and let n8n run this job every day while you sleep ☕📊\n\n---\n\n#### 🌐 2. **Fetch Crunchbase Investor Data**\n\n> *\"Where do we get the data from?\"*\n\n* This **HTTP Request** node sends a **POST request** to [Crunchbase’s API](https://data.crunchbase.com/docs).\n\n* It includes a **filter** for organization types like `investor` and requests fields like:\n\n  * `name`\n  * `short_description`\n  * `location_identifiers`\n  * `investment_stage`\n\n* Crunchbase replies with a **JSON** file full of matching investors.\n\n✅ *Beginner Benefit:*\n\n> You don’t need to open a browser or search anything. This step collects live investor data from Crunchbase and brings it into your workflow for you 🚀\n\n---\n\n### ✅ What This Section Gives You:\n\nA **live, up-to-date snapshot** of investor information, **automatically pulled** from Crunchbase, without coding or clicking.\n\n---\n\n<br/>\n\n---\n\n### 🔷 **SECTION 2: Processing and Saving the Data**\n\n#### 🧩 Nodes:\n\n3. 🧮 **Extract Investor Fields**\n4. 📄 **Append to Investor Sheet**\n\n---\n\n#### 🔍 What Happens in This Section?\n\nNow that we have raw investor data, this section **cleans it up** and **stores it in a Google Sheet** for easy access and analysis.\n\n---\n\n#### 🧮 3. **Extract Investor Fields**\n\n> *\"Let’s clean and format the response.\"*\n\n* This **Code** node uses JavaScript to loop through the list of investors and extract just what you care about:\n\n  * ✅ Name\n  * 📝 Short description\n  * 🌍 Location\n  * 💰 Investment stage\n\n* Each investor becomes a **separate row-ready item** for Google Sheets.\n\n✅ *Beginner Benefit:*\n\n> You don’t need to look at messy data. This step reshapes it into a clean format automatically ✨\n\n---\n\n#### 📄 4. **Append to Investor Sheet**\n\n> *\"Store it somewhere useful.\"*\n\n* This **Google Sheets** node takes the cleaned data and **adds it to a selected sheet**.\n* It works like a magic assistant, typing the investor data into your spreadsheet row-by-row.\n* You now have a **running list** of investors to use for:\n\n  * 📈 Market research\n  * 🎯 Outreach planning\n  * 💡 Competitor benchmarking\n\n✅ *Beginner Benefit:*\n\n> You don’t copy-paste anything — n8n writes investor data into your sheet for you. It’s like having a personal assistant with no salary 📊🤖\n\n---\n\n### ✅ What This Section Gives You:\n\nA fully automated process that **cleans up Crunchbase data** and **stores it neatly** in Google Sheets — ready for analysis, dashboards, or reporting.\n\n---\n\n### 🎁 Final Outcome\n\n✅ No coding needed\n✅ Runs on autopilot\n✅ Clean data in your sheet\n✅ Use for strategy, marketing, or VC tracking\n\n---\n\n\n"},"typeVersion":1}],"active":false,"pinData":{"Fetch Crunchbase Investor Data":[{"json":{"paging":{"next_page":"cursor_string","total_items":1250,"current_page":1},"entities":[{"name":"Sequoia Capital","identifier":{"uuid":"12345","permalink":"sequoia-capital"},"investment_stage":["early_stage","seed"],"short_description":"Venture capital firm investing in early-stage companies.","location_identifiers":["united_states"]},{"name":"Andreessen Horowitz","identifier":{"uuid":"67890","permalink":"andreesen-horowitz"},"investment_stage":["seed","growth_stage"],"short_description":"Venture capital firm in Silicon Valley.","location_identifiers":["united_states"]}]}}]},"settings":{"executionOrder":"v1"},"versionId":"daeaf695-d4ae-460d-84b1-b4cdba520d28","connections":{"Extract Investor Fields":{"main":[[{"node":"Append to Investor Sheet","type":"main","index":0}]]},"Daily Investor Data Trigger":{"main":[[{"node":"Fetch Crunchbase Investor Data","type":"main","index":0}]]},"Fetch Crunchbase Investor Data":{"main":[[{"node":"Extract Investor Fields","type":"main","index":0}]]}}}


name: Daily Startup Intelligence: Crunchbase Updates to Email Digest with GPT
author_name: Yaron Been
author_username: yaron-nofluff
categories: []
created_at: 2025-06-06T13:43:04.848Z
updated_at: 2025-06-06T13:43:04.848Z
url: https://n8n.io/workflows/4732
scraped_at: 2025-07-06 21:16:30
description:
  🚀 Automated Startup Intelligence: CrunchBase Updates to Email Digest Workflow!

  Workflow Overview
  This cutting-edge n8n automation is a sophisticated startup intelligence tool designed to transform market research into actionable insights. By intelligently connecting CrunchBase, AI processing, and Gmail, this workflow:

  Discovers Startup Updates: 
     Automatically retrieves latest company information
     Tracks recent organizational changes
     Eliminates manual market research efforts

  Intelligent Data Processing:
     Filters and extracts key company details
     Generates AI-powered summaries
     Ensures comprehensive market intelligence

  Smart Summarization:
     Uses AI to create readable company updates
     Transforms complex data into digestible insights
     Provides professional, context-rich summaries

  Seamless Email Distribution:
     Automatically sends daily update digests
     Delivers insights directly to your inbox
     Enables rapid market awareness

  Key Benefits
  🤖 Full Automation: Zero-touch startup research
  💡 Smart Filtering: Targeted company insights
  📊 Comprehensive Tracking: Detailed market intelligence
  🌐 Multi-Source Synchronization: Seamless data flow

  Workflow Architecture

  🔹 Stage 1: Company Discovery
  Manual/Scheduled Trigger**: Market scanning
  CrunchBase API Integration**
  Intelligent Filtering**:
    Recent updates
    Specific time frames
    Key organizational information

  🔹 Stage 2: Data Extraction
  Comprehensive Metadata Parsing**
  Key Information Retrieval**
  Structured Data Preparation**

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

  🔹 Stage 4: Email Distribution
  Gmail Integration**
  Automated Update Digest**
  Personalized Delivery**

  Potential Use Cases
  Venture Capitalists**: Startup ecosystem tracking
  Market Researchers**: Industry trend analysis
  Startup Founders**: Competitive intelligence
  Business Strategists**: Market opportunity identification
  Investors**: Real-time company insights

  Setup Requirements
  CrunchBase API
     API credentials
     Configured access permissions
     Company update tracking setup

  OpenAI API
     GPT model access
     Summarization configuration
     API key management

  Gmail Account
     Connected email
     Digest email configuration
     Appropriate sending permissions

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

  Future Enhancement Suggestions
  🤖 Advanced company trend analysis
  📊 Multi-source intelligence gathering
  🔔 Customizable alert mechanisms
  🌐 Expanded industry tracking
  🧠 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 business privacy
  Use data for legitimate research
  Maintain transparent information gathering
  Provide proper attribution

  Hashtag Performance Boost 🚀
  #StartupIntelligence #MarketResearch #AIWorkflow #CompanyUpdates #BusinessIntelligence #TechInnovation #DataAutomation #StartupEcosystem #InvestorInsights #TrendTracking

  Workflow Visualization

  [Manual/Scheduled Trigger]
      ⬇️
  [Fetch Crunchbase Updates]
      ⬇️
  [Extract Company Details]
      ⬇️
  [AI Summarization]
      ⬇️
  [Send Email Digest]

  Connect With Me

  Ready to revolutionize your startup intelligence?

  📧 Email: Yaron@nofluff.online

  🎥 YouTube: @YaronBeen

  💼 LinkedIn: Yaron Been

  Transform your market 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":"wqZWgW8ymv4cC0Dk","meta":{"instanceId":"84ad02d6104594179f43f1ce9cfe3a81637b2faedb57dafcb9e649b7542988db","templateCredsSetupCompleted":true},"name":"Crunchbase Startup Activity Monitor","tags":[],"nodes":[{"id":"99e036b3-48e2-401d-91aa-e16a3b1951c2","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[760,260],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"wYwTjEv45IzlAOAu","name":"OpenAi account 2"}},"typeVersion":1.2},{"id":"815b5136-f670-4302-afd2-48bb799a6085","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1000,260],"parameters":{"jsonSchemaExample":"{\n  \"subject\": \"🚀 Crunchbase Company Updates - June 5, 2025\",\n  \"body\": \"🚀 Here's a summary of recent company updates from Crunchbase:\\n\\n🔹 **OpenAI**\\nAI research and deployment company.\\nIndustry: Artificial Intelligence, Machine Learning\\nLocation: San Francisco, USA\\nLast Updated: June 5, 2025\\n\\n🔹 **DeepMind**\\nSolving intelligence to benefit humanity.\\nIndustry: Deep Learning, Healthcare\\nLocation: London, GBR\\nLast Updated: June 5, 2025\"\n}\n"},"typeVersion":1.2},{"id":"c11c92e9-6ec1-42a9-885a-636677735131","name":"Trigger Manual Test","type":"n8n-nodes-base.manualTrigger","position":[0,0],"parameters":{},"typeVersion":1},{"id":"18b76b77-e9ec-4f57-a2d5-74d80daeaa14","name":"Fetch Crunchbase Updates","type":"n8n-nodes-base.httpRequest","position":[220,0],"parameters":{"url":"https://api.crunchbase.com/api/v4/entities/organizations","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"user_key","value":"YOUR_API_KEY"},{"name":"updated_since","value":"2025-06-05"}]},"headerParameters":{"parameters":[{"name":"Accept","value":"application/json"}]}},"typeVersion":4.2},{"id":"5a5391e9-99f2-4658-879f-8e3c29d10511","name":"Extract Company Details","type":"n8n-nodes-base.set","position":[440,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4bebf879-2d02-4fa8-ac71-91b7d83d3ed9","name":"data.items[0].properties.name","type":"string","value":"={{ $json.data.items[0].properties.name }}"},{"id":"31995946-952d-4dc3-ad4d-1bd925c11716","name":"data.items[0].properties.short_description","type":"string","value":"={{ $json.data.items[0].properties.short_description }}"},{"id":"2e3bd9f3-0c2a-49f5-b556-a392bb221790","name":"data.items[0].properties.categories","type":"string","value":"={{ $json.data.items[0].properties.categories }}"},{"id":"6af96090-ee35-49bd-9c08-a41b7f0c2e64","name":"data.items[0].properties.city_name","type":"string","value":"={{ $json.data.items[0].properties.city_name }}"},{"id":"ccb2b151-9184-4a50-8c80-b12ba95a13b3","name":"data.items[0].properties.country_code","type":"string","value":"={{ $json.data.items[0].properties.country_code }}"},{"id":"839bd2ea-e287-4fb7-902c-b7ea702692aa","name":"data.items[0].properties.updated_at","type":"string","value":"={{ $json.data.items[0].properties.updated_at }}"}]}},"typeVersion":3.4},{"id":"76b02289-ec75-4fc1-887e-b2ba0bc4d814","name":"Summarizer Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[800,0],"parameters":{"text":"=Name: {{ $json.data.items[0].properties.name }}\nDescription: {{ $json.data.items[0].properties.short_description }}\ncategories: {{ $json.data.items[0].properties.categories }}\ncity name: {{ $json.data.items[0].properties.city_name }}\ncountry name: {{ $json.data.items[0].properties.country_code }}\nupdated at: {{ $json.data.items[0].properties.updated_at }}","options":{"systemMessage":"You are a helpful assistant that writes email-ready summaries of recent company updates from Crunchbase. \n\nThe input contains data about recently updated organizations including their name, description, categories, location, and update time.\n\nSummarize the companies clearly in a professional tone. Include:\n- Company name (bold or highlighted)\n- One-line description\n- Industry/categories (comma-separated)\n- Location (City, Country)\n- Last updated time (formatted)\n\nFormat it for a human reader in plain text or HTML for email use. Use line breaks or bullet points to separate companies.\nAvoid repeating keys or technical jargon.\n"},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"a6cd42af-6785-4b25-bdd9-f66badc98a65","name":"Send Email with Summary","type":"n8n-nodes-base.gmail","position":[1340,0],"webhookId":"99a34399-48a4-4133-a5d0-9852d7e383de","parameters":{"sendTo":"shahkar.genai@gmail.com","message":"={{ $json.output.body }}","options":{"appendAttribution":false},"subject":"={{ $json.output.subject }}"},"credentials":{"gmailOAuth2":{"id":"noKcKj5FEpHHvboL","name":"Gmail account"}},"typeVersion":2.1},{"id":"1036ea4c-3106-406f-b0c4-6b40b70a47f1","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-40,-1280],"parameters":{"color":3,"width":640,"height":1460,"content":"## 🔹 **SECTION 1: Data Collection & Preprocessing**\n\n### 📍 Nodes Involved:\n\n* ✅ `Trigger Manual Test`\n* 🌐 `Fetch Crunchbase Updates`\n* ✏️ `Extract Company Details`\n\n---\n\n### 🧩 1. `Trigger Manual Test` 🖱️\n\n**Purpose:** This node is just for testing. It lets you **manually start** your workflow with a click.\n\n> 💡 In production, replace this with a **cron node** ⏰ if you want this workflow to run **automatically every day**.\n\n---\n\n### 🌐 2. `Fetch Crunchbase Updates` (HTTP Request)\n\n**Purpose:** This node sends a request to the [Crunchbase API](https://data.crunchbase.com/docs) to **fetch companies updated in the last 24 hours**.\n\n🔧 Here's what it does:\n\n* Makes a **GET request** to:\n  `https://api.crunchbase.com/api/v4/entities/organizations`\n* Adds parameters:\n\n  * `user_key`: Your Crunchbase API key 🔐\n  * `updated_since`: Yesterday’s date 📅\n\n> ✅ It returns a **list of updated companies** including names, descriptions, locations, and industries.\n\n---\n\n### ✏️ 3. `Extract Company Details`\n\n**Purpose:** Crunchbase API data can be complex. This node simplifies things.\n\n🛠 It:\n\n* Extracts **essential fields only** like:\n\n  * Name 🏢\n  * Description 📖\n  * Location 📍\n  * Industry 🏭\n  * Last Updated Date 🗓️\n* Prepares this data for the AI summarizer in a clean format.\n\n> 💡 This step ensures only the relevant information is passed forward, saving processing time and cost.\n\n---\n\n"},"typeVersion":1},{"id":"ccbc1ef4-0dbe-40c1-9a33-e6f6787d64d1","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[680,-1220],"parameters":{"color":5,"width":500,"height":1640,"content":"## 🧠 **SECTION 2: AI Summary + Email Delivery**\n\n### 🤖 Nodes Involved:\n\n* 🧠 `Summarize Company Updates`\n* 💬 `OpenAI Chat (GPT-4 or GPT-3.5)`\n* 🔎 `Parse JSON Email Summary`\n\n---\n\n### 🤖 4. `Summarize Company Updates` (AI Agent)\n\n**Purpose:** This is where the **magic happens**. It takes the company data and feeds it to an AI to generate a **plain-English summary**.\n\n🛠 It connects with:\n\n* `OpenAI Chat Model` (GPT-4 / 3.5):\n  Generates clear, readable summaries.\n* `Structured Output Parser`:\n  Forces the AI to return a **valid JSON object** with:\n\n  * `subject`: for the email subject line\n  * `body`: the plain text of the email\n\n📜 **System Prompt Used**:\n\n```txt\nYou are a helpful assistant that summarizes Crunchbase company updates.\n\nOutput your response strictly as valid JSON with two properties: \n- \"subject\": a string for the email subject line.\n- \"body\": a string for the email content formatted in plain text. Use \"\\n\" for new lines inside the string.\n\nDo NOT output anything other than the JSON object.  \nEnsure the JSON is well-formed with no trailing commas or syntax errors.\n```\n\n---\n\n### 🔎 5. `Parse JSON Email Summary` (Structured Output Parser)\n\n**Purpose:** Ensures that the response from the AI is valid JSON and separates `subject` and `body`.\n\n✅ Without this, n8n can't reliably extract the email content from the AI's response.\n\n---\n\n\n"},"typeVersion":1},{"id":"4688303f-35a1-4f0c-bdf8-c66326c46eea","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1260,-360],"parameters":{"color":6,"width":300,"height":540,"content":"## 🧠 **SECTION 3: Send email with summary (Gmail)\n\n**Purpose:** Finally, this node sends you an email 📨 with the Crunchbase update summaries.\n\n🛠 It uses:\n\n* `{{$json.subject}}` for the email subject\n* `{{$json.body}}` for the content\n\n"},"typeVersion":1},{"id":"735ec384-c931-4ccd-8f10-5140beee552a","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-1460,-1280],"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":"208f299f-4fe1-406e-8014-82e47d0a9a2f","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1460,-940],"parameters":{"color":4,"width":1289,"height":3278,"content":" 🧠 Automating Crunchbase Insights with n8n\n\n### 📈 Get Daily Company Updates → 🤖 Summarize → 📧 Email Digest\n\nThis workflow helps you stay informed on the latest company activity (from Crunchbase) by automating the entire process — fetching updates, summarizing them with AI, and emailing them to you daily.\n\n---\n\n## 🔹 **SECTION 1: Data Collection & Preprocessing**\n\n### 📍 Nodes Involved:\n\n* ✅ `Trigger Manual Test`\n* 🌐 `Fetch Crunchbase Updates`\n* ✏️ `Extract Company Details`\n\n---\n\n### 🧩 1. `Trigger Manual Test` 🖱️\n\n**Purpose:** This node is just for testing. It lets you **manually start** your workflow with a click.\n\n> 💡 In production, replace this with a **cron node** ⏰ if you want this workflow to run **automatically every day**.\n\n---\n\n### 🌐 2. `Fetch Crunchbase Updates` (HTTP Request)\n\n**Purpose:** This node sends a request to the [Crunchbase API](https://data.crunchbase.com/docs) to **fetch companies updated in the last 24 hours**.\n\n🔧 Here's what it does:\n\n* Makes a **GET request** to:\n  `https://api.crunchbase.com/api/v4/entities/organizations`\n* Adds parameters:\n\n  * `user_key`: Your Crunchbase API key 🔐\n  * `updated_since`: Yesterday’s date 📅\n\n> ✅ It returns a **list of updated companies** including names, descriptions, locations, and industries.\n\n---\n\n### ✏️ 3. `Extract Company Details`\n\n**Purpose:** Crunchbase API data can be complex. This node simplifies things.\n\n🛠 It:\n\n* Extracts **essential fields only** like:\n\n  * Name 🏢\n  * Description 📖\n  * Location 📍\n  * Industry 🏭\n  * Last Updated Date 🗓️\n* Prepares this data for the AI summarizer in a clean format.\n\n> 💡 This step ensures only the relevant information is passed forward, saving processing time and cost.\n\n---\n\n## 🧠 **SECTION 2: AI Summary + Email Delivery**\n\n### 🤖 Nodes Involved:\n\n* 🧠 `Summarize Company Updates`\n* 💬 `OpenAI Chat (GPT-4 or GPT-3.5)`\n* 🔎 `Parse JSON Email Summary`\n* 📬 `Send Email with Summary`\n\n---\n\n### 🤖 4. `Summarize Company Updates` (AI Agent)\n\n**Purpose:** This is where the **magic happens**. It takes the company data and feeds it to an AI to generate a **plain-English summary**.\n\n🛠 It connects with:\n\n* `OpenAI Chat Model` (GPT-4 / 3.5):\n  Generates clear, readable summaries.\n* `Structured Output Parser`:\n  Forces the AI to return a **valid JSON object** with:\n\n  * `subject`: for the email subject line\n  * `body`: the plain text of the email\n\n📜 **System Prompt Used**:\n\n```txt\nYou are a helpful assistant that summarizes Crunchbase company updates.\n\nOutput your response strictly as valid JSON with two properties: \n- \"subject\": a string for the email subject line.\n- \"body\": a string for the email content formatted in plain text. Use \"\\n\" for new lines inside the string.\n\nDo NOT output anything other than the JSON object.  \nEnsure the JSON is well-formed with no trailing commas or syntax errors.\n```\n\n---\n\n### 🔎 5. `Parse JSON Email Summary` (Structured Output Parser)\n\n**Purpose:** Ensures that the response from the AI is valid JSON and separates `subject` and `body`.\n\n✅ Without this, n8n can't reliably extract the email content from the AI's response.\n\n---\n\n### 📧 6. `Send Email with Summary` (Gmail)\n\n**Purpose:** Finally, this node sends you an email 📨 with the Crunchbase update summaries.\n\n🛠 It uses:\n\n* `{{$json.subject}}` for the email subject\n* `{{$json.body}}` for the content\n\n> 💡 You can configure this to send it to your **team**, **investors**, or even yourself daily to stay updated.\n\n---\n\n## 🏁 What This Workflow Does for You\n\n✨ **Effortlessly monitor industry trends**\n📬 **Get a beautifully summarized digest every day**\n⏳ **Save hours of manual research**\n💡 **Perfect for startup founders, analysts, investors, and marketers**\n\n---\n\n## ✅ Bonus Tip for Beginners\n\nTo make this **run automatically every day**, add this node at the top:\n\n* 🕒 `Cron Node`\n  Set schedule: every day at 8 AM (or whenever you like)\n\n---\n"},"typeVersion":1}],"active":false,"pinData":{"Fetch Crunchbase Updates":[{"json":{"data":{"items":[{"type":"Organization","uuid":"123abc-456def","properties":{"name":"OpenAI","city_name":"San Francisco","categories":[{"name":"Artificial Intelligence"},{"name":"Machine Learning"}],"identifier":{"uuid":"123abc-456def","value":"OpenAI","image_id":"abcd1234","permalink":"openai"},"updated_at":"2025-06-05T12:34:56Z","country_code":"USA","short_description":"AI research and deployment company."}},{"type":"Organization","uuid":"789ghi-101jkl","properties":{"name":"DeepMind","city_name":"London","categories":[{"name":"Deep Learning"},{"name":"Healthcare"}],"identifier":{"uuid":"789ghi-101jkl","value":"DeepMind","image_id":"efgh5678","permalink":"deepmind"},"updated_at":"2025-06-05T09:12:45Z","country_code":"GBR","short_description":"Solving intelligence, to advance science and benefit humanity."}}],"paging":{"total_items":2,"current_page":1,"number_of_pages":1}}}}]},"settings":{"executionOrder":"v1"},"versionId":"5812b502-7fa9-4497-bcaa-3d0866c70c89","connections":{"Summarizer Agent":{"main":[[{"node":"Send Email with Summary","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Summarizer Agent","type":"ai_languageModel","index":0}]]},"Trigger Manual Test":{"main":[[{"node":"Fetch Crunchbase Updates","type":"main","index":0}]]},"Extract Company Details":{"main":[[{"node":"Summarizer Agent","type":"main","index":0}]]},"Fetch Crunchbase Updates":{"main":[[{"node":"Extract Company Details","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Summarizer Agent","type":"ai_outputParser","index":0}]]}}}


name: Automated Job Hunter: Upwork Opportunity Aggregator & AI-Powered Notifier
author_name: Yaron Been
author_username: yaron-nofluff
categories: []
created_at: 2025-06-06T13:44:04.045Z
updated_at: 2025-06-06T13:44:04.045Z
url: https://n8n.io/workflows/4733
scraped_at: 2025-07-06 21:16:30
description:
  🚀 Automated Job Hunter: Upwork Opportunity Aggregator & AI-Powered Notifier!

  Workflow Overview
  This cutting-edge n8n automation is a sophisticated job discovery and notification tool designed to transform freelance job hunting into a seamless, intelligent process. By intelligently connecting Apify, OpenAI, Google Sheets, and Gmail, this workflow:

  Discovers Job Opportunities: 
     Automatically scrapes Upwork job listings
     Tracks recent freelance opportunities
     Eliminates manual job searching efforts

  Intelligent Data Processing:
     Filters and extracts key job details
     Structures job information
     Ensures comprehensive opportunity tracking

  AI-Powered Summarization:
     Generates concise job summaries
     Creates human-readable job digests
     Provides quick, actionable insights

  Seamless Notification:
     Automatically logs jobs to Google Sheets
     Sends personalized email digests
     Enables rapid opportunity assessment

  Key Benefits
  🤖 Full Automation: Zero-touch job discovery
  💡 Smart Filtering: Targeted job opportunities
  📊 Comprehensive Tracking: Detailed job market insights
  🌐 Multi-Platform Synchronization: Seamless data flow

  Workflow Architecture

  🔹 Stage 1: Job Discovery
  Scheduled Trigger**: Daily job scanning
  Apify Integration**: Upwork job scraping
  Intelligent Filtering**:
    Recent job postings
    Specific keywords
    Relevant opportunities

  🔹 Stage 2: Data Extraction
  Comprehensive Job Metadata Parsing**
  Key Information Retrieval**
  Structured Data Preparation**

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

  🔹 Stage 4: Multi-Platform Distribution
  Google Sheets Logging**
  Gmail Integration**
  Automated Job Digest Delivery**

  Potential Use Cases
  Freelancers**: Opportunity tracking
  Job Seekers**: Automated job discovery
  Recruitment Agencies**: Market intelligence
  Skill Development Professionals**: Trend monitoring
  Career Coaches**: Client opportunity identification

  Setup Requirements
  Apify
     Upwork scraping actor
     API token
     Configured scraping parameters

  OpenAI API
     GPT model access
     Summarization configuration
     API key management

  Google Sheets
     Connected Google account
     Prepared job tracking spreadsheet
     Appropriate sharing settings

  Gmail Account
     Connected email
     Job digest configuration
     Appropriate sending permissions

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

  Future Enhancement Suggestions
  🤖 Advanced job matching algorithms
  📊 Multi-platform job aggregation
  🔔 Customizable alert mechanisms
  🌐 Expanded job category tracking
  🧠 Machine learning job recommendation

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

  Ethical Guidelines
  Respect job poster privacy
  Use data for legitimate job searching
  Maintain transparent information gathering
  Provide proper attribution

  Hashtag Performance Boost 🚀
  #FreelanceJobHunting #CareerAutomation #JobDiscovery #AIJobSearch #WorkflowAutomation #FreelanceTech #CareerIntelligence #JobMarketInsights #ProfessionalNetworking #TechJobSearch

  Workflow Visualization

  [Daily Trigger]
      ⬇️
  [Fetch Upwork Jobs]
      ⬇️
  [Format Job Fields]
      ⬇️
  [Log to Google Sheets]
      ⬇️
  [AI Summarization]
      ⬇️
  [Send Email Digest]

  Connect With Me

  Ready to revolutionize your job hunting strategy?

  📧 Email: Yaron@nofluff.online

  🎥 YouTube: @YaronBeen

  💼 LinkedIn: Yaron Been

  Transform your job search with intelligent, automated workflows!

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:
  {"id":"Q4LhFRDraaQuorBs","meta":{"instanceId":"84ad02d6104594179f43f1ce9cfe3a81637b2faedb57dafcb9e649b7542988db","templateCredsSetupCompleted":true},"name":"Upwork Job Aggregator & Notifier","tags":[],"nodes":[{"id":"834d0a42-1398-4cd4-aaf3-b1164e00b4a8","name":"Daily Upwork Job Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[0,0],"parameters":{"rule":{"interval":[{"triggerAtHour":9}]}},"typeVersion":1.2},{"id":"a0d54dfe-fc68-4020-b2ed-d191a57d5897","name":"Fetch Upwork Jobs (Apify)","type":"n8n-nodes-base.httpRequest","position":[220,0],"parameters":{"url":"https://api.apify.com/v2/actor-tasks/<YOUR_TASK_ID>/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>","method":"POST","options":{}},"typeVersion":4.2},{"id":"a9812fc7-0fa5-492a-91aa-392d0c8ee43b","name":"Format Job Fields","type":"n8n-nodes-base.set","position":[440,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"24bd782a-a34f-4b98-8d8f-21763181677b","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"ee879b3d-339a-44c2-9e11-f653edab2e7f","name":"url","type":"string","value":"={{ $json.url }}"},{"id":"b5ff7975-667b-4997-ac8f-acbe9a3b3b85","name":"description","type":"string","value":"={{ $json.description }}"},{"id":"29051fc3-e4f8-4e39-a024-d7b943271acc","name":"budget","type":"string","value":"={{ $json.budget }}"},{"id":"a6492128-a58a-4735-b427-12265f81da3a","name":"datePosted","type":"string","value":"={{ $json.datePosted }}"}]}},"typeVersion":3.4},{"id":"a996aa35-8f0d-4e1a-997b-4aadd402f65c","name":"Log Jobs to Google Sheet","type":"n8n-nodes-base.googleSheets","position":[740,0],"parameters":{"columns":{"value":{"url":"={{ $json.url }}","title":"={{ $json.title }}","budget":"={{ $json.budget }}","datePosted":"={{ $json.datePosted }}","description":"={{ $json.description }}"},"schema":[{"id":"title","type":"string","display":true,"required":false,"displayName":"title","defaultMatch":false,"canBeUsedToMatch":true},{"id":"url","type":"string","display":true,"required":false,"displayName":"url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"description","type":"string","display":true,"required":false,"displayName":"description","defaultMatch":false,"canBeUsedToMatch":true},{"id":"budget","type":"string","display":true,"required":false,"displayName":"budget","defaultMatch":false,"canBeUsedToMatch":true},{"id":"datePosted","type":"string","display":true,"required":false,"displayName":"datePosted","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/1dEU6uMB4ehiGXjIExjtFQHvUjANRODawKMBGKDaTcEc/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1dEU6uMB4ehiGXjIExjtFQHvUjANRODawKMBGKDaTcEc","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1dEU6uMB4ehiGXjIExjtFQHvUjANRODawKMBGKDaTcEc/edit?usp=drivesdk","cachedResultName":"Upwork Scraper"}},"credentials":{"googleSheetsOAuth2Api":{"id":"v021NCWuTwSSSXPP","name":"Google Sheets account 2"}},"typeVersion":4.5},{"id":"e0cd68e5-4d6d-479a-8a48-1faccc9f3ff7","name":"Summarize Job Listings","type":"@n8n/n8n-nodes-langchain.agent","position":[960,0],"parameters":{"text":"=Provide a summary of the upwork jobs. It should be in email format\n\nTitle: {{ $json.title }}\nURL: {{ $json.url }}\nDescription:{{ $json.description }}\nBudget:{{ $json.budget }}\nDate posted: {{ $json.datePosted }}","options":{},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"30002e32-6046-4e5c-a27f-a0d58f380ae9","name":"Send Job Summary Email","type":"n8n-nodes-base.gmail","position":[1500,0],"webhookId":"6937d724-5ede-4c56-83fd-fde84496eabd","parameters":{"sendTo":"shahkar.genai@gmail.com","message":"={{ $json.output.Summary }}","options":{},"subject":"={{ $json.output.subject }}"},"credentials":{"gmailOAuth2":{"id":"YMHjS2nJsRGP7svY","name":"Gmail account"}},"typeVersion":2.1},{"id":"a1fb5d66-b780-4b6b-96be-3391b6196301","name":"OpenAI Job Summarizer","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[900,260],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"wYwTjEv45IzlAOAu","name":"OpenAi account 2"}},"typeVersion":1.2},{"id":"f79a7336-80fc-4832-862b-51d0d737d5a3","name":"Parse Summary Output","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1160,260],"parameters":{"jsonSchemaExample":"{\n  \"subject\": \"Upwork Job Opportunity: Webflow Expert Needed for Portfolio Website\",\n  \"Summary\": \"The client is seeking a designer with strong experience in Webflow to create a responsive and elegant portfolio site.\"\n}\n"},"typeVersion":1.2},{"id":"85465ead-0a06-455c-9308-866c092d8ef5","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-60,-560],"parameters":{"color":3,"width":640,"height":760,"content":"### 🔁 **Section 1: Job Fetch & Preparation**\n\n📦 **Group Name**: `📥 Fetch & Prepare Upwork Jobs`\n\n#### ✅ **Included Nodes:**\n\n1. `🕒 Daily Upwork Job Trigger`\n2. `🌐 Fetch Upwork Jobs (Apify)`\n3. `🛠️ Format Job Fields`\n\n#### 📋 **What this group does:**\n\nThis group is responsible for automatically triggering the job search, pulling fresh job data from Upwork (via Apify), and formatting that data into a clean, structured format.\n\n#### 📌 **Highlights:**\n\n* Uses Apify’s `run-sync-get-dataset-items` to ensure you get fresh job results in one go.\n* Ensures only the required fields (like title, URL, budget) are passed forward.\n* Keeps your data clean and minimal for logging and summarization.\n\n---"},"typeVersion":1},{"id":"3699ba73-75ee-4bf2-91eb-8d0d05143321","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[680,-620],"parameters":{"color":5,"width":620,"height":1040,"content":"### 📊 **Section 2: Data Logging & Summary Generation**\n\n📦 **Group Name**: `🧾 Log & Summarize Jobs`\n\n#### ✅ **Included Nodes:**\n\n1. `📈 Log Jobs to Google Sheet`\n2. `🤖 Summarize Job Listings`\n\n   * `🧠 OpenAI Job Summarizer`\n   * `📄 Parse Summary Output`\n\n#### 📋 **What this group does:**\n\nThis group handles the dual responsibility of:\n\n* Persistently logging all job entries to a **Google Sheet**\n* Generating a human-friendly **natural language summary** of the fetched jobs using the OpenAI model and parsing the result into clean output\n\n#### 💡 **Why this matters:**\n\n* Keeps historical records in Sheets ✅\n* Makes email digest more meaningful and less overwhelming for the reader 🧠\n\n---\n\n"},"typeVersion":1},{"id":"2289feb5-9ab1-4dbb-a77e-f4742f0f341d","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1400,-420],"parameters":{"color":6,"width":340,"height":600,"content":"## 📤 **Section 3: Job Summary Notification**\n\n📦 **Group Name**: `✉️ Notify via Email`\n\n#### ✅ **Included Node:**\n\n1. `📧 Send Job Summary Email`\n\n#### 📋 **What this group does:**\n\nSends a **summary email** to the desired recipient(s) with the content generated by the AI agent.\n\n"},"typeVersion":1},{"id":"95727922-4856-4481-acff-519638ac5d23","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-1520,-560],"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":"c161b105-70a6-431a-91e2-9031ccba8fe4","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1520,-220],"parameters":{"color":4,"width":1289,"height":3058,"content":"# ✅ n8n Automation: \"Upwork Job Aggregator & Notifier\"\n\n> **Purpose**: Automatically fetch job postings from Upwork with specific keywords, save them in Google Sheets, summarize them using AI, and email the results daily (or at any interval you want).\n\n---\n\n## 🧱 HIGH-LEVEL OVERVIEW\n\n| Feature         | Description                                          |\n| --------------- | ---------------------------------------------------- |\n| 🕐 Trigger      | Scheduled (e.g., every 6 hours)                      |\n| 🌐 Source       | [Apify](https://apify.com) actor for Upwork scraping |\n| 📄 Storage      | Google Sheets                                        |\n| 🧠 Summary      | OpenAI model with structured output                  |\n| 📬 Notification | Gmail with formatted job summary                     |\n\n---\n\n## 🧠 GROUP 1: 📥 Fetch & Prepare Upwork Jobs\n\n### 🟢 Nodes:\n\n1. `🕒 Daily Upwork Job Trigger`\n\n   * **Type**: Cron Trigger\n   * **Purpose**: Runs the flow automatically at your set interval (e.g., every 6 hours or daily)\n\n2. `🌐 Fetch Upwork Jobs (Apify)`\n\n   * **Type**: HTTP Request\n   * **Method**: POST\n   * **URL**: `https://api.apify.com/v2/actor-tasks/<TASK_ID>/run-sync-get-dataset-items?token=<API_TOKEN>`\n   * **Purpose**: Calls your Apify Upwork Scraper task to get the latest job listings\n   * **Output**: JSON array of job objects\n\n3. `🛠️ Format Job Fields`\n\n   * **Type**: Edit Fields (Set or Function Node)\n   * **Purpose**: Extracts needed job fields like `title`, `url`, `description`, `budget`, and `datePosted`\n   * **Reason**: Makes data uniform for Sheet storage and AI summary\n\n---\n\n## 📊 GROUP 2: 🧾 Log & Summarize Jobs\n\n### 🟢 Nodes:\n\n4. `📈 Log Jobs to Google Sheet`\n\n   * **Type**: Google Sheets → Append Sheet\n   * **Sheet Setup**: Must have headers like `Title`, `URL`, `Description`, `Budget`, `Date`\n   * **Purpose**: Appends each new job as a row in the sheet for historical tracking\n\n5. `🤖 Summarize Job Listings` (AI Agent node group)\n\n   * **Type**: Tools Agent (LangChain / OpenAI Integration)\n   * **Connected Sub-Nodes**:\n\n     * `🧠 OpenAI Job Summarizer` (OpenAI Chat Model)\n\n       * **Prompt** example:\n\n         ```\n         You are an assistant summarizing freelance job postings. Summarize each job in 1-2 lines. Include title, budget, and a short description.\n         ```\n     * `📄 Parse Summary Output` (Structured Output Parser)\n\n       * **Purpose**: Converts the AI response into structured n8n items\n   * **Input**: Job data from Google Sheets\n   * **Output**: A clear, natural language summary of all jobs\n\n---\n\n## 📤 GROUP 3: ✉️ Notify via Email\n\n### 🟢 Node:\n\n6. `📧 Send Job Summary Email`\n\n   * **Type**: Gmail → Send Message\n\n   * **Authentication**: Google OAuth2\n\n   * **To**: Yourself or your team\n\n   * **Subject**: `\"🚀 New Upwork Jobs Found!\"`\n\n   * **Body**:\n\n     ```\n     Hello,\n\n     Here’s a summary of the latest Upwork jobs matching your criteria:\n\n     {{summary from AI}}\n\n     ➕ View full job list here: [Google Sheet Link]\n\n     Best,  \n     Your Automation Bot 🤖\n     ```\n\n   * **Error Handling**: Add an IF node to prevent email if no jobs were returned (optional)\n\n---\n\n## 🗂 Suggested Color-Coded Groups in n8n:\n\n| Group                          | Nodes                                | Color     | Description                     |\n| ------------------------------ | ------------------------------------ | --------- | ------------------------------- |\n| 📥 Fetch & Prepare Upwork Jobs | Trigger, HTTP Request, Format Fields | 🟢 Green  | Gets data and prepares it       |\n| 🧾 Log & Summarize Jobs        | Google Sheets, AI Agent, Parser      | 🟡 Yellow | Logs + creates smart summaries  |\n| ✉️ Notify via Email            | Gmail                                | 🔴 Red    | Notifies you with clean summary |\n\n---\n\n## 🚀 ADVANTAGES\n\n✅ Completely automated\n✅ Saves all job history\n✅ AI-enhanced summaries\n✅ Instant email alerts\n✅ Easy to expand or customize\n\n---\n\n## 🧩 Bonus Enhancements (Optional)\n\n| Idea                      | Description                                                   |\n| ------------------------- | ------------------------------------------------------------- |\n| 🔍 Add keyword filters    | Add filters before saving to Sheets (e.g., only “React” jobs) |\n| 🕵️‍♂️ Prevent duplicates | Store job IDs and check before saving                         |\n| 📣 Add Slack alerts       | Add Slack node for team notification                          |\n| 📊 Dashboard              | Build Google Data Studio report over the Sheet                |\n\n---\n\n\n"},"typeVersion":1}],"active":false,"pinData":{"Fetch Upwork Jobs (Apify)":[{"json":{"url":"https://www.upwork.com/job/Looking-Webflow-Expert-Build-Portfolio-Website_~01abcd123456efghij","title":"Looking for a Webflow Expert to Build a Portfolio Website","budget":"$300","datePosted":"2025-06-03T08:45:00Z","description":"Need a designer with strong Webflow experience to create a responsive and elegant portfolio site."}},{"json":{"url":"https://www.upwork.com/job/React-Developer-Needed-SaaS-Dashboard_~0123abcd4567efghij","title":"React Developer Needed for SaaS Dashboard","budget":"$500","datePosted":"2025-06-03T06:30:00Z","description":"Looking for an experienced React developer to work on our SaaS product dashboard UI. Experience with Tailwind is a plus."}},{"json":{"url":"https://www.upwork.com/job/Copywriter-Landing-Page-Finance_~0a1b2c3d4e5f67890","title":"Copywriter for Landing Page Content (Finance Industry)","budget":"$150","datePosted":"2025-06-02T21:15:00Z","description":"We need SEO-optimized copy for a fintech landing page. Prior experience in finance writing preferred."}}]},"settings":{"executionOrder":"v1"},"versionId":"8c929fc6-2198-4adf-89c3-ff0a2b296fdd","connections":{"Format Job Fields":{"main":[[{"node":"Log Jobs to Google Sheet","type":"main","index":0}]]},"Parse Summary Output":{"ai_outputParser":[[{"node":"Summarize Job Listings","type":"ai_outputParser","index":0}]]},"OpenAI Job Summarizer":{"ai_languageModel":[[{"node":"Summarize Job Listings","type":"ai_languageModel","index":0}]]},"Summarize Job Listings":{"main":[[{"node":"Send Job Summary Email","type":"main","index":0}]]},"Daily Upwork Job Trigger":{"main":[[{"node":"Fetch Upwork Jobs (Apify)","type":"main","index":0}]]},"Log Jobs to Google Sheet":{"main":[[{"node":"Summarize Job Listings","type":"main","index":0}]]},"Fetch Upwork Jobs (Apify)":{"main":[[{"node":"Format Job Fields","type":"main","index":0}]]}}}


name: AI Blog Generator for Shopify Product listings: Using GPT-4o and Google Sheets
author_name: Kumar Shivam
author_username: shivam840708
categories: []
created_at: 2025-06-06T15:00:32.038Z
updated_at: 2025-06-06T15:00:32.038Z
url: https://n8n.io/workflows/4735
scraped_at: 2025-07-06 21:16:30
description:
  🧠 AI Blog Generator for Shopify Products using GPT-4o

  The AI Blog Generator is an advanced automation workflow powered by n8n, integrating GPT-4o and Google Sheets to generate SEO-rich blog articles for Shopify products. It automates the entire process — from pulling product data, analyzing images for nutritional information, to producing structured HTML content ready for publishing — with zero manual writing.

  💡 Key Advantages

  🔗 Shopify Product Sync**  
    Automatically pulls product data (title, description, images, etc.) via Shopify API.

  🤖 AI-Powered Nutrition Extraction**  
    Uses GPT-4o to intelligently analyze product images and extract nutritional information.

  ✍️ SEO Blog Generation**  
    GPT-4o generates blog titles, meta descriptions, and complete articles using both product metadata and extracted nutritional info.

  🗂️ Structured Content Output**  
    Produces well-formatted HTML with headers, bullet points, and nutrition tables for seamless Shopify blog integration.

  📄 Google Sheets Integration**  
    Tracks blog creation, manages retries, and prevents duplicate publishing using a centralized Google Sheet.

  📤 Shopify Blog API Integration**  
    Publishes the generated blog to Shopify using a two-step blog + article API call.

  ⚙️ How It Works

  Manual Trigger  
     Initiate the process using a test trigger or a scheduler.

  Fetch Products from Shopify  
     Retrieves all product details including descriptions and images.

  Extract Product Images  
     Splits and processes each image individually.

  OCR + Nutrition AI  
     GPT-4o reads nutrition facts from product images. Skips items without valid info.

  Check Existing Logs  
     References a Google Sheet to avoid duplicates and determine retry status.

  AI Blog Generation  
     Creates a blog with headings, bullet points, intro, and a nutrition table.

  Shopify Blog + Article Posting  
     Uses the Shopify API to publish the blog and its content.

  Update Google Sheet  
     Logs the blog URL, HTML content, errors, and status for future reference.

  🛠️ Setup Steps

  Shopify Node**: Connects to your Shopify store and fetches product data.  
  Split Out Node**: Divides product images for individual OCR processing.  
  OpenAI Node**: Uses GPT-4o to extract nutrition data from images.  
  If Node**: Filters for entries with valid nutrition information.  
  Edit Fields Node**: Formats the product data for AI processing.  
  AI Agent Node**: Generates SEO blog content.  
  Google Sheets Nodes**: Reads and updates blog creation status.  
  HTTP Request Nodes**: Posts the blog and article via Shopify’s API.

  🔐 Credentials Required

  Shopify Access Token** – For retrieving product data and posting blogs  
  OpenAI API Key** – For GPT-4o-based AI generation and image processing  
  Google Sheets OAuth** – For accessing the log sheet

  👤 Ideal For

  Ecommerce teams looking to automate content for hundreds of products  
  Shopify store owners aiming to boost organic traffic through blogging  
  Marketing teams building scalable, AI-driven content workflows

  💬 Bonus Tip

  The workflow is modular. You can easily extend it with internal linking, language translation, or even social media sharing — all within the same n8n flow.

nodes_used:
  ["n8n-nodes-base.shopify","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"meta":{"instanceId":"d73282515b90623d4a8783919a2d772c706425d649e1512792f37ac51e07e4a8","templateCredsSetupCompleted":true},"nodes":[{"id":"096ccd11-0ae4-4e3d-aeac-d180c09512ae","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[300,180],"parameters":{},"typeVersion":1},{"id":"c95491ab-6e4e-4671-bfaf-b8a362d2ec01","name":"Shopify","type":"n8n-nodes-base.shopify","position":[580,180],"parameters":{"resource":"product","operation":"getAll","returnAll":true,"authentication":"accessToken","additionalFields":{}},"credentials":{"shopifyAccessTokenApi":{"id":"oPLCxaUiftgs7Mna","name":"Shopify Access Token account"}},"typeVersion":1},{"id":"1620e19b-cd01-4798-858c-8f2fb3d58087","name":"Split Out","type":"n8n-nodes-base.splitOut","position":[840,180],"parameters":{"options":{},"fieldToSplitOut":"images"},"typeVersion":1},{"id":"944ab8ba-6e41-4e04-b442-9468ff341ba0","name":"OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[1060,180],"parameters":{"text":"=You are an expert OCR and nutrition facts extractor. You carefully extract only the exact nutritional data present in the image without fabricating or guessing. You can recognize nutritional facts tables, and you know how to distinguish between actual nutrition data and promotional or partial text. You return null if no clear nutrition facts table or readable nutritional information is present.\n\n\nYou will analyze an image containing a product's nutritional information. Extract all nutritional data exactly as shown in the image, including nutrient names, amounts, units, and daily values if present.\n\n- If the image clearly contains a nutritional facts table or full nutritional data, output it in clean JSON format, where each nutrient is a key and the value contains the amount, unit, and daily value if available.\n- If the image shows only partial, blurry, or promotional text like \"20% protein\" or any incomplete nutritional data, do NOT fabricate any values; instead, return null.\n- If there is no clear nutritional facts table or nutritional data visible in the image, return null.\n- Do not guess or invent any numbers.\n- Only include information that is confidently present and readable in the image.\n\nExample output when nutrition facts are present:\n\n{\n  \"Calories\": \"190\",\n  \"Total Fat\": {\n    \"amount\": \"8g\",\n    \"daily_value\": \"10%\"\n  },\n  \"Cholesterol\": {\n    \"amount\": \"0mg\",\n    \"daily_value\": \"0%\"\n  },\n  ...\n}\n\nExample output when no valid nutritional facts table or data is visible:\n\nnull\n","modelId":{"__rl":true,"mode":"list","value":"chatgpt-4o-latest","cachedResultName":"CHATGPT-4O-LATEST"},"options":{"detail":"auto","maxTokens":900},"resource":"image","imageUrls":"={{ $json.src }}","operation":"analyze"},"credentials":{"openAiApi":{"id":"OizdHUANhz9NIHyd","name":"OpenAi account"}},"typeVersion":1.8},{"id":"390bd7e4-b7bc-4575-9fe4-36a81445c7d3","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1480,580],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"OizdHUANhz9NIHyd","name":"OpenAi account"}},"typeVersion":1.2},{"id":"de84b88d-e96e-4c3c-a9f9-71cfc413022e","name":"If","type":"n8n-nodes-base.if","position":[1240,180],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"6aa4dfe1-d907-47e8-b97e-3a77bb30c1d0","operator":{"type":"string","operation":"notEquals"},"leftValue":"={{ $json.content }}","rightValue":"null"}]}},"typeVersion":2.2},{"id":"9ef20e21-7ad8-409f-a13e-e1088ec4e4a3","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","position":[1240,440],"parameters":{},"typeVersion":1},{"id":"0cfadf47-06c7-4b00-b660-87241cc4bf4c","name":"Create Blog id","type":"n8n-nodes-base.httpRequestTool","position":[2500,620],"parameters":{"url":"=https://smartworkflow.myshopify.com/admin/api/2024-01/blogs.json","method":"POST","options":{},"jsonBody":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', ``, 'json') }}","sendBody":true,"specifyBody":"json","authentication":"predefinedCredentialType","nodeCredentialType":"shopifyAccessTokenApi"},"credentials":{"shopifyAccessTokenApi":{"id":"oPLCxaUiftgs7Mna","name":"Shopify Access Token account"}},"typeVersion":4.2},{"id":"059199d7-0f80-40fc-9f45-ee4ef8d6475b","name":"Create Articles","type":"n8n-nodes-base.httpRequestTool","position":[2060,620],"parameters":{"url":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}","method":"POST","options":{},"jsonBody":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('JSON', ``, 'json') }}","sendBody":true,"specifyBody":"json","authentication":"predefinedCredentialType","nodeCredentialType":"shopifyAccessTokenApi"},"credentials":{"shopifyAccessTokenApi":{"id":"oPLCxaUiftgs7Mna","name":"Shopify Access Token account"}},"typeVersion":4.2},{"id":"60d74f7d-cc66-4af6-bb8d-686c3eb320cb","name":"Read Sheet","type":"n8n-nodes-base.googleSheetsTool","position":[1880,600],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit#gid=0","cachedResultName":"blog_details"},"documentId":{"__rl":true,"mode":"list","value":"1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit?usp=drivesdk","cachedResultName":"Blog update sheet"}},"credentials":{"googleSheetsOAuth2Api":{"id":"0RSJGMBcFzxY9GkS","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"75976a59-7017-4e2c-ab12-d2e3448b6566","name":"Update Sheet","type":"n8n-nodes-base.googleSheetsTool","position":[2280,600],"parameters":{"columns":{"value":{"Error":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Error', ``, 'string') }}","Retry":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Retry', ``, 'string') }}","Blog url":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Blog_url', ``, 'string') }}","Blog Html":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Blog_Html', ``, 'string') }}","Timestamp":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Timestamp', ``, 'string') }}","Product Id":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_Id', ``, 'string') }}","Blog title ":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Blog_title_', ``, 'string') }}","Proudct name":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Proudct_name', ``, 'string') }}"},"schema":[{"id":"Timestamp","type":"string","display":true,"required":false,"displayName":"Timestamp","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Product Id","type":"string","display":true,"removed":false,"required":false,"displayName":"Product Id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Proudct name","type":"string","display":true,"required":false,"displayName":"Proudct name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Blog title ","type":"string","display":true,"required":false,"displayName":"Blog title ","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Blog url","type":"string","display":true,"required":false,"displayName":"Blog url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Blog Html","type":"string","display":true,"required":false,"displayName":"Blog Html","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Retry","type":"string","display":true,"required":false,"displayName":"Retry","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Error","type":"string","display":true,"removed":false,"required":false,"displayName":"Error","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["Product Id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"appendOrUpdate","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit#gid=0","cachedResultName":"blog_details"},"documentId":{"__rl":true,"mode":"list","value":"1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1m4yPuz7d0HYJQ1nC-v_oTN5jmYMoDy38beDGLB273B8/edit?usp=drivesdk","cachedResultName":"Blog update sheet"}},"credentials":{"googleSheetsOAuth2Api":{"id":"0RSJGMBcFzxY9GkS","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"49448095-a73a-4fdb-9354-f3e442f100b4","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[1700,580],"parameters":{"sessionKey":"={{ $('Main Product info').item.json.id }}","sessionIdType":"customKey","contextWindowLength":20},"typeVersion":1.3},{"id":"adc154d2-a1b0-4f27-b1fd-689484132308","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[500,40],"parameters":{"width":260,"height":360,"content":"## Get Products \n\n\nIt get all the product details from the shopify store"},"typeVersion":1},{"id":"d7de0bdd-2544-45fd-b4ac-264fed0d6c25","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[780,-80],"parameters":{"color":3,"height":500,"content":"## Fetches Product Image url \n\nEach Product can have multiple images it fetches image url for further step."},"typeVersion":1},{"id":"f51c03f3-a137-48ae-9b44-dee4505d1bb8","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1040,-80],"parameters":{"color":6,"width":380,"height":500,"content":"## OCR :\nCollects Nutrients Facts \n\n* It collects Nutrients information from the product image and outputs in json format and send along the true branch of the if node.\n\n* If the image doesn't contain any related info it returns null."},"typeVersion":1},{"id":"486be3b5-dc25-4c5a-bde7-daaeff56308e","name":"Main Product info","type":"n8n-nodes-base.set","position":[1540,160],"parameters":{"options":{},"assignments":{"assignments":[{"id":"93cb8cc0-cdcd-44da-8187-9df85b770293","name":"title","type":"string","value":"={{ $('Shopify').item.json.title }}"},{"id":"95990abc-b64d-4cb4-8d4e-88145395a3fc","name":"id","type":"number","value":"={{ $('Shopify').item.json.id }}"},{"id":"d833cfa1-9abf-4a9d-86ed-a713acbc1974","name":"body_html","type":"string","value":"={{ $('Shopify').item.json.body_html }}"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"894b47e8-7da2-4a3c-b6ec-afe2e4d6f4cf","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1460,-140],"parameters":{"color":4,"width":920,"height":460,"content":"## Shopify Products Blog Mechanism:\n\n\n* It creates Seo Freindly Blog and Blog Title and post the content or article after creating blog of a       \n   specific category which can be seen on the Shopify blog section inside the store via http calls.\n\n* It first checks whether the product is already available or not in the sheet then checks whether      \n   there is need to retry the posting if there is any error. If there is error it retries posting it \n   change the retry value as no.\n* It takes two http tool call to make a blog one is Blog id creation and other is article posting via \n  Create Articles inside that particular Id.\n* Once the blog is posted all the details are updated via Update Sheet tool. If there is any error it updates it accordingly with the error message in error column"},"typeVersion":1},{"id":"6d708bbb-9c9c-419a-883b-d7e48e89e82a","name":"AI Blog Poster","type":"@n8n/n8n-nodes-langchain.agent","position":[1760,160],"parameters":{"text":"=Product id : {{ $json.id }}\nProduct title : {{ $json.title }}    \n\nProduct Description html : {{ $json.body_html }}\n\nProduct Nutrition Facts : {{ $json.content }}\n\n","options":{"systemMessage":"=You are an AI agent responsible for automating blog creation for Shopify products using Google Sheets as a tracking system.\n\n## Step-by-step Workflow:\n\n### 1. Read Google Sheet\nBefore doing anything, call the Read Sheet tool to check if a blog has already been created for the Product ID. The sheet contains columns:\n\n- Timestamp\n- Product Id\n- Product name\n- Blog title\n- Blog url\n- Blog Html\n- Retry\n- Error\n\nCall this tool first and look up the row with the same Product Id.\n\n### 2. Check Conditions:\n- If the Product Id exists and Retry = No, skip this item.\n- If Retry = Yes, retry blog creation from Step 3.\n- If the Product Id is not found, proceed to Step 3 to generate and post a new blog.\n\n---\n\n### 3. Generate Blog Content\nBased on the following provided in the user message:\n- Product ID\n- Product Title\n- Product Description HTML\n- Product Nutrition Facts \n\nGenerate:\n- SEO-Friendly Blog Title\n- Meta Description\n- Formatted Blog Content in clean, structured HTML:\n  - Introduction summary\n  - H2/H3 subheadings\n  - Bullet points (key benefits, nutrients)\n  - Nutrient callouts or tables (if available)\n  - Closing paragraph or CTA\n  - Add internal keywords (tags)\n\n---\n\n### 4. Create Blog (HTTP Tool Call)\nCall the Shopify API to create a blog:\n\njson\n{\n  \"tool_call\": {\n    \"tool\": \"http\",\n    \"name\": \"Create Blog\",\n    \"method\": \"POST\",\n    \"url\": \"https://smartworkflow.myshopify.com/admin/api/2024-01/blogs.json\",\n    \"body\": {\n      \"blog\": {\n        \"title\": \"[SEO Blog Title]\"\n      }\n    }\n  }\n}\nOnce the blog.id is returned, post the article to:\n\n\nhttps://smartworkflow.myshopify.com/admin/api/2024-01/blogs/{{blog.id}}/articles.json\njson\nCopy\nEdit\n{\n  \"tool_call\": {\n    \"tool\": \"http\",\n    \"name\": \"Create Article\",\n    \"method\": \"POST\",\n    \"url\": \"https://smartworkflow.myshopify.com/admin/api/2024-01/blogs/{{blog.id}}/articles.json\",\n    \"body\": {\n      \"article\": {\n        \"title\": \"[Same Blog Title]\",\n        \"body_html\": \"[Generated HTML content]\",\n        \"tags\": \"nutrition, wellness, product, shopify\",\n        \"published\": false\n      }\n    }\n  }\n}\n6. Update Google Sheet\nIf Blog is Posted Successfully\nCall Update Sheet tool and set:\n\n\n{\n  \"Timestamp\":{{ $now }} ,\n  \"Product Id\": \"{{ $json.id }}\",\n  \"Product name\": \"{{ $json.title }}\",\n  \"Blog title\": \"[SEO Blog Title]\",\n  \"Blog url\": \"[Generated URL from blog.id and article.id]\",\n  \"Blog Html\": \"[Generated HTML]\",\n  \"Retry\": \"No\",\n  \"Error\": \"\"\n}\nIf Blog or Article Fails\nLog the error in Error column and set Retry = Yes.\n\n\n{\n  \"Product Id\": \"{{ $json.id }}\",\n  \"Retry\": \"Yes\",\n  \"Error\": \"[Detailed error message]\"\n}\n\nNotes:\nAlways call Read Sheet first before blog generation.\n\nRetry logic is based strictly on the Retry column.\n\nAll tool call responses should be handled using proper try-catch/error-check patterns.\n\nEnsure HTML is clean and includes correct spacing, paragraphs, H2s, bullet lists, and optionally nutrient tables.\n"},"promptType":"define"},"typeVersion":1.9},{"id":"3538388e-7222-48e1-bec8-daf882e8c316","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-160,-100],"parameters":{"color":4,"width":380,"height":520,"content":"## Author \n## Kumar Shivam\n\n\nI'm an automation specialist who helps startups, agencies, and growth teams save time and scale faster using n8n. I design smart, reliable workflows that connect tools like HubSpot, Slack, OpenAI, Claude, Pipedrive, Google Ads, and vector databases (Qdrant, Pinecone). Whether it's auto-assigning leads, generating AI-powered reports, triggering Slack alerts, or syncing APIs — I build automations that just work. Let’s turn your manual processes into automated systems that scale.\n\nContact for any business enquiries :\n\nhttps://kumarshivam.link"},"typeVersion":1}],"pinData":{},"connections":{"If":{"main":[[{"node":"Main Product info","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"OpenAI":{"main":[[{"node":"If","type":"main","index":0}]]},"Shopify":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"Split Out":{"main":[[{"node":"OpenAI","type":"main","index":0}]]},"Read Sheet":{"ai_tool":[[{"node":"AI Blog Poster","type":"ai_tool","index":0}]]},"Update Sheet":{"ai_tool":[[{"node":"AI Blog Poster","type":"ai_tool","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Blog Poster","type":"ai_memory","index":0}]]},"Create Blog id":{"ai_tool":[[{"node":"AI Blog Poster","type":"ai_tool","index":0}]]},"Create Articles":{"ai_tool":[[{"node":"AI Blog Poster","type":"ai_tool","index":0}]]},"Main Product info":{"main":[[{"node":"AI Blog Poster","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Blog Poster","type":"ai_languageModel","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Shopify","type":"main","index":0}]]}}}


name: Binance Spot Market Quant AI Agent | GPT-4o + Telegram (Main Interface)
author_name: Don Jayamaha Jr
author_username: don-the-gem-dealer
categories: []
created_at: 2025-06-06T17:51:04.546Z
updated_at: 2025-06-06T17:51:04.546Z
url: https://n8n.io/workflows/4739
scraped_at: 2025-07-06 21:16:30
description:
  A professional-grade AI automation system for spot market trading insights on Binance. It analyzes multi-timeframe technical indicators, live price/order data, and crypto sentiment, then delivers fully formatted Telegram-style trading reports.

  🎥 Watch Tutorial:

  🧩 Required Workflows

  You must install and activate all of the following workflows for the system to function correctly:

  | ✅ Workflow Name                                    | 📌 Function Description                                                          |
  | -------------------------------------------------- | -------------------------------------------------------------------------------- |
  | Binance Spot Market Quant AI Agent                 | Final AI orchestrator. Parses user prompt and generates Telegram-ready reports.  |
  | Binance SM Financial Analyst Tool                  | Calls indicator tools and price/order data tools. Synthesizes structured inputs. |
  | Binance SM News and Sentiment Analyst Webhook Tool | Analyzes crypto sentiment, gives summary and headlines via POST webhook.         |
  | Binance SM Price/24hrStats/OrderBook/Kline Tool    | Pulls price, order book, 24h stats, and OHLCV klines for 15m–1d.                 |
  | Binance SM 15min Indicators Tool                   | Calculates 15m RSI, MACD, BBANDS, ADX, SMA/EMA from Binance kline data.          |
  | Binance SM 1hour Indicators Tool                   | Same as above but for 1h timeframe.                                              |
  | Binance SM 4hour Indicators Tool                   | Same as above but for 4h timeframe.                                              |
  | Binance SM 1day Indicators Tool                    | Same as above but for 1d timeframe.                                              |
  | Binance SM Indicators Webhook Tool                 | Technical backend. Handles all webhook logic for each timeframe tool.            |

  ⚙️ Installation Instructions

  Step 1: Import Workflows

  Open your n8n Editor UI
  Import each workflow JSON file one by one
  Activate them or ensure they're called via Execute Workflow

  Step 2: Set Credentials

  OpenAI API Key** (GPT-4o recommended)
  Binance endpoints** are public (no auth required)

  Step 3: Configure Webhook Endpoints

  Deploy Binance SM Indicators Webhook Tool
  Ensure the following paths are reachable:

    /webhook/15m
    /webhook/1h
    /webhook/4h
    /webhook/1d

  Step 4: Telegram Integration

  Create a Telegram bot using @BotFather
  Add your Telegram API token to n8n credentials
  Replace the Telegram ID placeholder with your own

  Step 5: Final Trigger

  Trigger the Binance Spot Market Quant AI Agent manually or from Telegram
  The agent:

    Extracts the trading pair (e.g. BTCUSDT)
    Calls all tools for market data and sentiment
    Generates a clean, HTML-formatted Telegram report

  💬 Telegram Report Output Format

  BTCUSDT Market Report

  Spot Strategy
  • Action: Buy
  • Entry: $63,800 | SL: $61,200 | TP: $66,500
  • Rationale:
   MACD Crossover (1h)
   RSI Rebound from Oversold (15m)
   Sentiment: Bullish

  Leverage Strategy
  • Position: Long 3x
  • Entry: $63,800
  • SL/TP zones same as above

  News Sentiment: Slightly Bullish  
  • "Bitcoin rallies as ETF inflows surge" – CoinDesk  
  • "Whales accumulate BTC at key support" – NewsBTC  

  🧠 System Overview

  [Telegram Trigger]
  → [Session + Auth Logic]
  → [Binance Spot Market Quant AI Agent]
  → [Financial Analyst Tool + News Tool]
  → [All Technical Indicator Tools (15m, 1h, 4h, 1d)]
  → [OrderBook/Price/Kline Fetcher]
  → [GPT-4o Reasoning]
  → [Split & Send Message to Telegram]

  🧾 Licensing & Attribution

  © 2025 Treasurium Capital Limited Company
  Architecture, prompts, and trade report structure are IP-protected.
  No unauthorized rebranding or resale permitted.

  🔗 For support: LinkedIn – Don Jayamaha

nodes_used:
  ["n8n-nodes-base.telegram","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.toolWorkflow"]

workflow_json:
  {"id":"82r122lbmQPWishF","meta":{"instanceId":"a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6","templateCredsSetupCompleted":true},"name":"Binance Spot Market Quant AI Agent","tags":[],"nodes":[{"id":"6c6238ec-ba3d-4c59-a612-c3b4e9ae8b73","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-440,620],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"yUizd8t0sD5wMYVG","name":"OpenAi account"}},"typeVersion":1.2},{"id":"b8b90061-9d5e-4e48-a0b0-bb6bdb193771","name":"Binance Spot Market Quant AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-80,160],"parameters":{"text":"={{ $json.message }}","options":{"systemMessage":"You are the **Binance Spot Market Quant AI Agent**, responsible for generating structured, professional swing-trading reports for **any trading pair** on the Binance Spot Market. You use **validated technical indicators**, **order flow data**, and **curated crypto sentiment** to create actionable trading strategies.\n\n---\n\n### 🔗 Connected Tools\n\n1. **🧠 Binance Financial Market Analyst Tool**\n\n   • Aggregates outputs from:\n\n   * `Binance 15min Indicators Tool`\n   * `Binance 1h Indicators Tool`\n   * `Binance 4h Indicators Tool`\n   * `Binance 1d Indicators Tool`\n   * `Binance Price/OrderBook/Kline Tool`\n\n   • Each indicator tool calculates:\n\n   * **RSI, BBANDS, SMA, EMA, ADX, MACD**\n   * Based on the **latest 20 klines** for its interval\n   * Returns both values and signal labels (e.g. overbought, divergence)\n\n   • The Price Tool provides:\n\n   * **Live price**\n   * **24h OHLCV**\n   * **Order book depth (top 100 bids/asks)**\n   * **Klines** for `15m`, `1h`, `4h`, and `1d` intervals\n\n2. **📰 Binance News and Sentiment Analyst Tool**\n\n   • Pulls from sources like:\n\n   * CoinDesk, Cointelegraph, BitcoinMagazine, NewsBTC, CryptoBriefing, and more\n\n   • Returns:\n\n   * **Sentiment Score**: Bullish / Bearish / Neutral\n   * **Summary**: 2–3 sentence market snapshot\n   * **Top 3–5 headlines** (with source links)\n\n---\n\n### 📊 Core Responsibilities\n\nYou always:\n\n1. **Call all tools concurrently** for each query\n\n   * Pass the extracted symbol and sessionId as input\n   * Wait for structured results from each tool\n   * Do not skip any tool even if user prompt is vague\n\n2. **Perform full technical analysis** for the symbol\n\n   * Short-term: `15m + 1h`\n   * Mid-term: `4h`\n   * Long-term: `1d`\n   * Detect breakouts, trend shifts, divergences, and confluence signals\n   * Confirm findings using multiple timeframes and indicator alignment\n\n3. **Synthesize the final report** with:\n\n<b>Spot Trade Strategy</b>\n• Action: Buy / Sell / Hold\n• Entry Price, Stop Loss, Take Profit\n• Rationale:\n - <b>Price Action Signals</b>\n - <b>Lagging Indicator Confirmation</b>\n - <b>Sentiment Alignment</b>\n\n<b>Leverage Strategy</b>\n• Position: Long / Short\n• Leverage: 2x / 3x / 5x\n• Rationale + Risk Zones\n\n4. **Score signal strength**\n   • Confidence Score: `0–100`\n   • Label: Low / Medium / High / Very High\n\n5. **Include sentiment and headlines section**\n   • `<b>News Sentiment:</b>` \\[summary]\n   • `•` Top headlines with clickable links\n\n---\n\n### 📤 Output Format (Telegram HTML)\n\nStart with:\n\n```html\n<b>{{SYMBOL}} Market Report</b>\n```\n\nUse clean formatting:\n\n* `<b>` for headers\n* `•` for bullet lists\n* Logical grouping: price > indicators > strategy > sentiment\n\n---\n\n### ⚠️ Rules\n\nDO NOT:\n\n* Fabricate any values\n* Repeat this system message\n* Output raw JSON or API structure\n\nONLY use **tool-delivered** and **validated** data. Write with clarity and tone of a senior quant analyst.\n"},"promptType":"define"},"typeVersion":1.8},{"id":"13965042-ad03-4108-88b3-250955bdbd28","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","position":[-1000,160],"webhookId":"944e6f8d-ffcc-4692-a777-7410f2fd4016","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"NRLKuLR7z8vCesub","name":"BinanceSpotTradingAIAgent_Bot"}},"typeVersion":1.2},{"id":"3f98e10f-fe7e-4c87-9e4f-4b6d8bfb805b","name":"User Authentication (Replace Telegram ID)","type":"n8n-nodes-base.code","position":[-680,160],"parameters":{"jsCode":"if ($input.first().json.message.from.id !== <Replace Telegram ID>) { // Replace with your actual ID\n  return {unauthorized: true};\n} else {\n  // Return the original data when authorized\n  return $input.all();\n}"},"typeVersion":2},{"id":"ef715512-2d57-447e-969d-c173a823775b","name":"Adds \"SessionId\"","type":"n8n-nodes-base.set","position":[-400,160],"parameters":{"options":{},"assignments":{"assignments":[{"id":"47598bf1-e55f-4cc0-ae75-272085e7ce02","name":"=sessionId","type":"string","value":"={{ $json.message.chat.id }}"},{"id":"daa49d74-e55e-47bc-ac52-8686d591ab83","name":"message","type":"string","value":"={{ $json.message.text }}"}]}},"typeVersion":3.4},{"id":"876e3ec9-3453-4db9-928a-6163c1c6702b","name":"Telegram","type":"n8n-nodes-base.telegram","position":[900,160],"webhookId":"79d6c29c-1e04-414a-9989-afb1f7a58035","parameters":{"text":"={{ $json.message }}","chatId":"={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields":{"appendAttribution":false}},"credentials":{"telegramApi":{"id":"NRLKuLR7z8vCesub","name":"BinanceSpotTradingAIAgent_Bot"}},"typeVersion":1.2},{"id":"70c70549-1c58-478d-a39f-5bccc7b76b04","name":"Splits message is more than 4000 characters","type":"n8n-nodes-base.code","position":[480,160],"parameters":{"jsCode":"// Input: assumes incoming message in `item.json.message`\nconst input = $json.output;\nconst chunkSize = 4000;\n\n// Function to split text\nfunction splitMessage(text, size) {\n  const result = [];\n  for (let i = 0; i < text.length; i += size) {\n    result.push(text.substring(i, i + size));\n  }\n  return result;\n}\n\n// Logic\nif (input.length <= chunkSize) {\n  return [{ json: { message: input } }];\n} else {\n  const chunks = splitMessage(input, chunkSize);\n  return chunks.map(chunk => ({ json: { message: chunk } }));\n}"},"typeVersion":2},{"id":"85e0b819-f722-43ae-93b7-5317ff877804","name":"News and Sentiment Analysis Request","type":"n8n-nodes-base.httpRequestTool","position":[120,600],"parameters":{"url":"https://treasurium.app.n8n.cloud/webhook/newsanalyst","method":"POST","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"message","value":"=={{ $json.message }}"}]},"toolDescription":"It will post the name of the cryptocurrency to get the News and Sentiment Analysis for use in the Binance Quant AI Agent."},"typeVersion":4.2},{"id":"27c27a35-fe83-4c4b-b9b1-90f2e1de8602","name":"Binance SM Financial Analyst Tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[380,580],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"Nm41n4i6VMhrixZs","cachedResultName":"Work Drive — Binance SM Financial Analyst Tool"},"workflowInputs":{"value":{"message":"={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}","sessionId":"={{ $json.sessionId }}"},"schema":[{"id":"message","type":"string","display":true,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sessionId","type":"string","display":true,"required":false,"displayName":"sessionId","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"78c6847a-8449-45dd-8aa6-1ce69e3d4e67","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[-160,620],"parameters":{},"typeVersion":1.3},{"id":"7ded5880-cf83-483c-84b9-dfce5e11d616","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1060,-100],"parameters":{"color":4,"height":460,"content":"## Trigger Incoming Telegram Command\nNode: Telegram Trigger\n**Listens for new Telegram messages** from users.\nTriggers the full agent process and passes raw user input downstream."},"typeVersion":1},{"id":"dfb57705-77b8-4c88-a6b0-aa8128b08400","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-740,-100],"parameters":{"color":2,"height":460,"content":"## Validate User Access\nNode: User **Authentication\nChecks incoming Telegram ID** against the approved user list."},"typeVersion":1},{"id":"37372f5a-db8c-4335-81a4-de437aff4782","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-460,-100],"parameters":{"color":5,"height":460,"content":"## Generate Session Metadata\nNode: Add S**essionId\nCreates a sessionId using the Telegram chat_id**.\nThis is passed into all downstream tools for memory and workflow routing."},"typeVersion":1},{"id":"952adc52-49a1-49c8-8bd5-d31c8277af83","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-180,-220],"parameters":{"color":7,"width":480,"height":580,"content":"## Main AI Agent: Report Generator\nNode: Binance Spot Market Quant AI Agent\nThis is the **core orchestrator**. It uses OpenAI to reason over:\n\n**Multi-timeframe indicator outputs**\n\n**Order book + price data**\n\n**Sentiment and news**\n\nIt calls both tools in parallel:\n\n**Binance Financial Market Analyst Tool**\n\n**Binance News & Sentiment Analyst Tool**\n\nThen it synthesizes a final trading report."},"typeVersion":1},{"id":"a6475e05-c83a-4dce-acd1-19294077912f","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[400,-100],"parameters":{"color":5,"width":260,"height":460,"content":"## Handle Telegram Message Limits\nNode: Code (split logic)\nChecks if the **GPT output exceeds 4000 characters**.\nIf so, it splits the message into safe chunks and passes them on sequentially."},"typeVersion":1},{"id":"413aff1b-43a3-4f81-b82d-eab2f18aed61","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[840,-100],"parameters":{"color":4,"height":460,"content":"## Send Final Report to Telegram\nNode: Telegram sendMessage\nSends **formatted HTML report (or split chunks)** directly to the authenticated user via Telegram bot."},"typeVersion":1},{"id":"8b7687eb-9c5f-4745-8700-cc337a1a2505","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-520,520],"parameters":{"height":540,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## GPT Model for Reasoning\nNode: OpenAI Chat Model\nModel: **gpt-4o-mini**\nUsed to:\n\nInterpret signal values\n\nGenerate structured HTML\n\n**Recommend spot and leverage trades**\n\n"},"typeVersion":1},{"id":"fc0fa082-96d7-4dda-8273-0aa44f6b1f97","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[40,520],"parameters":{"color":6,"height":660,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Binance News & Sentiment Analyst Tool\nNode: ToolWebhook\nSends the symbol to:\n\nPOST https://treasurium.app.n8n.cloud/webhook/newsanalyst\nReturns:\n\n**📈 Sentiment (Bullish / Neutral / Bearish)**\n\n**📰 3–5 crypto headlines**\n\n**🧠 Summary paragraph (1–3 lines)**"},"typeVersion":1},{"id":"becbf326-b8d3-482e-b9c5-7a1bed58b112","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[300,520],"parameters":{"color":6,"height":660,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Binance Financial Market Analyst Tool\nNode: ToolWorkflow\nCalls all connected indicator agents:\n\n**15m, 1h, 4h, 1d**\n\nPrice/Orderbook/Klines agent\n\n**Each indicator (RSI, MACD, BBANDS, SMA, EMA, ADX)** is returned per timeframe, plus order book depth and candle snapshots."},"typeVersion":1},{"id":"46cb7225-7ba9-4270-988e-74e4a30403fc","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-240,520],"parameters":{"color":3,"height":540,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Short-Term Memory Module\nNode: **Simple Memory\nStores the sessionId**, symbol, and other state data.\nUseful for:\n\nMulti-turn Telegram interactions\n\nTracking indicator agreement across timeframes\n\n"},"typeVersion":1},{"id":"238ff914-0c43-4cdf-9506-61e67306300f","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[1400,-1340],"parameters":{"width":1780,"height":2540,"content":"# 🧠 Binance Spot Market Quant AI Agent – Full System Documentation\n\nA professional-grade AI automation system for **spot market trading insights** on Binance. It analyzes **multi-timeframe technical indicators**, **live price/order data**, and **crypto sentiment**, then delivers fully formatted **Telegram-style trading reports**.\n\n---\n\n## 🧩 Included Workflows\n\n> You must install and activate **all of the following workflows** for the system to function correctly:\n\n| ✅ Workflow Name                                    | 📌 Function Description                                                          |\n| -------------------------------------------------- | -------------------------------------------------------------------------------- |\n| Binance Spot Market Quant AI Agent                 | Final AI orchestrator. Parses user prompt and generates Telegram-ready reports.  |\n| Binance SM Financial Analyst Tool                  | Calls indicator tools and price/order data tools. Synthesizes structured inputs. |\n| Binance SM News and Sentiment Analyst Webhook Tool | Analyzes crypto sentiment, gives summary and headlines via POST webhook.         |\n| Binance SM Price/24hrStats/OrderBook/Kline Tool    | Pulls price, order book, 24h stats, and OHLCV klines for 15m–1d.                 |\n| Binance SM 15min Indicators Tool                   | Calculates 15m RSI, MACD, BBANDS, ADX, SMA/EMA from Binance kline data.          |\n| Binance SM 1hour Indicators Tool                   | Same as above but for 1h timeframe.                                              |\n| Binance SM 4hour Indicators Tool                   | Same as above but for 4h timeframe.                                              |\n| Binance SM 1day Indicators Tool                    | Same as above but for 1d timeframe.                                              |\n| Binance SM Indicators Webhook Tool                 | Technical backend. Handles all webhook logic for each timeframe tool.            |\n\n---\n\n## ⚙️ Installation Instructions\n\n### Step 1: Import Workflows\n\n* Open your **n8n Editor UI**\n* Import each workflow JSON file one by one\n* Activate them or ensure they're called via `Execute Workflow`\n\n### Step 2: Set Credentials\n\n* **OpenAI API Credential**: Add your OpenAI key for GPT-4o or GPT-4.1\n* **Binance Price Data**: No auth needed (public endpoint)\n\n### Step 3: Configure Webhook Endpoints\n\n* Deploy **Binance SM Indicators Webhook Tool**\n* Ensure the following routes are reachable:\n\n  * `/webhook/15m`\n  * `/webhook/1h`\n  * `/webhook/4h`\n  * `/webhook/1d`\n\n### Step 4: Telegram Integration\n\n* Add your Telegram Bot to n8n with correct API token\n* Update the **Telegram ID check node** with your own ID\n* Messages from your ID will trigger the agent\n\n### Step 5: Final Agent Execution\n\n* Trigger `Binance Spot Market Quant AI Agent` manually or from Telegram\n* The agent:\n\n  * Calls all connected tools with symbol and sessionId\n  * Waits for full indicator + sentiment response\n  * Returns a formatted multi-part trading report\n\n---\n\n## 🖥️ System Workflow Overview\n\n```\n[Telegram Trigger]\n→ [Session Memory + ID Check]\n→ [Quant Agent]\n→ [Financial Analyst Tool + Sentiment Tool]\n→ [All Indicators (15m, 1h, 4h, 1d)]\n→ [Price/Kline/OrderBook Tool]\n→ [News and Sentiment Webhook]\n→ [Signal Reasoning + Report Formatting]\n→ [Final Telegram HTML Message]\n```\n\n---\n\n## 📬 Telegram Output Style\n\n```html\n<b>BTCUSDT Market Report</b>\n\n<b>Spot Strategy</b>\n• Action: Buy\n• Entry: $63,800 | SL: $61,200 | TP: $66,500\n• Reason:\n - MACD Crossover (1h)\n - RSI Rebound from Oversold (15m)\n - Sentiment: Bullish\n\n<b>Leverage Strategy</b>\n• Position: Long 3x\n• Entry: $63,800\n• SL/TP zones same as above\n\n<b>News Sentiment:</b> Slightly Bullish\n• \"Bitcoin rallies as ETF inflows surge\" – CoinDesk\n• \"Whales accumulate BTC at key support\" – NewsBTC\n```\n\n---\n\n## 🚀 Support & Licensing\n\n🔗 **Don Jayamaha – LinkedIn**\n[linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n© 2025 Treasurium Capital Limited Company. All rights reserved.\nThis system architecture, prompts, and workflow structure are proprietary and protected by **U.S. copyright law**. Reuse or resale prohibited without license.\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"bb69da16-db3d-4804-ad9d-a3d971f8fa36","connections":{"Simple Memory":{"ai_memory":[[{"node":"Binance Spot Market Quant AI Agent","type":"ai_memory","index":0}]]},"Adds \"SessionId\"":{"main":[[{"node":"Binance Spot Market Quant AI Agent","type":"main","index":0}]]},"Telegram Trigger":{"main":[[{"node":"User Authentication (Replace Telegram ID)","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Binance Spot Market Quant AI Agent","type":"ai_languageModel","index":0}]]},"Binance SM Financial Analyst Tool":{"ai_tool":[[{"node":"Binance Spot Market Quant AI Agent","type":"ai_tool","index":0}]]},"Binance Spot Market Quant AI Agent":{"main":[[{"node":"Splits message is more than 4000 characters","type":"main","index":0}]]},"News and Sentiment Analysis Request":{"ai_tool":[[{"node":"Binance Spot Market Quant AI Agent","type":"ai_tool","index":0}]]},"User Authentication (Replace Telegram ID)":{"main":[[{"node":"Adds \"SessionId\"","type":"main","index":0}]]},"Splits message is more than 4000 characters":{"main":[[{"node":"Telegram","type":"main","index":0}]]}}}


name: Analyze Crypto News Sentiment for Any Token with GPT-4o and Telegram Alerts
author_name: Don Jayamaha Jr
author_username: don-the-gem-dealer
categories: []
created_at: 2025-06-06T17:59:13.026Z
updated_at: 2025-06-06T17:59:13.026Z
url: https://n8n.io/workflows/4740
scraped_at: 2025-07-06 21:16:30
description:
  A sentiment intelligence sub-agent for the Binance Spot Market Quant AI Agent. It aggregates crypto news from major sources, filters by token keyword (e.g., BTC, ETH), and produces a Telegram-ready summary including market sentiment and top headlines—powered by GPT-4o.

  🎥 Live Demo:

  🛠️ Workflow Function

  This tool performs the following steps:

  | 🔧 Step                  | 📌 Description                                                                |
  | ------------------------ | ----------------------------------------------------------------------------- |
  | Webhook Input            | Accepts { "message": "symbol" } via HTTP POST                             |
  | Crypto Keyword Extractor | GPT model extracts the valid crypto symbol (e.g., "SOL", "DOGE", "ETH")       |
  | RSS News Aggregators     | Pulls latest headlines from 9+ crypto sources (CoinDesk, Cointelegraph, etc.) |
  | Merge & Filter Articles  | Keeps only articles containing the specified token                            |
  | Prompt Builder           | Creates prompt for GPT with filtered headlines                                |
  | GPT-4o Summarizer        | Summarizes news into 3-part response: Summary, Sentiment, Headline Links      |
  | Telegram Formatter       | Converts GPT output into a Telegram-friendly message                          |
  | Response Handler         | Returns formatted message to the caller via webhook                           |

  📥 Webhook Trigger Format

  {
    "message": "ETH"
  }

  This triggers a full execution of the workflow and returns output like:

  📣 ETH Sentiment: Neutral

  • BlackRock’s tokenized fund expands to Ethereum mainnet (CoinDesk)  
  • Ethereum fees remain high, analysts call for L2 migration (NewsBTC)  
  • Vitalik warns about centralized risks in staking (Cointelegraph)

  📚 Installation Guide

  1. Import & Enable

  Load the .json into your n8n Editor
  Enable webhook trigger in the top-right corner
  Ensure it's reachable via POST /webhook/custom-path

  2. Required Credentials

  OpenAI API Key** (GPT-4o capable)
  No API keys required for RSS feeds

  3. Connect to Quant Agent

  Add an HTTP Request node in your main AI agent
  Point to this workflow's webhook with body { "message": "symbol" }
  Capture the response to include in your Telegram output

  🔍 Real Use Cases

  | Scenario                           | Result                                                           |
  | ---------------------------------- | ---------------------------------------------------------------- |
  | BTC Sentiment before a key event   | Returns 8–12 filtered articles with bullish/neutral/bearish tone |
  | Daily pulse for altcoins like DOGE | Shows relevant headlines, helpful for intraday trading setups    |
  | Telegram chatbot integration       | Enables user to query sentiment via /sentiment ETH             |
  | Macro context for Quant AI outputs | Adds emotional/news context to technical-based trade decisions   |

  🧾 Licensing & Attribution

  © 2025 Treasurium Capital Limited Company
  Architecture, prompts, and trade report structure are IP-protected.
  No unauthorized rebranding or resale permitted.

  🔗 For support: LinkedIn – Don Jayamaha

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

workflow_json:
  {"id":"f8Zow3PmilvRq85m","meta":{"instanceId":"a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6"},"name":"Binance SM News and Sentiment Analyst Webhook Tool","tags":[],"nodes":[{"id":"1d71285d-a4bf-456a-a356-b9fa8b74c9d3","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-1020,1220],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"yUizd8t0sD5wMYVG","name":"OpenAi account"}},"typeVersion":1.2},{"id":"300cab6c-63ee-4271-a63e-b3afb135bdcf","name":"Set Query","type":"n8n-nodes-base.set","position":[-460,1040],"parameters":{"options":{},"assignments":{"assignments":[{"id":"9128e9e7-d1b8-4e89-8422-849b8dd519d8","name":"query","type":"string","value":"={{ $json.output }}"}]}},"typeVersion":3.4},{"id":"d7307bc3-f7c2-4db1-8674-5c6025ce7e2a","name":"Crypto News & Sentiment Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-960,1040],"parameters":{"text":"={{$json.body.message}}","options":{"systemMessage":"Your job is to analyze the keyword of the question and output it as a single word.  The keyword will always be the name of a cryptocurrency."},"promptType":"define"},"typeVersion":1.8},{"id":"c4ad1805-cb48-45a3-b850-4960f59299f0","name":"RSS Cointelegraph","type":"n8n-nodes-base.rssFeedRead","position":[160,200],"parameters":{"url":"https://cointelegraph.com/rss","options":{}},"typeVersion":1.1},{"id":"5fc71ef5-a376-41a0-9213-15cc4527b049","name":"RSS Bitcoinmagazine","type":"n8n-nodes-base.rssFeedRead","position":[160,360],"parameters":{"url":"https://bitcoinmagazine.com/.rss/full/","options":{}},"typeVersion":1.1},{"id":"bdbf7bab-c3a6-4f65-bbb9-a6cd83763dc5","name":"RSS Coindesk","type":"n8n-nodes-base.rssFeedRead","position":[160,520],"parameters":{"url":"https://www.coindesk.com/arc/outboundfeeds/rss/","options":{}},"typeVersion":1.1},{"id":"836d7edd-62c5-4819-aa30-c48c4b1f005d","name":"RSS Bitcoinist","type":"n8n-nodes-base.rssFeedRead","position":[160,680],"parameters":{"url":"https://bitcoinist.com/feed/","options":{}},"typeVersion":1.1},{"id":"a0778852-e86b-41e5-a3f8-6d4352e397a1","name":"RSS Newsbtc","type":"n8n-nodes-base.rssFeedRead","position":[160,840],"parameters":{"url":"https://www.newsbtc.com/feed/","options":{}},"typeVersion":1.1},{"id":"d5c5cc4f-ef15-40af-be33-31ce2dbdc45e","name":"RSS Cryptopotato","type":"n8n-nodes-base.rssFeedRead","position":[160,1200],"parameters":{"url":"https://cryptopotato.com/feed/","options":{}},"typeVersion":1.1},{"id":"5f02ad60-9b0a-49fc-afd7-558ac5aeee2d","name":"RSS 99bitcoins","type":"n8n-nodes-base.rssFeedRead","position":[160,1380],"parameters":{"url":"https://99bitcoins.com/feed/","options":{}},"typeVersion":1.1},{"id":"cc5373ab-931a-4b95-a1d4-6d21fa18273a","name":"RSS Cryptobriefing","type":"n8n-nodes-base.rssFeedRead","position":[160,1560],"parameters":{"url":"https://cryptobriefing.com/feed/","options":{}},"typeVersion":1.1},{"id":"e5baa2ef-0455-42b0-a597-dedd551ae1aa","name":"RSS Crypto.news","type":"n8n-nodes-base.rssFeedRead","position":[160,1720],"parameters":{"url":"https://crypto.news/feed/","options":{}},"typeVersion":1.1},{"id":"2cb96040-0e47-41b5-9c32-8362d397333c","name":"Merge All Articles","type":"n8n-nodes-base.merge","position":[840,880],"parameters":{"numberInputs":10},"typeVersion":3.1},{"id":"a1f53681-504a-445a-9aa1-35c40f174e0c","name":"Filter by Query","type":"n8n-nodes-base.code","position":[1080,1020],"parameters":{"jsCode":"const term = $node[\"Set Query\"].json.query.toLowerCase();\nreturn items.filter(item => {\n  const j            = item.json;\n  const title        = (j.title || \"\").toLowerCase();\n  const snippet      = (j.contentSnippet || j.description || \"\").toLowerCase();\n  const fullContent  = (j.content || \"\").toLowerCase();\n  return title.includes(term)\n      || snippet.includes(term)\n      || fullContent.includes(term);\n});"},"typeVersion":2},{"id":"3b886f03-884f-4c9a-bb74-46be78c941fe","name":"Build Prompt","type":"n8n-nodes-base.code","position":[1400,1020],"parameters":{"jsCode":"const q   = $node[\"Set Query\"].json.query;\nconst list = items\n  .map(i => `- ${i.json.title} (${i.json.link})`)\n  .join(\"\\n\");\nconst prompt = `\nYou are a crypto-industry news analyst.\nSummarize current news and market sentiment for **${q}** based on these articles:\n${list}\n\nAnswer in 3 parts:\n1. Summary of News\n2. Market Sentiment\n3. Links to reference news articles\n`;\nreturn [{ json: { prompt } }];"},"typeVersion":2},{"id":"936b9c46-0ea4-498a-9dbb-b4f6b62cf70f","name":"Summarize News & Sentiment (GPT-4o)","type":"@n8n/n8n-nodes-langchain.openAi","position":[1680,1020],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"content":"={{ $node[\"Build Prompt\"].json.prompt }}"},{"role":"assistant","content":"You are a crypto‐industry news analyst. Summarize sentiment clearly and concisely."}]}},"credentials":{"openAiApi":{"id":"yUizd8t0sD5wMYVG","name":"OpenAi account"}},"typeVersion":1.8},{"id":"2c1b4212-3675-416d-a0f4-f1bce7b1581b","name":"Prepare Telegram Message","type":"n8n-nodes-base.set","position":[2100,1020],"parameters":{"options":{},"assignments":{"assignments":[{"id":"565fb705-ac83-4a96-9343-2e29e348cc4f","name":"summary","type":"string","value":"={{ $json.message.content }}"}]}},"typeVersion":3.4},{"id":"ae4eacc3-281d-4c40-a1c8-fbd580fb49a8","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-1120,900],"parameters":{"color":6,"width":600,"height":460,"content":"##  Extract Keyword \nThis AI agent parses the user input and returns a single-word keyword to help match relevant news articles."},"typeVersion":1},{"id":"ea8734d6-5f17-4587-88aa-fcd342a563c5","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"color":5,"width":460,"height":1980,"content":"## News Aggregators\nPulls articles from major crypto news sources. You can add more RSS feeds here to expand coverage."},"typeVersion":1},{"id":"214d3fa9-d3f2-4e8a-bfab-5d4deb2881cf","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[760,680],"parameters":{"color":2,"width":480,"height":760,"content":"## Merge & Filter News\nCombines all RSS articles and filters them using the extracted keyword to match only relevant results."},"typeVersion":1},{"id":"c6942449-1e0b-4bca-b1e0-411a3deaf26d","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1320,840],"parameters":{"color":7,"width":260,"height":360,"content":"## Prepare AI Prompt\nConstructs the input prompt for GPT-4o with a list of filtered articles. Output includes summary, sentiment, and article links."},"typeVersion":1},{"id":"7f401bd0-f14d-49d6-9d4a-fcb6e01bd64c","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[1640,800],"parameters":{"color":3,"width":340,"height":440,"content":"## Summarize News & Sentiment (GPT-4o)\nUses OpenAI GPT-4o to generate a concise summary of the news, analyze market sentiment, and return formatted results.\n\n"},"typeVersion":1},{"id":"f60cb8e4-8d3f-4112-a200-6affb3b80cb3","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[2040,760],"parameters":{"color":6,"height":460,"content":"## Format for Telegram\n\nExtracts the AI summary and prepares it for Telegram delivery. Change the variable if you want to include other data.\n\n\n"},"typeVersion":1},{"id":"e19e48b4-36cb-4b0b-87c5-0bae7f6068d7","name":"Webhook","type":"n8n-nodes-base.webhook","position":[-1440,1040],"webhookId":"a41af97d-6bd6-44d2-b79e-dca6df1e6e7e","parameters":{"path":"a41af97d-6bd6-44d2-b79e-dca6df1e6e7e","options":{},"httpMethod":"POST","responseMode":"responseNode"},"typeVersion":2},{"id":"7fae635b-2c8d-44e5-ac2a-b8a458653905","name":"Respond to Webhook","type":"n8n-nodes-base.respondToWebhook","position":[2440,1020],"parameters":{"options":{},"respondWith":"allIncomingItems"},"typeVersion":1.2},{"id":"96b562cd-1a55-40ef-aa0c-5d553d7f9818","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1500,740],"parameters":{"color":4,"height":480,"content":"## Webhook Trigger\nNode: Webhook\nAccepts **incoming HTTP POST requests**.\nExpected body format:\n\njson\n{ \"message\": \"<symbol>\" }\n\nThis kicks off the **full news + sentiment analysis process** for a given crypto asset."},"typeVersion":1},{"id":"8422e6bb-320e-4b5b-b392-2ba3adb215b7","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[2380,760],"parameters":{"color":4,"height":480,"content":"## Return Results to Caller\nNode: Respond to Webhook\n**Sends the final formatted message** back to the parent workflow that triggered the call."},"typeVersion":1},{"id":"f323030f-c92f-4bff-a5df-f498aa70d9c4","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[2780,-360],"parameters":{"width":1340,"height":2360,"content":"# 📰 Binance SM News and Sentiment Analyst Webhook Tool – Documentation\n\nA sentiment intelligence sub-agent that aggregates crypto news from top-tier RSS feeds, filters it based on a given token, and generates a market sentiment summary + headline list formatted for Telegram.\n\n---\n\n## 🎯 Purpose\n\nThis tool is responsible for:\n\n* Accepting a webhook request with a token symbol (e.g., `DOGE`, `SOL`)\n* Aggregating recent articles from 9+ major crypto news feeds\n* Filtering for articles relevant to the symbol\n* Summarizing the sentiment and key headlines using GPT-4o\n* Returning a Telegram-friendly formatted response to the caller\n\n---\n\n## 🛠️ Architecture & Key Components\n\n| Component                          | Role                                                           |\n| ---------------------------------- | -------------------------------------------------------------- |\n| 🔗 `Webhook`                       | Triggered externally with `{ message: \"BTC\" }`                 |\n| 🧠 `Crypto News & Sentiment Agent` | Uses GPT to extract the correct crypto keyword                 |\n| 🔄 RSS Feed Readers                | Pull from Cointelegraph, Coindesk, NewsBTC, Bitcoinist, etc.   |\n| 📦 `Merge All Articles`            | Combines articles into one stream                              |\n| 🧹 `Filter by Query`               | Keeps only the news relevant to the requested token            |\n| 📝 `Build Prompt`                  | Builds natural-language prompt to send to GPT                  |\n| 🧠 `Summarize News & Sentiment`    | GPT-4o summarizes the filtered articles with sentiment scoring |\n| 🧾 `Prepare Telegram Message`      | Formats the final summary in clean, Telegram-readable style    |\n| 📤 `Respond to Webhook`            | Returns the message to the triggering parent workflow          |\n\n---\n\n## 📥 Webhook Input\n\n> Expects a simple HTTP POST to the webhook endpoint:\n\n```json\n{\n  \"message\": \"ETH\"\n}\n```\n\nThis triggers a full pipeline execution, resulting in a text summary like:\n\n---\n\n## 📤 Sample Output Format\n\n```\n📣 ETH Sentiment: Neutral\n\n• BlackRock’s tokenized fund expands to Ethereum mainnet (CoinDesk)  \n• Ethereum fees remain high, analysts call for L2 migration (NewsBTC)  \n• Vitalik warns about centralized risks in staking (Cointelegraph)\n```\n\n---\n\n## 🔍 Use Cases\n\n| Scenario                                   | Outcome                                              |\n| ------------------------------------------ | ---------------------------------------------------- |\n| Sentiment summary for BTC                  | Fetches 8–12 filtered headlines, extracts tone       |\n| Daily news pulse for SOL                   | Shows project-related news with brief sentiment flag |\n| Enhances technical analysis interpretation | Adds macro/emotional context to trend setups         |\n| Telegram bot asks for XRP sentiment        | Sends full response back to user instantly           |\n\n---\n\n## 📚 How to Install\n\n### 1. Import & Activate\n\n1. Load the `.json` into your n8n instance\n2. Enable the webhook\n3. Link to parent agent (`Financial Analyst`, `Quant Agent`)\n\n### 2. Set Credentials\n\n* Requires a working **OpenAI API Key** (for GPT-4o)\n* No authentication required for RSS sources\n\n### 3. Connect to Caller\n\nAny external workflow (like your `Quant AI Agent`) can call this by:\n\n* Using HTTP Request Node\n* POSTing to this webhook with `{ message: \"BTC\" }` in the body\n\n---\n\n## 🧾 Licensing & Support\n\n🔗 **Don Jayamaha – LinkedIn**\n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n© 2025 Treasurium Capital Limited Company. All rights reserved.\nThis system—including workflow architecture, prompt design, and logic structure—is protected under U.S. copyright law. Unauthorized resale or reproduction is prohibited.\n\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"9c17a79d-f8a4-413e-a486-2e89229994cf","connections":{"Webhook":{"main":[[{"node":"Crypto News & Sentiment Agent","type":"main","index":0}]]},"Set Query":{"main":[[{"node":"RSS Cointelegraph","type":"main","index":0},{"node":"RSS Bitcoinmagazine","type":"main","index":0},{"node":"RSS Coindesk","type":"main","index":0},{"node":"RSS Bitcoinist","type":"main","index":0},{"node":"RSS Newsbtc","type":"main","index":0},{"node":"RSS Cryptopotato","type":"main","index":0},{"node":"RSS 99bitcoins","type":"main","index":0},{"node":"RSS Cryptobriefing","type":"main","index":0},{"node":"RSS Crypto.news","type":"main","index":0}]]},"RSS Newsbtc":{"main":[[{"node":"Merge All Articles","type":"main","index":4}]]},"Build Prompt":{"main":[[{"node":"Summarize News & Sentiment (GPT-4o)","type":"main","index":0}]]},"RSS Coindesk":{"main":[[{"node":"Merge All Articles","type":"main","index":2}]]},"RSS 99bitcoins":{"main":[[{"node":"Merge All Articles","type":"main","index":7}]]},"RSS Bitcoinist":{"main":[[{"node":"Merge All Articles","type":"main","index":3}]]},"Filter by Query":{"main":[[{"node":"Build Prompt","type":"main","index":0}]]},"RSS Crypto.news":{"main":[[{"node":"Merge All Articles","type":"main","index":9}]]},"RSS Cryptopotato":{"main":[[{"node":"Merge All Articles","type":"main","index":6}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Crypto News & Sentiment Agent","type":"ai_languageModel","index":0}]]},"RSS Cointelegraph":{"main":[[{"node":"Merge All Articles","type":"main","index":0}]]},"Merge All Articles":{"main":[[{"node":"Filter by Query","type":"main","index":0}]]},"RSS Cryptobriefing":{"main":[[{"node":"Merge All Articles","type":"main","index":8}]]},"RSS Bitcoinmagazine":{"main":[[{"node":"Merge All Articles","type":"main","index":1}]]},"Prepare Telegram Message":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]},"Crypto News & Sentiment Agent":{"main":[[{"node":"Set Query","type":"main","index":0}]]},"Summarize News & Sentiment (GPT-4o)":{"main":[[{"node":"Prepare Telegram Message","type":"main","index":0}]]}}}


name: Get Binance Spot Market Financial Analysis via Telegram with GPT-4o
author_name: Don Jayamaha Jr
author_username: don-the-gem-dealer
categories: []
created_at: 2025-06-06T18:03:54.629Z
updated_at: 2025-06-06T18:03:54.629Z
url: https://n8n.io/workflows/4741
scraped_at: 2025-07-06 21:16:30
description:
  This workflow powers the Binance Spot Market Quant AI Agent, acting as the Financial Market Analyst. It fuses real-time market structure data (price, volume, kline) with multiple timeframe technical indicators (15m, 1h, 4h, 1d) and returns a structured trading outlook—perfect for intraday and swing traders who want actionable analysis in Telegram.

  🔗 Requires the following sub-workflows to function:
  • Binance SM 15min Indicators Tool
  • Binance SM 1hour Indicators Tool
  • Binance SM 4hour Indicators Tool
  • Binance SM 1day Indicators Tool
  • Binance SM Price/24hStats/Kline Tool

  ⚙️ How It Works

  Triggered via webhook (typically by the Quant AI Agent).
  Extracts user symbol + timeframe from input (e.g., "DOGE outlook today").
  Calls all linked sub-workflows to retrieve indicators + live price data.
  Merges the data and formats a clean trading report using GPT-4o-mini.
  Returns HTML-formatted message suitable for Telegram delivery.

  📥 Sample Input

  {
    "message": "SOLUSDT",
    "sessionId": "654321123"
  }

  ✅ Telegram Output Format

  📊 SOLUSDT Market Snapshot

  💰 Price: $156.75  
  📉 24h Stats: High $160.10 | Low $149.00 | Volume: 1.1M SOL

  🧪 4h Indicators:
  • RSI: 58.2 (Neutral-Bullish)  
  • MACD: Crossover Up  
  • BB: Squeezing Near Upper Band  
  • ADX: 25.7 (Rising Trend)

  📈 Resistance: $163  
  📉 Support: $148

  🔍 Use Cases

  | Scenario                        | Outcome                                                   |
  | ------------------------------- | --------------------------------------------------------- |
  | User asks for “BTC outlook”     | Returns 1h + 4h + 1d indicators + live price + key levels |
  | Telegram bot prompt: “DOGE now” | Returns short-term 15m + 1h analysis snapshot             |
  | Strategy trigger inside n8n     | Enables other workflows to consume structured signal data |

  🎥 Watch Tutorial:

  🧾 Licensing & Attribution

  © 2025 Treasurium Capital Limited Company
  Architecture, prompts, and trade report structure are IP-protected.
  No unauthorized rebranding or redistribution permitted.

  🔗 For support: LinkedIn – Don Jayamaha

nodes_used:
  ["@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.toolWorkflow"]

workflow_json:
  {"id":"Nm41n4i6VMhrixZs","meta":{"instanceId":"a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6","templateCredsSetupCompleted":true},"name":"Binance SM Financial Analyst Tool","tags":[],"nodes":[{"id":"76944051-b8a4-4619-a307-3467e545c2d0","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-640,-100],"parameters":{"workflowInputs":{"values":[{"name":"message"},{"name":"sessionId"}]}},"typeVersion":1.1},{"id":"035ef2de-8f55-4d8e-96fb-17ecefc835b9","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-920,240],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1-mini","cachedResultName":"gpt-4.1-mini"},"options":{}},"credentials":{"openAiApi":{"id":"yUizd8t0sD5wMYVG","name":"OpenAi account"}},"typeVersion":1.2},{"id":"8a658740-f8c3-44e2-ae3a-974bf5baec55","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[-660,240],"parameters":{},"typeVersion":1.3},{"id":"ab7672db-5912-4ed5-b9cc-8a64195fb4f1","name":"Binance SM Financial Analyst Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-200,-100],"parameters":{"text":"={{ $json.message }}","options":{"systemMessage":"You are the **Binance Spot Market Financial Analyst AI Agent**, tasked with interpreting natural-language trading queries and generating **multi-timeframe, indicator-driven market analysis** for any Binance spot symbol.\n\nYour core responsibility is to orchestrate real-time price tools and technical indicator sub-agents to **diagnose trend conditions, volatility shifts, and market momentum**, and return a structured report formatted for Telegram.\n\n---\n\n### 🔗 Connected Tools & Agents\n\n#### 1. **Price & Market Structure Tool**\n\nWorkflow: `Binance SM Price-24hrStats-OrderBook-Kline Tool`\nReturns:\n\n* `getCurrentPrice`\n* `get24hrStats`\n* `getOrderBook`\n* `getKlines`\n  Input:\n\n```json\n{\n  \"message\": \"<SYMBOL>\",\n  \"sessionId\": \"<Telegram Chat ID>\"\n}\n```\n\n#### 2. **Timeframe-Based Technical Indicator Agents**\n\nEach uses the latest Binance kline data (limit: 40) to calculate:\n\n* **RSI** (14)\n* **MACD** (12/26/9)\n* **Bollinger Bands** (20/2)\n* **SMA / EMA** (20)\n* **ADX** (+DI, −DI, 14)\n\nAgents:\n\n* `Binance SM 15min Indicators Agent`\n* `Binance SM 1hour Indicators Agent`\n* `Binance SM 4hour Indicators Agent`\n* `Binance SM 1day Indicators Agent`\n\nInput to each agent:\n\n```json\n{\n  \"message\": \"<SYMBOL>\",\n  \"sessionId\": \"<Telegram Chat ID>\"\n}\n```\n\n---\n\n### 🧠 Decision Engine & Routing Logic\n\nYou must:\n\n* Extract the **symbol** and **implied timeframe** from the user query.\n* If no timeframe is given, default to:\n\n  * **Short-Term**: 15m + 1h\n  * **Mid-Term**: 1h + 4h\n  * **Long-Term**: 1d + 4h\n* Route data requests in parallel across tools\n* Merge raw metrics into a final structured insight\n\n---\n\n### 📤 Telegram Output Template\n\nReturn your final result in this format:\n\n```\n📊 <SYMBOL> Market Snapshot\n\n💰 Price: $63,220  \n📈 24h Change: +2.3%  \n📊 Volume: 45,210 BTC\n\n🧪 Technical Summary:\n• 1h RSI: 68 (Bullish)  \n• MACD: Crossover Up  \n• BB Width: Narrowing (Possible Breakout)  \n• ADX: 32 (Strong Trend)  \n\n📉 Support: $61,900  \n📈 Resistance: $63,800\n```\n\n---\n\n### ✅ Input Handling Notes\n\n* Input: Human questions like \"How’s BTC doing today?\" or \"Is SOL bullish in the 4h chart?\"\n* If timeframe is missing, **infer intent**\n* If symbol is missing, prompt: “Which token would you like me to analyze?”\n* All agents and tools **must return cleaned JSON**, avoid raw API output"},"promptType":"define"},"typeVersion":2},{"id":"f12e6672-bcb5-44af-b7d7-250437d8ba7c","name":"Binance SM Price-24hrStats-OrderBook-Kline Agent","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-400,220],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"xAa5vBxhQzEWWFJM","cachedResultName":"Work Drive — Binance SM Price-24hrStats-OrderBook-Kline Tool"},"description":"This tool is a delegated sub-agent workflow that provides low-level market data from the Binance Spot Market in response to upstream AI reasoning. It is used by higher-level agents (e.g. the Financial Analyst Agent) to retrieve structured financial metrics and price data for any cryptocurrency pair.\n\n🔧 What It Does:\nThis agent accepts a symbol-based message input and returns Binance API data for:\n\n✅ getCurrentPrice – Latest market price for a trading pair (e.g., BTCUSDT)\n\n✅ get24hrStats – 24-hour price change, high/low, volume, and close stats\n\n✅ getOrderBook – Real-time order book (bids/asks) with adjustable depth\n\n✅ getKlines – Candlestick OHLCV data for technical analysis","workflowInputs":{"value":{"message":"={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}","sessionId":"={{ $json.sessionId }}"},"schema":[{"id":"message","type":"string","display":true,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sessionId","type":"string","display":true,"required":false,"displayName":"sessionId","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"35936a8a-1bf6-4bfb-8ad7-1d192e6cf655","name":"Binance SM 15min Indicators Agent","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-120,220],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"INYtgCEbxdGBDivU","cachedResultName":"Work Drive — Binance SM 15min Indicators Tool"},"description":"This is a 15-minute interval technical indicator agent for Binance Spot Market pairs. It provides AI-driven access to real-time technical signals calculated on the latest 15-minute candlestick data. Designed for use within larger financial analysis workflows, this tool helps detect short-term momentum shifts and trading signals.\n\n🔧 What It Does:\nWhen called with a valid crypto symbol, this agent fetches the latest 15-minute technical indicators, typically including (but not limited to):\n\n✅ Relative Strength Index (RSI)\n\n✅ Bollinger Bands (BBANDS)\n\n✅ Moving Averages (SMA/EMA)\n\n✅ MACD\n\n✅ ADX","workflowInputs":{"value":{"message":"={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}","sessionId":"={{ $json.sessionId }}"},"schema":[{"id":"message","type":"string","display":true,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sessionId","type":"string","display":true,"required":false,"displayName":"sessionId","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"3c15aea8-475e-42e0-b8f7-2295a176e386","name":"Binance SM 1hour Indicators Agent","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[100,220],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"eXDMxZUrE0tIPcR9","cachedResultName":"Work Drive — Binance SM 1hour Indicators Tool"},"description":"This agent is responsible for analyzing 1-hour interval technical indicators for trading pairs on the Binance Spot Market. It is used to detect mid-range market momentum and potential entry/exit signals based on trend strength and volatility.\n\n🔧 What It Does:\nWhen invoked, this agent queries the Binance SM 1hour Indicators Tool to retrieve AI-processed indicator data including (but not limited to):\n\n✅ RSI (Relative Strength Index)\n\n✅ MACD (Moving Average Convergence Divergence)\n\n✅ Bollinger Bands (BBANDS)\n\n✅ SMA / EMA (Simple & Exponential Moving Averages)\n\n✅ ADX (Average Directional Index)\n\nThese indicators are calculated from the latest 1-hour candlestick data and limited to the most recent data points (typically last 20).","workflowInputs":{"value":{"message":"={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}","sessionId":"={{ $json.sessionId }}"},"schema":[{"id":"message","type":"string","display":true,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sessionId","type":"string","display":true,"required":false,"displayName":"sessionId","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"b2feb013-9d16-4838-bfb5-2035ceb70790","name":"Binance SM 4hour Indicators Agent","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[340,220],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"6U56ifHxnha9rf2n","cachedResultName":"Work Drive — Binance SM 4hour Indicators Tool"},"description":"This agent focuses on retrieving and analyzing 4-hour timeframe technical indicators for Binance Spot Market trading pairs. It provides a medium-term view of trend strength, volatility, and momentum shifts—ideal for swing trading analysis and macro-level setups.\n\n🔧 What It Does:\nWhen triggered, the agent queries the Binance SM 4hour Indicators Tool workflow and returns a curated set of technical indicator values, such as:\n\n✅ RSI (Relative Strength Index)\n\n✅ MACD (Moving Average Convergence Divergence)\n\n✅ Bollinger Bands\n\n✅ SMA / EMA\n\n✅ ADX (Trend Strength)\n\nThese indicators are derived from recent 4-hour candlestick data (typically the last 20 bars) and formatted for human-readable AI response generation.","workflowInputs":{"value":{"message":"={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}","sessionId":"={{ $json.sessionId }}"},"schema":[{"id":"message","type":"string","display":true,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sessionId","type":"string","display":true,"required":false,"displayName":"sessionId","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"248d63c7-0b95-4f50-acb0-ed2c58dfb4e9","name":"Binance SM 1day Indicators Agent","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[600,220],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"tZtQVd3nbDgZ1DTZ","cachedResultName":"Work Drive — Binance SM 1day Indicators Tool"},"workflowInputs":{"value":{"message":"={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}","sessionId":"={{ $json.sessionId }}"},"schema":[{"id":"message","type":"string","display":true,"required":false,"displayName":"message","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sessionId","type":"string","display":true,"required":false,"displayName":"sessionId","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"823c3ea2-dbee-4da5-a660-8b862e675db1","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-700,-400],"parameters":{"color":4,"height":500,"content":"## Trigger: Parent Workflow Call\nNode: When Executed by Another Workflow\nThis agent does not start on its own. It is always triggered from a higher-level agent, like:\n\n**Binance Quant AI Agent**\n\nCustom multi-timeframe analyzers"},"typeVersion":1},{"id":"61189fe9-31c1-4c03-b185-61ab5847e144","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-720,180],"parameters":{"color":3,"width":220,"height":520,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Memory Context\nNode: **Simple Memory\nStores the session ID, message, and interim indicator values** for cross-tool alignment. Enables:\n\nMulti-turn dialogue logic\n\nTrend comparison across timeframes\n\nReport reuse if repeated query is made"},"typeVersion":1},{"id":"e9347973-3644-47dc-927e-87b480e473d9","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-980,180],"parameters":{"width":220,"height":520,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## AI Engine\nNode: OpenAI Chat Model\nModel: **gpt-4.1-mini** or compatible\nUsed to:\n\nInterpret values from all indicator tools\n\nLabel behavior: **“Overbought,” “MACD Cross Up,” “Volatility Spike”**\n\nOutput final snapshot in clean Telegram format"},"typeVersion":1},{"id":"cee591cc-6c30-4d47-be93-5621315d02e4","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-460,180],"parameters":{"color":6,"width":220,"height":620,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Price & Structure Tool\nNode: **Binance SM Price-24hrStats-OrderBook-Kline Agent**\nReturns raw metrics:\n\n✅ Current Price\n\n✅ 24hr Stats (OHLCV)\n\n✅ Order Book Depth (top 100 bids/asks)\n\n✅ Kline snapshots (15m, 1h, 4h, 1d)\n\nAll data is Telegram-optimized before AI formatting.\n\n"},"typeVersion":1},{"id":"bfdeab4a-a387-41a6-97ca-6719b640b744","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-200,180],"parameters":{"color":6,"width":220,"height":780,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Technical Indicator Agents\nEach tool receives the same inputs:\n\njson\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"539847013\"\n}\n\n🔸 **15m Indicator Agent**\nDetects **fast-changing intraday signals** (scalping, fakeouts)\n\n\nEach calculates:\n\nRSI (14)\n\nMACD (12/26/9)\n\nBBANDS (20/2)\n\nSMA/EMA (20)\n\nADX (+DI / −DI, 14)"},"typeVersion":1},{"id":"a79b656a-b38a-4b0e-96c3-70b5282710aa","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[40,180],"parameters":{"color":6,"width":220,"height":780,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Technical Indicator Agents\nEach tool receives the same inputs:\n\njson\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"539847013\"\n}\n\n🔸 **1h Indicator Agent**\nBest for **momentum confirmation or breakout acceleration**\n\n\nEach calculates:\n\nRSI (14)\n\nMACD (12/26/9)\n\nBBANDS (20/2)\n\nSMA/EMA (20)\n\nADX (+DI / −DI, 14)"},"typeVersion":1},{"id":"d1656eec-67d4-4ff0-8cf2-ee2040a9d8f2","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[280,180],"parameters":{"color":6,"width":220,"height":780,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Technical Indicator Agents\nEach tool receives the same inputs:\n\njson\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"539847013\"\n}\n\n🔸 **4h Indicator Agent**\n**Macro view of medium-term setups and volume confirmation**\n\nEach calculates:\n\nRSI (14)\n\nMACD (12/26/9)\n\nBBANDS (20/2)\n\nSMA/EMA (20)\n\nADX (+DI / −DI, 14)"},"typeVersion":1},{"id":"115e5783-5220-45ac-a80e-bd9dd11d4af1","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[540,180],"parameters":{"color":6,"width":220,"height":780,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Technical Indicator Agents\nEach tool receives the same inputs:\n\njson\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"539847013\"\n}\n\n\n🔸 1**d Indicator Agent**\n**High-timeframe sentiment, ideal for swing trade direction**\n\nEach calculates:\n\nRSI (14)\n\nMACD (12/26/9)\n\nBBANDS (20/2)\n\nSMA/EMA (20)\n\nADX (+DI / −DI, 14)"},"typeVersion":1},{"id":"bb184375-fab1-431a-a33f-b3dc0751105d","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-320,-380],"parameters":{"color":5,"width":500,"height":460,"content":"## Primary Reasoning Agent\nNode: Binance SM Financial Analyst Agent\nThis is the orchestrator that:\n\n**Parses the symbol** and optional timeframe from user input\n\nSelects **tools dynamically**\n\n**Merges all results into one final report**\n\n"},"typeVersion":1},{"id":"396ab0d2-a322-4373-836f-94490acdc9f0","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[940,-920],"parameters":{"width":1060,"height":1900,"content":"# 📊 Binance SM Financial Analyst Tool – Documentation\n\nA central orchestrator that fuses market structure data and technical indicators across all relevant timeframes, preparing them for final trading analysis inside the Quant AI system.\n\n---\n\n## 🎯 Purpose\n\nThis tool is responsible for:\n\n* Parsing Telegram-style prompts from the master agent\n* Routing data requests to all relevant indicator tools (15m, 1h, 4h, 1d)\n* Fetching price, volume, order book, and kline structure\n* Merging all responses and returning a clean, readable summary\n\n---\n\n## 🧩 Connected Sub-Agents\n\n| Sub-Agent Tool                           | Role                                                     |\n| --------------------------------------   | -------------------------------------------------------- |\n| ✅ Binance SM 15min Indicators Tool       | Short-term volatility and reversals                      |\n| ✅ Binance SM 1hour Indicators Tool       | Intraday momentum and trend formation                    |\n| ✅ Binance SM 4hour Indicators Tool       | Swing trend analysis and confirmation                    |\n| ✅ Binance SM 1day Indicators Tool        | Macro trend detection and directional bias               |\n| ✅ Binance SM Price/24hStats/Kline Tool   | Raw market structure: OHLCV, order book, real-time price |\n\n---\n\n## ⚙️ Workflow Architecture\n\n| Section                             | Description                                                     |\n| ----------------------------------- | --------------------------------------------------------------- |\n| 🔄 **Trigger:**                     | Executed by Quant AI Agent or Telegram Bot Handler              |\n| 💬 **LLM Reasoning (gpt-4o-mini):** | Interprets queries, symbol, timeframe, intent                   |\n| 🧠 **Session Memory:**              | Tracks `sessionId`, symbol history, multi-turn intent           |\n| 📥 **Input Format:**                | `{ \\\"message\\\": \\\"SOLUSDT\\\", \\\"sessionId\\\": \\\"123456789\\\" }`    |\n| 🔁 **Tool Calls:**                  | Invokes all indicators and market data tools in parallel        |\n| 📊 **Merge Results:**               | Combines indicators + price + order book into structured output |\n| 📤 **Final Output:**                | Telegram-ready HTML summary (text only, no raw JSON)            |\n\n---\n\n## 📏 Timeframe Logic\n\n| Case           | Action                                            |\n| -------------- | ------------------------------------------------- |\n| No timeframe   | Default to `15m + 1h` (short-term snapshot)       |\n| Broad question | Return `1h + 4h + 1d` data (medium- to long-term) |\n| Symbol missing | Ask user to clarify the token or asset symbol     |\n\n---\n\n## 🖥️ Telegram Output Format\n\n```\n📊 ETHUSDT Market Overview\n\n💰 Price: $3,680  \n📉 24h Stats: High $3,720 | Low $3,580 | Volume: 920,000 ETH\n\n🧪 4h Technical Indicators:\n• RSI: 62.1 → Neutral-Bullish  \n• MACD: Crossover Up  \n• BB: Price near upper band  \n• ADX: 27.9 → Growing Trend\n\n📈 Resistance: $3,740  \n📉 Support: $3,600\n```\n\n---\n\n## ✅ Use Case Scenarios\n\n| Scenario                               | Result                                                     |\n| -------------------------------------- | ---------------------------------------------------------- |\n| User asks: “Show me BTC outlook today” | 15m + 1h + 1d analysis merged and summarized               |\n| User asks: “How is DOGE trending?”     | Indicator agent fetch + live price + structure returned    |\n| Input lacks timeframe                  | Defaults to short + medium scopes with follow-up if needed |\n\n---\n\n## 🚀 Support & Licensing\n\n🔗 **Don Jayamaha – LinkedIn**\n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n© 2025 Treasurium Capital Limited Company. All rights reserved.\nThis AI automation system, including logic, code, prompt flows, and architectural structure, is proprietary intellectual property of **Treasurium Capital Limited Company**. Reproduction, redistribution, or resale is strictly prohibited without express license.\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"9d7a97dc-1249-4e37-a25a-e003555850b7","connections":{"Simple Memory":{"ai_memory":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_memory","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_languageModel","index":0}]]},"Binance SM 1day Indicators Agent":{"ai_tool":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_tool","index":0}]]},"Binance SM 15min Indicators Agent":{"ai_tool":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_tool","index":0}]]},"Binance SM 1hour Indicators Agent":{"ai_tool":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_tool","index":0}]]},"Binance SM 4hour Indicators Agent":{"ai_tool":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_tool","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Binance SM Financial Analyst Agent","type":"main","index":0}]]},"Binance SM Price-24hrStats-OrderBook-Kline Agent":{"ai_tool":[[{"node":"Binance SM Financial Analyst Agent","type":"ai_tool","index":0}]]}}}


name: ♻️ AI Multi-Stop Planner for Circular Logistics with GPT-4o & Open Route API
author_name: Samir Saci
author_username: samirsaci
categories: []
created_at: 2025-06-07T08:20:33.015Z
updated_at: 2025-06-07T08:20:33.015Z
url: https://n8n.io/workflows/4753
scraped_at: 2025-07-06 21:16:30
description:
  Tags*: AI Agent, Supply Chain, Logistics, Circular Economy, 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 logistics teams reduce operational workload and errors by combining AI automation, route optimization APIs, and workflow automation.

  This workflow is part of a circular economy project, where stores return reusable packaging (bins, crates, containers) to a central warehouse.

  &gt; Let's circular economies with AI-powered automation using n8n!

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

  Who is this template for?

  This workflow is designed for logistics teams participating in circular economy loops.

  Let us imagine your transportation company receives this pickup request:



  The two AI Agent nodes connected to Openroute Service API will process the information and reply with the detailed route plan.



  The results include driving time and the optimal sequence of stops generated by the multi-stop optimization endpoint of the API.

  How does it work?

  This workflow automates the end-to-end processing of multi-stop pickup requests for reusable packaging:

  📨 Gmail Trigger listens for collection request emails  
  🧠 AI Agent parses the email into structured data (store ID, address, date)  
  📍 Each stop is geocoded into GPS coordinates  
  🗺️ OpenRouteService optimizes the stop sequence using truck-specific routing  
  📄 A second AI Agent formats a confirmation email in HTML with the ordered pickup plan  
  📧 The reply is sent back with all details including duration and route

  Steps:

  💌 Trigger on a new Gmail message  
  🧠 Extract data using AI Agent (e.g., stores, addresses, times)  
  📑 Store raw and processed data in Google Sheets  
  📍 Enrich with GPS coordinates  
  🚚 Optimize route using OpenRouteService (truck profile)  
  📄 Format the confirmation using an AI Agent  
  📬 Send reply to requester with route and timing

  What do I need to get started?

  You’ll need:

  A Gmail account to receive collection requests  
  A Google Sheet to store and review data  
  A free OpenRouteService API key  
  Access to OpenAI for using AI Agent nodes  
  Sample pickup request emails to test

  Next Steps

  🗒️ Use the sticky notes inside the n8n canvas to:

  Plug in your Gmail and OpenRouteService credentials  
  Try with a sample store collection email  
  Validate the confirmation format and route accuracy  

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

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

workflow_json:
  {"meta":{"instanceId":"","templateCredsSetupCompleted":true},"nodes":[{"id":"9f8389be-ac2e-4a1d-bfe3-18a7d9900b36","name":"Gmail Trigger","type":"n8n-nodes-base.gmailTrigger","position":[20,460],"parameters":{"simple":false,"filters":{},"options":{"downloadAttachments":false},"pollTimes":{"item":[{"mode":"everyMinute"}]}},"notesInFlow":true,"typeVersion":1.2},{"id":"5eb9eadc-3836-4cc9-9130-62bc655b9eb0","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[520,640],"parameters":{"jsonSchemaExample":"[\n  {\n  \"collection_request_id\": \"04-06-4EDW-75\",\n  \"store_id\":\"FRX-001\",\n  \"address\": \"103 Rue du Faubourg Saint-Antoine, 75011 Paris\",\n  \"collection_date\": \"June 7th, 2025\",\n  \"collection_time\": \"10:00\"\n}\n]\n\n\n"},"typeVersion":1.2},{"id":"1a98f859-b7ba-4778-a05b-7bd1c6da29fe","name":"AI Agent Parser","type":"@n8n/n8n-nodes-langchain.agent","position":[300,460],"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 working for a transportation company.\n\nYour job is to extract **structured data** from collection request emails sent by customers (typically retail chains like Franprix). These emails include a list of pickup addresses, a collection start time, store identifiers, and a unique Collection Request ID.\n\nYou must return an **array of JSON objects**, where each object represents one pickup location.\n\nEach object must contain:\n\n{\n  \"collection_request_id\": \"\",\n  \"store_id\": \"\",\n  \"address\": \"\",\n  \"collection_date\": \"\",\n  \"collection_time\":\"\"\n}\n\n### Instructions:\n- Extract the value of `Collection Request ID` from the email and apply it to each object.\n- For each pickup location:\n  - Extract the **store_id** (e.g., FRX-001)\n  - Extract the full **address**\n  - Use the same **collection_time_start** for all records, as provided in the email\n- If any field is missing, set its value to `null`.\n- Do not infer missing information.\n- Keep the original formatting of the time and date. Do not transform it.\n- Do not add extra fields. The output must be a **JSON array**.\n\nThis output will be processed by another system. Follow the format exactly.\n"},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"170e9ffb-23a6-42ce-bca9-ae31d18124f0","name":"Record Email Content","type":"n8n-nodes-base.googleSheets","position":[1360,460],"parameters":{"columns":{"value":{"address":"={{ $json.address }}","store_id":"={{ $json.store_id }}","location_id":"={{ $json.store_id }}_{{ $json.collection_request_id }}","collection_date":"={{ $json.collection_date }}","collection_time":"={{ $json.collection_time }}","collection_request_id":"={{ $json.collection_request_id }}"},"schema":[{"id":"collection_request_id","type":"string","display":true,"removed":false,"required":false,"displayName":"collection_request_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"store_id","type":"string","display":true,"removed":false,"required":false,"displayName":"store_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"address","type":"string","display":true,"removed":false,"required":false,"displayName":"address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"location_id","type":"string","display":true,"removed":false,"required":false,"displayName":"location_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"longitude","type":"string","display":true,"removed":false,"required":false,"displayName":"longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"latitude","type":"string","display":true,"removed":false,"required":false,"displayName":"latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"gps_coordinates","type":"string","display":true,"removed":false,"required":false,"displayName":"gps_coordinates","defaultMatch":false,"canBeUsedToMatch":true},{"id":"collection_date","type":"string","display":true,"removed":false,"required":false,"displayName":"collection_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"collection_time","type":"string","display":true,"removed":false,"required":false,"displayName":"collection_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sequence","type":"string","display":true,"removed":false,"required":false,"displayName":"sequence","defaultMatch":false,"canBeUsedToMatch":true},{"id":"total_duration","type":"string","display":true,"removed":false,"required":false,"displayName":"total_duration","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["shipment_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":1094697629,"cachedResultUrl":"","cachedResultName":"Multi-Stop"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"4c3c818c-9931-4eed-b145-39190e405b50","name":"5 sec","type":"n8n-nodes-base.wait","position":[2140,460],"webhookId":"8a602c69-d7ab-486c-990a-8d31b5e858f3","parameters":{},"typeVersion":1.1},{"id":"f567d1dd-432b-4e8e-9dec-5f27799ff61f","name":"Query Open Route API Pickup","type":"n8n-nodes-base.httpRequest","position":[1560,460],"parameters":{"url":"https://api.openrouteservice.org/geocode/search","options":{},"sendQuery":true,"sendHeaders":true,"authentication":"genericCredentialType","genericAuthType":"httpQueryAuth","queryParameters":{"parameters":[{"name":"text","value":"={{ $json.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"}]}},"credentials":{"httpQueryAuth":{"id":"CsPXdSa5p7fPrxpp","name":"Query Auth Open Route API"},"httpBearerAuth":{"id":"RwHLRH6TDUJaGZNF","name":"Bearer YOUR_TOKEN_HERE account"},"httpHeaderAuth":{"id":"uoa2pJ22gtZmYRDs","name":"Header Auth account"}},"notesInFlow":true,"typeVersion":4.2},{"id":"a88ca302-325e-4309-b427-a9eb807ab0e9","name":"Save Pickup GPS","type":"n8n-nodes-base.googleSheets","position":[1940,460],"parameters":{"columns":{"value":{"latitude":"={{ $json.latitude }}","sequence":"=","longitude":"={{ $json.longitude }}","location_id":"={{ $('Record Email Content').item.json.location_id }}","gps_coordinates":"={{ $json.longitude }}, {{ $json.latitude }}"},"schema":[{"id":"collection_request_id","type":"string","display":true,"removed":true,"required":false,"displayName":"collection_request_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"store_id","type":"string","display":true,"removed":true,"required":false,"displayName":"store_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"address","type":"string","display":true,"removed":true,"required":false,"displayName":"address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"location_id","type":"string","display":true,"removed":false,"required":false,"displayName":"location_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"longitude","type":"string","display":true,"removed":false,"required":false,"displayName":"longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"latitude","type":"string","display":true,"removed":false,"required":false,"displayName":"latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"gps_coordinates","type":"string","display":true,"removed":false,"required":false,"displayName":"gps_coordinates","defaultMatch":false,"canBeUsedToMatch":true},{"id":"collection_date","type":"string","display":true,"removed":true,"required":false,"displayName":"collection_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"collection_time","type":"string","display":true,"removed":true,"required":false,"displayName":"collection_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sequence","type":"string","display":true,"removed":false,"required":false,"displayName":"sequence","defaultMatch":false,"canBeUsedToMatch":true},{"id":"total_duration","type":"string","display":true,"removed":false,"required":false,"displayName":"total_duration","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":["location_id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":1094697629,"cachedResultUrl":"","cachedResultName":"Multi-Stop"},"documentId":{"__rl":true,"mode":"list","value":"17wbroY0w6xmw8AT-p2c_n1WbHzmfesz6d1DJbp39fn8","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"e07773a7-dd80-411e-b056-f6eb473d5dcb","name":"GPS Pickup","type":"n8n-nodes-base.set","position":[1740,460],"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":"121aa413-54e5-470a-be3b-ef243f3e9445","name":"Collect Coordinates","type":"n8n-nodes-base.googleSheets","position":[840,700],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"=04-06-4EDW-75","lookupColumn":"collection_request_id"}]},"sheetName":{"__rl":true,"mode":"list","value":1094697629,"cachedResultUrl":"","cachedResultName":"Multi-Stop"},"documentId":{"__rl":true,"mode":"list","value":"17wbroY0w6xmw8AT-p2c_n1WbHzmfesz6d1DJbp39fn8","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"eca19e02-596a-47af-a448-b18ba2aa3af7","name":"Request Open Route API","type":"n8n-nodes-base.httpRequest","position":[1360,700],"parameters":{"url":"https://api.openrouteservice.org/optimization","body":"={{ JSON.stringify({\n  jobs: $json.jobs,\n  vehicles: $json.vehicles\n}) }}\n\n","method":"POST","options":{"response":{"response":{}}},"sendBody":true,"contentType":"raw","sendHeaders":true,"authentication":"genericCredentialType","rawContentType":"application/json","genericAuthType":"httpHeaderAuth","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"}]}},"credentials":{"httpHeaderAuth":{"id":"uoa2pJ22gtZmYRDs","name":"Header Auth Open Route API"}},"notesInFlow":true,"typeVersion":4.2},{"id":"6f0027ec-68f9-495f-8958-14960dde3ccc","name":"Collect Shipment Information","type":"n8n-nodes-base.googleSheets","position":[840,1520],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"=04-06-4EDW-75","lookupColumn":"collection_request_id"}]},"sheetName":{"__rl":true,"mode":"list","value":1094697629,"cachedResultUrl":"","cachedResultName":"Multi-Stop"},"documentId":{"__rl":true,"mode":"list","value":"17wbroY0w6xmw8AT-p2c_n1WbHzmfesz6d1DJbp39fn8","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"743b5224-10c1-4629-85e5-f32a57b85926","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1140,1680],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"typeVersion":1.2},{"id":"93ed811e-041f-4f1b-92eb-b519c5b758f8","name":"AI Agent Reply","type":"@n8n/n8n-nodes-langchain.agent","position":[1200,1520],"parameters":{"text":"={{ $json.formatted_reply }}\n","options":{"systemMessage":"=You are a logistics assistant working for a transportation company.\n\nYour job is to send a clear, professional, and customer-friendly confirmation email summarizing a **multi-stop pickup schedule**.\n\nUse the preformatted HTML content provided via `{{ $json.formatted_reply }}` to structure the message.\n\n✅ Do:\n- Keep a formal and polite tone.\n- Include the pickup request ID, scheduled date & time, and the ordered list of pickup stops.\n- Confirm the estimated total driving duration.\n- Use the content **as-is**. Do not modify or rephrase it.\n\n❌ Do not:\n- Add or invent data.\n- Change the structure or wording of the HTML provided.\n\n⚠️ Format the reply strictly in **HTML** using tags like `<p>`, `<ul>`, `<li>`, and `<strong>`.\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":"5ba3408c-37c7-4d2b-8972-9e753824b21e","name":"Reply","type":"n8n-nodes-base.gmail","position":[1520,1520],"webhookId":"6e50b09c-3988-46ed-b6a6-b644aae2449f","parameters":{"message":"={{ $json.output }}","options":{},"messageId":"={{ $('Gmail Trigger').item.json.id }}","operation":"reply"},"notesInFlow":true,"typeVersion":2.1},{"id":"cfc99cbf-12ae-4c77-be75-99609d3f24d5","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[780,0],"parameters":{"color":7,"width":1560,"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":"2bb6e08e-1378-49dd-b3a4-ed68b2923705","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"color":7,"width":180,"height":820,"content":"### 1. Workflow Trigger with Gmail Trigger\nThe workflow is triggered by a new email received in your Gmail mailbox dedicated to process **collection 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":"59841c15-7453-4069-9e6b-af0e9b24dbd4","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[200,0],"parameters":{"color":7,"width":440,"height":820,"content":"### 2. AI Agent to parse the collection process\nThis node will analyze the content of the email to extract information about the **sender** *(name, company)* and the **collections** *(address, time window)*.\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":"95067b31-0ab2-48f2-b08f-ef08989c81ac","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[260,660],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"typeVersion":1.2},{"id":"48a5b173-0022-4628-b4c2-acb8a0a19122","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[800,1120],"parameters":{"color":7,"width":680,"height":720,"content":"### 4. Reply with a confirmation of shipment allocation\nWe first collect all the information of the sequence of pickups from the **Google Sheets** the AI Agent will use that 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":"bb47b105-1f97-4b23-b92c-dbe318ab21f9","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[1080,460],"parameters":{"options":{},"batchSize":"=1"},"typeVersion":3},{"id":"60ede508-1b35-4ce3-a316-b23bd8d59ef3","name":"Split by Address","type":"n8n-nodes-base.splitOut","position":[840,460],"parameters":{"options":{},"fieldToSplitOut":"output"},"typeVersion":1},{"id":"5325cb92-2d71-4416-a521-1c911b1f6df3","name":"Extract Job","type":"n8n-nodes-base.code","position":[1580,700],"parameters":{"jsCode":"const steps = items[0].json.routes[0].steps;\n\nconst orderedJobs = steps\n  .filter(step => step.type === \"job\")\n  .map((step, index) => ({\n    id: step.job,\n    sequence: index + 1\n  }));\n\nreturn orderedJobs.map(job => ({ json: job }));\n"},"typeVersion":2},{"id":"6d56227b-9c13-4924-86b3-53573ead3642","name":"Jobs Mapping","type":"n8n-nodes-base.set","position":[1240,920],"parameters":{"options":{},"assignments":{"assignments":[{"id":"1d331865-d691-4f5b-9b6f-c6bac6b52e89","name":"jobs","type":"array","value":"={{ $json.jobs }}"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"17afe2de-5512-4c23-bc31-a67ebd10a3c8","name":"Format Jobs","type":"n8n-nodes-base.code","position":[1040,700],"parameters":{"jsCode":"// This Function node transforms store pickup data into the OpenRouteService optimization payload\n\nconst inputData = items.map(item => item.json);\n\n// Build the jobs array\nconst jobs = inputData.map((entry, index) => ({\n  id: index + 1,\n  location: [entry.longitude, entry.latitude]\n}));\n\n// Take the second item as the starting location (adjust index if needed)\nconst vehicleStart = [inputData[1].longitude, inputData[1].latitude];\n\nconst vehicles = [\n  {\n    id: 1,\n    start: vehicleStart,\n    capacity: [100],\n    profile: \"driving-hgv\"\n  }\n];\n\nreturn [\n  {\n    json: {\n      jobs,\n      vehicles\n    }\n  }\n];\n"},"typeVersion":2},{"id":"ea3ebcd5-76c6-43cf-a486-bb778d473c0d","name":"Split Jobs","type":"n8n-nodes-base.splitOut","position":[1480,920],"parameters":{"options":{},"fieldToSplitOut":"jobs"},"typeVersion":1},{"id":"1af40684-cb06-455c-b6f5-0684c06438c3","name":"Merge Sequence with coordinates","type":"n8n-nodes-base.merge","position":[1820,780],"parameters":{"mode":"combine","options":{},"fieldsToMatchString":"id"},"notesInFlow":true,"typeVersion":3.1},{"id":"4d77cac0-5d3a-4778-aa98-ad10e3aa33b2","name":"Format GPS Coordinates","type":"n8n-nodes-base.set","position":[2020,780],"parameters":{"options":{},"assignments":{"assignments":[{"id":"ffab2998-7250-4591-a192-f1a2980ea79c","name":"sequence","type":"string","value":"={{ $json.sequence }}"},{"id":"38b7058b-dbd9-4679-b054-5de4b791ce50","name":"gps_coordinates","type":"string","value":"={{ $json.location[0] }}, {{ $json.location[1] }}"}]}},"typeVersion":3.4},{"id":"308f8e6b-ea6a-484f-ac0e-3593fd197360","name":"Save Sequence & Duration","type":"n8n-nodes-base.googleSheets","position":[2200,780],"parameters":{"columns":{"value":{"sequence":"={{ $json.sequence }}","total_duration":"={{ ($('Request Open Route API').item.json.summary.duration/60).toFixed(2) }}","gps_coordinates":"={{ $json.gps_coordinates }}"},"schema":[{"id":"collection_request_id","type":"string","display":true,"removed":true,"required":false,"displayName":"collection_request_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"store_id","type":"string","display":true,"removed":true,"required":false,"displayName":"store_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"address","type":"string","display":true,"removed":true,"required":false,"displayName":"address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"location_id","type":"string","display":true,"removed":true,"required":false,"displayName":"location_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"longitude","type":"string","display":true,"removed":true,"required":false,"displayName":"longitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"latitude","type":"string","display":true,"removed":true,"required":false,"displayName":"latitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"gps_coordinates","type":"string","display":true,"removed":false,"required":false,"displayName":"gps_coordinates","defaultMatch":false,"canBeUsedToMatch":true},{"id":"collection_date","type":"string","display":true,"removed":true,"required":false,"displayName":"collection_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"collection_time","type":"string","display":true,"removed":true,"required":false,"displayName":"collection_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sequence","type":"string","display":true,"removed":false,"required":false,"displayName":"sequence","defaultMatch":false,"canBeUsedToMatch":true},{"id":"total_duration","type":"string","display":true,"removed":false,"required":false,"displayName":"total_duration","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":["gps_coordinates"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":1094697629,"cachedResultUrl":"","cachedResultName":"Multi-Stop"},"documentId":{"__rl":true,"mode":"list","value":"17wbroY0w6xmw8AT-p2c_n1WbHzmfesz6d1DJbp39fn8","cachedResultUrl":"","cachedResultName":"Transportation Orders"}},"notesInFlow":true,"typeVersion":4.6},{"id":"d1f64c61-2b7e-4454-b10d-7d9d49998eb7","name":"Format Schedule","type":"n8n-nodes-base.code","position":[1000,1520],"parameters":{"jsCode":"// Sort and format the pickup sequence\nconst sorted = items.sort((a, b) => a.json.sequence - b.json.sequence);\n\nconst pickupList = sorted.map((item, index) => `\n  <li><strong>Stop ${index + 1}</strong>: ${item.json.store_id}<br>\n  Address: ${item.json.address}<br>\n  Coordinates: ${item.json.gps_coordinates}<br>\n  Scheduled Time: ${item.json.collection_time}</li>\n`).join('');\n\nconst htmlReply = `\n<p>We have scheduled your multi-stop pickup request (ID: <strong>${sorted[0].json.collection_request_id}</strong>) for <strong>${sorted[0].json.collection_date}</strong> at <strong>${sorted[0].json.collection_time}</strong>.</p>\n\n<p>Below is the confirmed pickup sequence:</p>\n<ul>${pickupList}</ul>\n\n<p>The total estimated driving duration is <strong>${sorted[0].json.total_duration} minutes</strong>.</p>\n`;\n\nreturn [{ json: { formatted_reply: htmlReply } }];\n"},"typeVersion":2}],"pinData":{},"connections":{"5 sec":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"GPS Pickup":{"main":[[{"node":"Save Pickup GPS","type":"main","index":0}]]},"Split Jobs":{"main":[[{"node":"Merge Sequence with coordinates","type":"main","index":1}]]},"Extract Job":{"main":[[{"node":"Merge Sequence with coordinates","type":"main","index":0}]]},"Format Jobs":{"main":[[{"node":"Request Open Route API","type":"main","index":0},{"node":"Jobs Mapping","type":"main","index":0}]]},"Jobs Mapping":{"main":[[{"node":"Split Jobs","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":"Split by Address","type":"main","index":0},{"node":"Collect Coordinates","type":"main","index":0},{"node":"Collect Shipment Information","type":"main","index":0}]]},"Format Schedule":{"main":[[{"node":"AI Agent Reply","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Record Email Content","type":"main","index":0}]]},"Save Pickup GPS":{"main":[[{"node":"5 sec","type":"main","index":0}]]},"Split by Address":{"main":[[{"node":"Loop Over Items","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":"Format Jobs","type":"main","index":0}]]},"Record Email Content":{"main":[[{"node":"Query Open Route API Pickup","type":"main","index":0}]]},"Format GPS Coordinates":{"main":[[{"node":"Save Sequence & Duration","type":"main","index":0}]]},"Request Open Route API":{"main":[[{"node":"Extract Job","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":"Format Schedule","type":"main","index":0}]]},"Merge Sequence with coordinates":{"main":[[{"node":"Format GPS Coordinates","type":"main","index":0}]]}}}


