# templates

name: Personal Budget & Expense Tracker with Google Sheets and Alerts MCP
author_name: Destiya Wijayanto
author_username: eantz
categories: []
created_at: 2025-06-03T08:01:11.360Z
updated_at: 2025-06-03T08:01:11.360Z
url: https://n8n.io/workflows/4612
scraped_at: 2025-06-19 22:49:19
description:
  This template provides a set of MCP tools to manage personal budgets and expenses. This MCP tools can be integrated to any AI client that support MCP integration.

  How it works
  It stores transaction records and budget in google sheet
  It will give warning if expense is above budget

  How to setup
  Sign in with google in google sheet nodes
  Copy google sheet template (link available in the sticky note)
  Target google sheet nodes to the right sheet
  Integrate with AI client
  Enjoy!!

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.crypto","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.toolWorkflow"]

workflow_json:
  {"id":"VjYVuVxMuX9MbtGy","meta":{"instanceId":"1d007fe710bcfec364941eac14bfe94a42e89c72adf697a8959f00f5db851ca6","templateCredsSetupCompleted":true},"name":"MCP Personal Expense","tags":[],"nodes":[{"id":"544866c7-9676-4a94-a77d-8637b8b9f6e3","name":"MCP Server Trigger","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[-1560,360],"webhookId":"676afb85-ff6d-45ad-ab36-e6cc590ba080","parameters":{"path":"personal-expense"},"typeVersion":1},{"id":"f45e1509-487b-46c6-b7dd-224df465c981","name":"Filter","type":"n8n-nodes-base.filter","position":[1360,-340],"parameters":{"options":{"ignoreCase":true},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"c804feba-d6da-43d9-88a9-24dfa0f7a2ed","operator":{"type":"dateTime","operation":"afterOrEquals"},"leftValue":"={{ $json.date }}","rightValue":"={{ $('Switch').item.json.payload.dateStart }}"},{"id":"512eb3ab-f42d-4a35-bc0e-7ff67ab0d6a5","operator":{"type":"dateTime","operation":"beforeOrEquals"},"leftValue":"={{ $json.date }}","rightValue":"={{ $('Switch').item.json.payload.dateEnd }}"}]}},"typeVersion":2.2},{"id":"f4411283-0efa-4218-8d96-9d9a1c7c19e6","name":"Google Sheets Filter Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-40,420],"parameters":{"workflowInputs":{"values":[{"name":"function"},{"name":"payload","type":"object"}]}},"typeVersion":1.1},{"id":"827737c1-4466-499c-abae-bc2e03d9191a","name":"Get list transactions","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-1880,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Get Transactions","workflowInputs":{"value":{"payload":"={\n  \"dateStart\": \"{{ $fromAI(\"dateStart\", \"Date Start. Format: YYYY-MM-DD\", \"string\") }}\",\n  \"dateEnd\": \"{{ $fromAI(\"dateEnd\", \"Date End. Format: YYYY-MM-Dd\", \"string\") }}\"\n}","function":"list_transaction"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"afb64fd3-d554-4f4f-9447-3a5cd48bae1a","name":"Get By ID","type":"n8n-nodes-base.googleSheetsTool","position":[-1740,560],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values0_Value', ``, 'string') }}","lookupColumn":"id"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""},"descriptionType":"manual","toolDescription":"Get Data by ID"},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"05b35a22-757d-411f-ad56-a1b0e3d7a695","name":"Switch","type":"n8n-nodes-base.switch","position":[380,320],"parameters":{"rules":{"values":[{"outputKey":"list_transaction","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"3e9f8105-2bd7-4571-8909-86cddbf4e3eb","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"list_transaction"}]},"renameOutput":true},{"outputKey":"remove_transaction","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8bba675d-4f2f-411d-858e-cd0573f2a0d7","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"remove_transaction"}]},"renameOutput":true},{"outputKey":"add_transaction","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"1cf7fe89-f22e-4656-9e16-570f4b7088f0","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"add_transaction"}]},"renameOutput":true},{"outputKey":"update_transaction","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"f63ece2b-a821-4e79-8797-365fe6b6ce2b","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"update_transaction"}]},"renameOutput":true},{"outputKey":"add_budget","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"411a0ece-ac3a-49fe-b357-c7dc56f21042","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"add_budget"}]},"renameOutput":true},{"outputKey":"update_budget","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8bac74de-c55c-4248-a2a7-728d8acae09a","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"update_budget"}]},"renameOutput":true},{"outputKey":"remove_budget","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"818c0b7b-c1b0-4150-b683-76287f0fd1f8","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"remove_budget"}]},"renameOutput":true},{"outputKey":"get_budget","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"579f8f4d-7ce0-46cf-aee5-290d5025f071","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function }}","rightValue":"get_budget"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"e7ac76ec-a796-429a-85d0-44490cfe4f00","name":"get by id","type":"n8n-nodes-base.googleSheets","position":[880,100],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.payload.id }}","lookupColumn":"id"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"d7ea9a2f-b9ef-4a02-92f7-25ec2c3a9232","name":"remove transaction","type":"n8n-nodes-base.googleSheets","position":[1160,100],"parameters":{"operation":"delete","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""},"startIndex":"={{ $json.row_number }}"},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"f6fe072a-ef50-4f95-87a6-e7b0e047127e","name":"get all transactions","type":"n8n-nodes-base.googleSheets","position":[1120,-200],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"7af5ea63-d59b-49e6-9a42-c5e85ec4650e","name":"Remove Transaction","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-1600,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Remove Transaction","workflowInputs":{"value":{"payload":"={\n  \"id\": \"{{ $fromAI(\"id\", \"ID\", \"string\") }}\"\n}","function":"remove_transaction"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"e8c38268-0876-461a-8b89-ed121c321d4a","name":"Crypto","type":"n8n-nodes-base.crypto","position":[880,520],"parameters":{"action":"generate","dataPropertyName":"id"},"typeVersion":1},{"id":"ed85ffef-9a72-4025-a0e6-7f57eb9c4a0a","name":"If","type":"n8n-nodes-base.if","position":[1280,520],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4e34ce93-3976-4f74-8933-32bc34bc459c","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.type }}","rightValue":"expense"}]}},"typeVersion":2.2},{"id":"085c44bd-dfbc-4a37-9f47-c9562e54b699","name":"Get existing budget","type":"n8n-nodes-base.googleSheets","position":[1480,500],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.date.substring(0, 7) }}","lookupColumn":"month"},{"lookupValue":"={{ $json.category }}","lookupColumn":"category"}]},"sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6,"alwaysOutputData":true},{"id":"7e6e1808-4b96-42a0-a696-5ef7a5b1fc6e","name":"Code","type":"n8n-nodes-base.code","position":[1900,320],"parameters":{"jsCode":"\n\nreturn {\n  \"id\": $(\"add transaction\").first().json.id,\n  \"budget\": {},\n  \"task\": \"Ask user to add monthly budget\"\n}"},"typeVersion":2},{"id":"4fe6970d-d46c-42c1-aa32-c5fa9a1f6b80","name":"add transaction","type":"n8n-nodes-base.googleSheets","position":[1080,520],"parameters":{"columns":{"value":{"id":"={{ $json.id }}","date":"={{ $json.payload.date }}","type":"={{ $json.payload.type }}","month":"={{ $json.payload.date.substring(0,7) }}","amount":"={{ $json.payload.amount }}","purpose":"={{ $json.payload.purpose }}","category":"={{ $json.payload.category }}"},"schema":[{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"date","type":"string","display":true,"required":false,"displayName":"date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"purpose","type":"string","display":true,"required":false,"displayName":"purpose","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"amount","type":"string","display":true,"required":false,"displayName":"amount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"type","type":"string","display":true,"required":false,"displayName":"type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"month","type":"string","display":true,"removed":false,"required":false,"displayName":"month","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"e97f4b19-6d86-4c73-8d64-356c5a6f33fe","name":"budget not found?","type":"n8n-nodes-base.if","position":[1660,500],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d062f954-0a17-4870-b632-aebea115dad9","operator":{"type":"object","operation":"empty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"dcebec66-c750-4e64-8974-d659de8c0943","name":"Code1","type":"n8n-nodes-base.code","position":[2140,520],"parameters":{"jsCode":"let totalExpenses = 0;\n\nfor (const item of $('Get Monthly Expenses').all()) {\n  totalExpenses += item.json.amount  \n}\n\nlet result = {\n  \"id\": $('add transaction').first().json.id,\n  \"budget\": {\n    \"monthlyLimit\": $('Get existing budget').first().json.budget,\n    \"remainingLimit\": $('Get existing budget').first().json.budget - totalExpenses\n  },\n  \"task\": \"\"\n}\n\nif (totalExpenses > $('Get existing budget').first().json.budget) {\n  result.task = \"Give warning to user or suggest to adjust the budget\"\n}\n\nreturn result;"},"typeVersion":2},{"id":"9164bfe3-1549-4943-a489-c67da1d32d9d","name":"Get Monthly Expenses","type":"n8n-nodes-base.googleSheets","position":[1900,520],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.month }}","lookupColumn":"month"},{"lookupValue":"={{ $json.category }}","lookupColumn":"category"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"ff8d7da3-c567-41f8-af20-88c3248822bb","name":"Add Transaction","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-1440,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Add Transaction","workflowInputs":{"value":{"payload":"={   \n  \"date\": \"{{ $fromAI(\"date\", \"Transaction date. Format: YYYY-MM-DD\", \"string\") }}\",   \n  \"purpose\": \"{{ $fromAI(\"purpose\", \"Purpose of the transaction\", \"string\") }}\", \n  \"category\": \"{{ $fromAI(\"category\", \"Transaction category\", \"string\") }}\",\n  \"amount\": {{ $fromAI(\"amount\", \"Transaction amount\", \"number\") }}, \n  \"type\": \"{{ $fromAI(\"type\", \"Transaction type. Can be expense or income\", \"string\") }}\"\n}","function":"add_transaction"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"e71da569-0165-4c3f-917a-b97843aba5bf","name":"Code2","type":"n8n-nodes-base.code","position":[1500,700],"parameters":{"jsCode":"\nreturn {\n  \"id\": $('add transaction').first().json.id,\n  \"budget\": {},\n  \"task\": \"Congratulate user for new income.\"\n}"},"typeVersion":2},{"id":"f601629b-975a-48ba-a832-f53003776246","name":"Update transaction","type":"n8n-nodes-base.googleSheets","position":[900,1020],"parameters":{"columns":{"value":{"id":"={{ $json.payload.id }}","date":"={{ $json.payload.date }}","type":"={{ $json.payload.type }}","month":"={{ $json.payload.date.substring(0,7) }}","amount":"={{ $json.payload.amount }}","purpose":"={{ $json.payload.purpose }}","category":"={{ $json.payload.category }}"},"schema":[{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"date","type":"string","display":true,"required":false,"displayName":"date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"purpose","type":"string","display":true,"required":false,"displayName":"purpose","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"amount","type":"string","display":true,"required":false,"displayName":"amount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"type","type":"string","display":true,"required":false,"displayName":"type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"month","type":"string","display":true,"required":false,"displayName":"month","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":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"0bd3eebb-e341-49cc-87d3-c5ba6fe73da6","name":"If1","type":"n8n-nodes-base.if","position":[1120,1040],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4e34ce93-3976-4f74-8933-32bc34bc459c","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('Update transaction').item.json.type }}","rightValue":"expense"}]}},"typeVersion":2.2},{"id":"c82171bf-fae5-4407-9af3-c9abddff0b04","name":"Code3","type":"n8n-nodes-base.code","position":[1840,880],"parameters":{"jsCode":"\n\nreturn {\n  \"id\": $(\"Update transaction\").first().json.id,\n  \"budget\": {},\n  \"task\": \"Ask user to add monthly budget\"\n}"},"typeVersion":2},{"id":"740cbba3-76e5-42a4-b8c8-1a33f137a576","name":"budget not found?1","type":"n8n-nodes-base.if","position":[1600,1040],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d062f954-0a17-4870-b632-aebea115dad9","operator":{"type":"object","operation":"empty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"d297855a-d70d-43cb-83d6-df2e712698d8","name":"Code4","type":"n8n-nodes-base.code","position":[2080,1060],"parameters":{"jsCode":"let totalExpenses = 0;\n\nfor (const item of $('Get Monthly Expenses1').all()) {\n  totalExpenses += item.json.amount  \n}\n\nlet result = {\n  \"id\": $('Update transaction').first().json.id,\n  \"budget\": {\n    \"monthlyLimit\": $('Get existing budget2').first().json.budget,\n    \"remainingLimit\": $('Get existing budget2').first().json.budget - totalExpenses\n  },\n  \"task\": \"\"\n}\n\nif (totalExpenses > $('Get existing budget2').first().json.budget) {\n  result.task = \"Give warning to user or suggest to adjust the budget\"\n}\n\nreturn result;"},"typeVersion":2},{"id":"3369be8c-67cc-4b2d-9c04-fb712afa6509","name":"Get Monthly Expenses1","type":"n8n-nodes-base.googleSheets","position":[1840,1060],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.month }}","lookupColumn":"month"},{"lookupValue":"={{ $json.category }}","lookupColumn":"category"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"4ae8401e-0ad5-43b4-aa72-b04edc150d4d","name":"Code5","type":"n8n-nodes-base.code","position":[1440,1240],"parameters":{"jsCode":"\nreturn {\n  \"id\": $('add transaction').first().json.id,\n  \"budget\": {},\n  \"task\": \"Congratulate user for new income.\"\n}"},"typeVersion":2},{"id":"ebcd4517-f735-4378-8c25-1b48e4593808","name":"Get Existing Budget","type":"n8n-nodes-base.googleSheets","position":[920,1500],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.payload.category }}","lookupColumn":"category"},{"lookupValue":"={{ $json.payload.month }}","lookupColumn":"month"}]},"sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6,"alwaysOutputData":true},{"id":"76132552-d70d-46dd-add6-39436430699f","name":"Get existing budget2","type":"n8n-nodes-base.googleSheets","position":[1420,1040],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.date.substring(0, 7) }}","lookupColumn":"month"},{"lookupValue":"={{ $json.category }}","lookupColumn":"category"}]},"sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6,"alwaysOutputData":true},{"id":"4d91a329-61d5-4ceb-a51a-27278c9112ad","name":"Add budget","type":"n8n-nodes-base.googleSheets","position":[1440,1480],"parameters":{"columns":{"value":{"month":"={{ $('Switch').item.json.payload.month }}","budget":"={{ $('Switch').item.json.payload.amount }}","category":"={{ $('Switch').item.json.payload.category }}"},"schema":[{"id":"month","type":"string","display":true,"required":false,"displayName":"month","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"budget","type":"string","display":true,"required":false,"displayName":"budget","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"83c5093e-fa10-4bcc-b684-e5bd22fdfd00","name":"Code6","type":"n8n-nodes-base.code","position":[1440,1680],"parameters":{"jsCode":"\n\nreturn {\n  \"task\": \"Budget already exists. Ask user to update it instead.\"\n}"},"typeVersion":2},{"id":"f83089ee-33de-48a0-8440-f02988ddd736","name":"Get Existing Budget1","type":"n8n-nodes-base.googleSheets","position":[940,1960],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.payload.month }}","lookupColumn":"month"},{"lookupValue":"={{ $json.payload.category }}","lookupColumn":"category"}]},"sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"84bcedda-5a53-4dbe-a2d9-811f96f13fd6","name":"Code7","type":"n8n-nodes-base.code","position":[1360,1940],"parameters":{"jsCode":"\n\nreturn {\n  \"task\": \"Budget not found. Ask user to add budget instead.\"\n}"},"typeVersion":2},{"id":"d761eb69-7f8d-4f7a-9f16-f06a863fa2a6","name":"Update Budget","type":"n8n-nodes-base.googleSheets","position":[1360,2120],"parameters":{"columns":{"value":{"month":"={{ $('Switch').item.json.payload.month }}","budget":"={{ $('Switch').item.json.payload.amount }}","category":"={{ $('Switch').item.json.payload.category }}","row_number":"={{ $json.row_number }}"},"schema":[{"id":"month","type":"string","display":true,"required":false,"displayName":"month","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"budget","type":"string","display":true,"required":false,"displayName":"budget","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"string","display":true,"removed":false,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["row_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"1ea98857-1eac-4135-87b9-be5b89df0a0f","name":"Get Existing Budget2","type":"n8n-nodes-base.googleSheets","position":[940,2420],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.payload.category }}","lookupColumn":"category"},{"lookupValue":"={{ $json.payload.month }}","lookupColumn":"month"}]},"sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6,"alwaysOutputData":true},{"id":"2c3cc9d2-2001-4698-9529-1373c43bebef","name":"budget not found?4","type":"n8n-nodes-base.if","position":[1120,2420],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d062f954-0a17-4870-b632-aebea115dad9","operator":{"type":"object","operation":"empty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"32259e82-ea9f-475f-9b5d-609e1bc63595","name":"Code8","type":"n8n-nodes-base.code","position":[1360,2400],"parameters":{"jsCode":"\n\nreturn {\n  \"task\": \"Budget not found, nothing to remove.\"\n}"},"typeVersion":2},{"id":"d5f55296-427e-4525-b71a-7015b89b9215","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-2580,260],"parameters":{"width":2040,"height":540,"content":"## MCP Main tools\n\nThis is an MCP main entry point. \nIt has several tools that are available to use by AI client.\n\nMost of the tools will execute another workflow\n\n\n### How to use\n\n* You need to be able to sign in via google in order to use google sheets node. \n  Refer to this [documentation](https://docs.n8n.io/integrations/builtin/credentials/google/) on how to sign in with google.\n* Copy this [google sheet template](https://docs.google.com/spreadsheets/d/1XzoYEZflj1Rdo2MVKosRqXHSjkazE5vuwYWHLybX4b0/edit?usp=sharing)\n* after you copy the sheet, make sure you enable sharing with everyone who has the link\n* In each google sheet nodes, change `document` source to `By URL`, paste the link in the URL field\n* For the nodes that related to transaction, change the `sheet` target to `transactions`\n* For the nodes that related to budget, change the `sheet` target to `budgets`"},"typeVersion":1},{"id":"605dcb3d-1bd9-403a-b50a-75ffdb755c0a","name":"Update Transaction","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-1280,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Update Transaction","workflowInputs":{"value":{"payload":"={   \n  \"id\": \"{{ $fromAI(\"id\", \"UUID of the transaction.\", \"string\") }}\",\n  \"date\": \"{{ $fromAI(\"date\", \"Transaction date. Format: YYYY-MM-DD\", \"string\") }}\",   \n  \"purpose\": \"{{ $fromAI(\"purpose\", \"Purpose of the transaction\", \"string\") }}\", \n  \"category\": \"{{ $fromAI(\"category\", \"Transaction category\", \"string\") }}\",\n  \"amount\": {{ $fromAI(\"amount\", \"Transaction amount\", \"number\") }}, \n  \"type\": \"{{ $fromAI(\"type\", \"Transaction type. Can be expense or income\", \"string\") }}\"\n}","function":"update_transaction"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"65352e90-d0b3-4a93-94bc-a31e32efb6ea","name":"Add Budget","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-1120,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Add monthly budget","workflowInputs":{"value":{"payload":"={   \n  \"month\": \"{{ $fromAI(\"month\", \"Budget month. Format : YYYY-MM\", \"string\") }}\",\n  \"category\": \"{{ $fromAI(\"category\", \"Budget category\", \"string\") }}\",   \n  \"amount\": {{ $fromAI(\"amount\", \"Budget amount\", \"number\") }}\n}","function":"add_budget"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"6c1666ec-7ebd-4f61-98db-06dc6c892892","name":"Update Budget Tool","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-980,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Update monthly budget","workflowInputs":{"value":{"payload":"={   \n  \"month\": \"{{ $fromAI(\"month\", \"Budget month. Format : YYYY-MM\", \"string\") }}\",\n  \"category\": \"{{ $fromAI(\"category\", \"Budget category\", \"string\") }}\",   \n  \"amount\": {{ $fromAI(\"amount\", \"Budget amount\", \"number\") }}\n}","function":"update_budget"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"2544655e-d5fd-476f-9185-5fe67f28b425","name":"Remove Budget","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-820,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Remove Budget","workflowInputs":{"value":{"payload":"={   \n  \"month\": \"{{ $fromAI(\"month\", \"Budget month. Format : YYYY-MM\", \"string\") }}\",\n  \"category\": \"{{ $fromAI(\"category\", \"Budget category\", \"string\") }}\"\n}","function":"remove_budget"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"021e523b-c47f-4b06-9104-279e7013df6b","name":"Execution Data","type":"n8n-nodes-base.executionData","position":[180,420],"parameters":{"dataToSave":{"values":[{"key":"function","value":"={{ $('Google Sheets Filter Workflow').item.json.function }}"},{"key":"payload","value":"={{ JSON.stringify($('Google Sheets Filter Workflow').item.json.payload) }}"}]}},"typeVersion":1},{"id":"dc42a268-4b4d-46a2-9caa-04400bccfbbc","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1620,-420],"parameters":{"color":6,"width":580,"height":180,"content":"### Get all transaction\n\nIt will get list of transactions. \n\nSince currently google sheets integration doesn't support date range filter, so if the start date and end date criterial fall into same month it will get data by filtering helper column `month`. But if they're different month, then it get all transactions"},"typeVersion":1},{"id":"acaaf56e-62c6-4b08-a7dc-2837fe153229","name":"If2","type":"n8n-nodes-base.if","position":[840,-360],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"7fc9f6b2-f43e-41da-b3cb-969c70ac3b46","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.payload.dateStart.substring(0,7) }}","rightValue":"={{ $json.payload.dateEnd.substring(0,7) }}"}]}},"typeVersion":2.2},{"id":"31a41bd8-f14f-45a0-8611-5a778b502312","name":"get all transactions1","type":"n8n-nodes-base.googleSheets","position":[1120,-480],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.payload.dateStart.substring(0,7) }}","lookupColumn":"month"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"","cachedResultName":"transactions"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"7e99365b-555e-470d-bad1-1a406ba20a15","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1400,40],"parameters":{"color":6,"width":320,"height":180,"content":"### Remove transaction\n\nIt will remove transaction by ID. However we need to get the transaction first before removing to get row number. Because removing transaction needs a row number, can't be filtered by anything"},"typeVersion":1},{"id":"b470904a-69db-4e88-9656-ccc736114c87","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2380,480],"parameters":{"color":6,"width":500,"height":200,"content":"### Add transaction\n\nIt will add transaction to a new row. In this workflow it will also check for the existing budget.\n\nIn the response, it has `task` field that will tell AI client what to do next. Either it will suggest user to add budget, or give warning if the budget already reached or surpassed."},"typeVersion":1},{"id":"4ddd4f34-be88-40f9-bfbc-84c3707f485d","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[2380,1020],"parameters":{"color":6,"width":540,"height":200,"content":"### Update transaction\n\nIt will update transaction by ID. In this workflow it will also check for the existing budget.\n\nIt has the same checking budget workflow with the add transaction. I have to duplicate it since in the end it needs to ID from the different previous node. Currently n8n doesn't allow check return value from the node that has not been executed."},"typeVersion":1},{"id":"4fe2b09d-ece3-4686-a3bd-8e80800957d0","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[1700,1460],"parameters":{"color":6,"width":340,"height":280,"content":"### Add monthly budget\n\nIt will add monthly budget.\n\n#### pro tip :\nYou can ask AI client to add budget for several months by prompting such \n\n```\nAdd budget for fashion for this month until the end of the year, $500 per month\n```"},"typeVersion":1},{"id":"8e7b0528-61e7-43cb-941c-28cd4dd6e423","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1620,2020],"parameters":{"color":6,"width":260,"height":120,"content":"### update monthly budget\n\nIt will update budget"},"typeVersion":1},{"id":"7da84021-9af7-496e-8089-ac2237beba24","name":"budget not found?2","type":"n8n-nodes-base.if","position":[1140,1500],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d062f954-0a17-4870-b632-aebea115dad9","operator":{"type":"object","operation":"empty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"b6c0e7ff-92b8-43cf-b037-8adfa2b07a05","name":"budget not found?3","type":"n8n-nodes-base.if","position":[1140,1960],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d062f954-0a17-4870-b632-aebea115dad9","operator":{"type":"object","operation":"empty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"dd3206eb-134c-44a2-bcd2-08bd28c408de","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[1620,2460],"parameters":{"color":6,"width":260,"height":120,"content":"### Remove budget\n\nIt will remove existing budget"},"typeVersion":1},{"id":"cb4aae48-7fa0-42ca-8052-441758d8775c","name":"Remove budget","type":"n8n-nodes-base.googleSheets","position":[1360,2580],"parameters":{"operation":"delete","sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""},"startIndex":"={{ $json.row_number }}"},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"bb0b7988-c13c-47e7-be28-2e3fc942e566","name":"Get Existing Budget3","type":"n8n-nodes-base.googleSheets","position":[960,2840],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.payload.category }}","lookupColumn":"category"},{"lookupValue":"={{ $json.payload.month }}","lookupColumn":"month"}]},"sheetName":{"__rl":true,"mode":"list","value":1146268703,"cachedResultUrl":"","cachedResultName":"budgets"},"documentId":{"__rl":true,"mode":"url","value":""}},"credentials":{"googleSheetsOAuth2Api":{"id":"FL23BODpHRnWRCE4","name":"Google Sheets account"}},"typeVersion":4.6,"alwaysOutputData":true},{"id":"bca9ba8a-9d65-4d85-bfbb-8fcb71a73dce","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[1200,2840],"parameters":{"color":6,"width":260,"height":120,"content":"### Get existing budget\n\nIt will get existing budget"},"typeVersion":1},{"id":"bce1c72b-a5e8-415b-8c26-b15405da7d9f","name":"Get Budget","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-680,560],"parameters":{"workflowId":{"__rl":true,"mode":"list","value":"VjYVuVxMuX9MbtGy","cachedResultName":"MCP Personal Expense"},"description":"Get Budget","workflowInputs":{"value":{"payload":"={      \"month\": \"{{ $fromAI(\"month\", \"Budget month. Format : YYYY-MM\", \"string\") }}\",   \"category\": \"{{ $fromAI(\"category\", \"Budget category\", \"string\") }}\" }","function":"get_budget"},"schema":[{"id":"function","type":"string","display":true,"required":false,"displayName":"function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"f4485275-c028-4888-90bd-414d488e0a74","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-2580,60],"parameters":{"color":4,"width":420,"content":"# MCP Personal Expense\n\nThis is a template for MCP that has tools to manage personal expenses and budget"},"typeVersion":1}],"active":true,"pinData":{"MCP Server Trigger":[{"json":{"payload":{"dateEnd":"2025-05-30","dateStart":"2025-05-01"}}}],"Update transaction":[{"json":{"id":"117efdb5-f849-47f4-8b3f-906d3c79178a","date":"2025-06-05","type":"expense","month":"2025-06","amount":35000,"purpose":"Beli bensin","category":"transportation"}}],"Google Sheets Filter Workflow":[{"json":{"payload":{"dateEnd":"2025-05-31","dateStart":"2025-05-01"},"function":"list_transaction"}}]},"settings":{"executionOrder":"v1"},"versionId":"f79633ea-5057-4b65-b41e-4dbb80470657","connections":{"If":{"main":[[{"node":"Get existing budget","type":"main","index":0}],[{"node":"Code2","type":"main","index":0}]]},"If1":{"main":[[{"node":"Get existing budget2","type":"main","index":0}],[{"node":"Code5","type":"main","index":0}]]},"If2":{"main":[[{"node":"get all transactions1","type":"main","index":0}],[{"node":"get all transactions","type":"main","index":0}]]},"Crypto":{"main":[[{"node":"add transaction","type":"main","index":0}]]},"Filter":{"main":[[]]},"Switch":{"main":[[{"node":"If2","type":"main","index":0}],[{"node":"get by id","type":"main","index":0}],[{"node":"Crypto","type":"main","index":0}],[{"node":"Update transaction","type":"main","index":0}],[{"node":"Get Existing Budget","type":"main","index":0}],[{"node":"Get Existing Budget1","type":"main","index":0}],[{"node":"Get Existing Budget2","type":"main","index":0}],[{"node":"Get Existing Budget3","type":"main","index":0}]]},"Get By ID":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"get by id":{"main":[[{"node":"remove transaction","type":"main","index":0}]]},"Add Budget":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"Add budget":{"main":[[]]},"Get Budget":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"Remove Budget":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"Execution Data":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Add Transaction":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"add transaction":{"main":[[{"node":"If","type":"main","index":0}]]},"budget not found?":{"main":[[{"node":"Code","type":"main","index":0}],[{"node":"Get Monthly Expenses","type":"main","index":0}]]},"Remove Transaction":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"Update Budget Tool":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"Update Transaction":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"Update transaction":{"main":[[{"node":"If1","type":"main","index":0}]]},"budget not found?1":{"main":[[{"node":"Code3","type":"main","index":0}],[{"node":"Get Monthly Expenses1","type":"main","index":0}]]},"budget not found?2":{"main":[[{"node":"Add budget","type":"main","index":0}],[{"node":"Code6","type":"main","index":0}]]},"budget not found?3":{"main":[[{"node":"Code7","type":"main","index":0}],[{"node":"Update Budget","type":"main","index":0}]]},"budget not found?4":{"main":[[{"node":"Code8","type":"main","index":0}],[{"node":"Remove budget","type":"main","index":0}]]},"Get Existing Budget":{"main":[[{"node":"budget not found?2","type":"main","index":0}]]},"Get existing budget":{"main":[[{"node":"budget not found?","type":"main","index":0}]]},"Get Existing Budget1":{"main":[[{"node":"budget not found?3","type":"main","index":0}]]},"Get Existing Budget2":{"main":[[{"node":"budget not found?4","type":"main","index":0}]]},"Get Monthly Expenses":{"main":[[{"node":"Code1","type":"main","index":0}]]},"Get existing budget2":{"main":[[{"node":"budget not found?1","type":"main","index":0}]]},"get all transactions":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Get Monthly Expenses1":{"main":[[{"node":"Code4","type":"main","index":0}]]},"Get list transactions":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"get all transactions1":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Google Sheets Filter Workflow":{"main":[[{"node":"Execution Data","type":"main","index":0}]]}}}


name: Website Lead Capture with Apollo.io Enrichment, HubSpot Storage & Gmail Notifications
author_name: InfyOm Technologies
author_username: infyom
nodes_used: ["n8n-nodes-base.httpRequest","n8n-nodes-base.hubspot","n8n-nodes-base.gmail"]
categories: []
created_at: 2025-06-03T10:46:49.152Z
updated_at: 2025-06-03T10:46:49.152Z
url: https://n8n.io/workflows/4618
scraped_at: 2025-06-19 22:49:54
description:
  What problem does this workflow solve?
  Capture leads from your website, enrich them via Apollo, store them in HubSpot, send a personalized thank-you email, and notify your team—all automatically.

  What does this workflow do?
  Capture leads from website forms automatically.
  Send a personalized thank-you email to each new lead.
  Enrich lead data using Apollo for deeper insights.
  Create or update a contact/lead in HubSpot CRM.
  Notify the internal team via email about the new lead.

  Setup

  Gmail Setup
  Create Gmail Credentials by creating a project in Google Cloud Console.

  Hubspot Setup
  Create Hubspot Credentials with App Token.

  How it Works:
  This workflow automates your lead capture, enrichment, and follow-up process to ensure no opportunity is missed. Here's how it works:

  1. Website Form Submission
  A visitor submits a lead form on your website. Lead details like name, email, company, and message are captured instantly.

  2. Personalized Thank-You Email
  A customized thank-you email is automatically sent to the lead, building trust and confirming receipt of their inquiry.

  3. Apollo Lead Enrichment
  The captured data is enriched using Apollo to fetch additional information like job title, LinkedIn profile, and other details. This helps you better understand and qualify your leads.

  4. Create Lead in HubSpot
  The enriched lead information is pushed into HubSpot as a new contact or lead. Duplicate checks ensure that there are no repeat entries.

  5. Internal Notification
  An email notification with enriched lead details is sent to your team. Your team can follow up immediately with a complete profile.

  Who can use it?
  This workflow can be used by any website owner with a "Get In Touch" or "Contact Us" button.

workflow_json:
  {"id":"HJ1BFDzLA4ywrHt5","meta":{"instanceId":"fcb622cbd5234c565b9b78babeaf0ea2455df9d2aad0d1adff7c1ef99583e685","templateCredsSetupCompleted":true},"name":"Website Inbound Lead Collection & CRM Integration with Enrichment","nodes":[{"id":"3496a319-7020-4326-9696-1cc61c304fd5","name":"Webhook - Collect Lead","type":"n8n-nodes-base.webhook","position":[-440,100],"webhookId":"lead-intake-id","parameters":{"path":"lead-intake","options":{},"httpMethod":"POST","responseMode":"lastNode"},"typeVersion":1},{"id":"2d67475d-c742-4e00-8a70-2047342f43fc","name":"Gmail - Send Thank You","type":"n8n-nodes-base.gmail","position":[-180,-80],"webhookId":"c6ed3568-2220-4961-8911-59a199571df8","parameters":{"sendTo":"={{ $('Webhook - Collect Lead').item.json.body.email }}","message":"=Thank You for Reaching Out!\n\nDear {{ $json.body.first_name }}\n\nI hope this message finds you well. Thank you for reaching out to us at InfyOm Technologies. Your interest and support mean a lot to us.\n\nWe have received your request and our team will soon get back to you.\n\nThanks,\nInfyOm Sales Team","options":{"appendAttribution":false},"subject":"Thanks for Getting in touch!","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"ZZN4CoXoq5vJk2UA","name":"Gmail account"}},"typeVersion":2.1},{"id":"ea3642bb-fc87-4737-9feb-a0b4de50e44f","name":"HubSpot - Create Contact","type":"n8n-nodes-base.hubspot","position":[40,100],"parameters":{"email":"={{ $('Webhook - Collect Lead').item.json.body.email }}","options":{},"authentication":"appToken","additionalFields":{"city":"={{ $json.contacts[0].city }}","country":"={{ $json.contacts[0].country }}","message":"=Person LinkedIn: {{ $json.contacts[0].linkedin_url }}\nCompany Phone: {{ $json.contacts[0].account.primary_phone.number }}\nCompany LinkedIn: {{ $json.contacts[0].account.linkedin_url }}\n\n","jobTitle":"={{ $json.contacts[0].title }}","firstName":"={{ $('Webhook - Collect Lead').item.json.body.first_name }}","websiteUrl":"={{ $json.contacts[0].account.website_url }}","companyName":"={{ $json.contacts[0].organization_name }}","twitterUsername":"={{ $json.contacts[0].twitter_url }}"}},"credentials":{"hubspotAppToken":{"id":"XEaExWg92xxlYHhF","name":"HubSpot App Token account"}},"typeVersion":2},{"id":"260877fc-f0bf-4f09-a722-aafbdbacff61","name":"Gmail - Notify Team","type":"n8n-nodes-base.gmail","position":[-180,280],"webhookId":"bb1666fd-e9d3-48e0-9224-cd038efb945f","parameters":{"sendTo":"your_email_address","message":"=A new form has been submitted on the website. \n\nName : {{ $('Webhook - Collect Lead').item.json.body.first_name }}\nEmail : {{ $json.body.email }}\n\n","options":{"appendAttribution":false},"subject":"New Lead Notification","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"ZZN4CoXoq5vJk2UA","name":"Gmail account"}},"typeVersion":2.1},{"id":"257d6356-5fca-4440-800f-33acc1c6fdd6","name":"Enrich Data from Apollo","type":"n8n-nodes-base.httpRequest","position":[-180,100],"parameters":{"url":"https://api.apollo.io/api/v1/contacts/search","method":"POST","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"q_keywords","value":"={{ $json.body.email }}"},{"name":"sort_ascending","value":"false"}]},"headerParameters":{"parameters":[{"name":"Cache-Control","value":"no-cache"},{"name":"accept","value":"application/json"},{"name":"x-api-key","value":"your_apollo_key"}]}},"typeVersion":4.2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"07e6a836-d60c-496d-9dca-90e198d2381e","connections":{"Webhook - Collect Lead":{"main":[[{"node":"Gmail - Send Thank You","type":"main","index":0},{"node":"Gmail - Notify Team","type":"main","index":0},{"node":"Enrich Data from Apollo","type":"main","index":0}]]},"Enrich Data from Apollo":{"main":[[{"node":"HubSpot - Create Contact","type":"main","index":0}]]}}}


name: Automated Google Drive to Facebook Ads: One-Click Video Marketing Workflow
author_name: Yaron Been
author_username: yaron-nofluff
nodes_used: ["n8n-nodes-base.httpRequest","n8n-nodes-base.googleDrive"]
categories: []
created_at: 2025-06-03T11:23:55.059Z
updated_at: 2025-06-03T11:23:55.059Z
url: https://n8n.io/workflows/4620
scraped_at: 2025-06-19 22:50:01
description:
  This cutting-edge n8n automation is a powerful digital marketing tool designed to streamline the process of transforming Google Drive videos into Facebook advertising assets. By intelligently connecting cloud storage, video upload, and ad creation platforms, this workflow:

  Discovers Marketing Content: 
     Automatically scans Google Drive
     Identifies video marketing materials
     Eliminates manual content searching

  Seamless Video Distribution:
     Downloads selected video files
     Uploads directly to Facebook
     Prepares videos for advertising

  Instant Ad Creative Generation:
     Creates Facebook ad creatives
     Leverages uploaded video content
     Accelerates marketing campaign setup

  Automated Platform Integration:
     Connects Google Drive and Facebook
     Reduces manual intervention
     Speeds up content deployment

  Key Benefits
  🤖 Full Automation: Zero-touch video marketing
  💡 Smart Content Management: Effortless video distribution
  📊 Rapid Campaign Setup: Quick ad creative generation
  🌐 Multi-Platform Synchronization: Seamless content flow

  Workflow Architecture

  🔹 Stage 1: Content Discovery
  Manual Trigger**: Workflow initiation
  Google Drive Integration**: Video file scanning
  Intelligent File Selection**:
    Identifies MP4 video files
    Prepares for marketing use

  🔹 Stage 2: Video Preparation
  Automatic Download**
  File Validation**
  Marketing-Ready Formatting**

  🔹 Stage 3: Facebook Upload
  Direct Video Upload**
  Ad Account Integration**
  Seamless Platform Transfer**

  🔹 Stage 4: Ad Creative Generation
  Automated Creative Setup**
  Video-Based Ad Creation**
  Instant Marketing Asset Preparation**

  Potential Use Cases
  Digital Marketing Teams**: Rapid content deployment
  Social Media Managers**: Streamlined ad creation
  Content Creators**: Efficient video marketing
  Small Business Owners**: Simplified advertising workflow
  Marketing Agencies**: Scalable content distribution

  Setup Requirements
  Google Drive
     Connected Google account
     Configured video folder
     Appropriate sharing settings

  Facebook Ads
     Ad account credentials
     Page ID configuration
     API access token

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

  Future Enhancement Suggestions
  🤖 AI-powered video selection
  📊 Performance tracking integration
  🔔 Campaign launch notifications
  🌐 Multi-platform ad deployment
  🧠 Intelligent content routing

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

  Ethical Guidelines
  Respect copyright and usage rights
  Maintain transparent marketing practices
  Ensure appropriate content selection
  Provide clear advertising disclosures

  Hashtag Performance Boost 🚀
  #MarketingAutomation #VideoAdvertising #FacebookAds #DigitalMarketing #ContentMarketing #AIMarketing #WorkflowAutomation #SocialMediaStrategy #AdTech #MarketingInnovation

  Workflow Visualization

  [Manual Trigger]
      ⬇️
  [List Drive Videos]
      ⬇️
  [Download Video]
      ⬇️
  [Upload to Facebook]
      ⬇️
  [Create Ad Creative]

  Connect With Me

  Ready to revolutionize your digital marketing?

  📧 Email: Yaron@nofluff.online

  🎥 YouTube: @YaronBeen

  💼 LinkedIn: Yaron Been

  Transform your marketing workflow with intelligent, automated solutions!

workflow_json:
  {"id":"nkYXWToCsTu0oQCu","meta":{"instanceId":"57c71fe69aec521b7d0bd3751d2e0aaa08f8884418e122571610a23c9eb8a65c","templateCredsSetupCompleted":true},"name":"drive_fb_ads","tags":[],"nodes":[{"id":"39f9d135-0594-483d-bb62-c3e7bd355ba6","name":"Manual Trigger","type":"n8n-nodes-base.manualTrigger","position":[0,0],"parameters":{},"typeVersion":1},{"id":"4439237c-49fb-4864-ba9e-09341136f326","name":"List Drive Videos","type":"n8n-nodes-base.googleDrive","position":[200,0],"parameters":{"name":"video1.pdf","options":{}},"credentials":{"googleDriveOAuth2Api":{"id":"pIW55BNPyp4T9msu","name":"Google Drive account 2"}},"typeVersion":2},{"id":"1214fa7b-8768-46c8-bd44-e35e58ae7bc4","name":"Download Video","type":"n8n-nodes-base.googleDrive","position":[400,0],"parameters":{"fileId":{"__rl":true,"mode":"list","value":""},"options":{},"operation":"download"},"credentials":{"googleDriveOAuth2Api":{"id":"pIW55BNPyp4T9msu","name":"Google Drive account 2"}},"typeVersion":2},{"id":"5a08b369-b001-4c7d-a839-1f035c04fed2","name":"Upload Video to FB","type":"n8n-nodes-base.httpRequest","position":[600,0],"parameters":{"url":"https://graph-video.facebook.com/v19.0/{{ $json.ad_account_id }}/advideos","options":{},"authentication":"headerAuth"},"typeVersion":3},{"id":"b00251d7-db53-44d0-8c9b-6c461208e51a","name":"Create Ad Creative","type":"n8n-nodes-base.httpRequest","position":[800,0],"parameters":{"url":"https://graph.facebook.com/v19.0/{{ $json.ad_account_id }}/adcreatives","options":{},"authentication":"headerAuth"},"typeVersion":3},{"id":"5fbd0846-cda3-49fa-8b0b-f5fda2198ce2","name":"Extract Video ID","type":"n8n-nodes-base.function","position":[720,180],"parameters":{"functionCode":"return items.map(item => ({ json: {\n  video_id: item.json.id,\n  ad_account_id: 'act_YOUR_AD_ACCOUNT_ID',\n  page_id: 'YOUR_PAGE_ID'\n} }));"},"typeVersion":1},{"id":"376af680-b958-4f28-bb46-e278974badad","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-160,-200],"parameters":{"width":460,"height":120,"content":"Automatically fetches all MP4 videos from a Google Drive folder, downloads each video, uploads it to Facebook as an ad video, and creates an ad creative using the uploaded video."},"typeVersion":1},{"id":"939f6448-9c5a-4be6-9138-eacd7588668b","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-40,160],"parameters":{"width":150,"height":80,"content":"Starts the workflow manually"},"typeVersion":1},{"id":"d272eedd-0871-43a7-baa6-c5f3249d0f8b","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[180,160],"parameters":{"width":150,"height":80,"content":"Fetches video files (MP4) from Google Drive"},"typeVersion":1},{"id":"f89e6cf7-f352-4463-a59f-cb690e571ee4","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[380,160],"parameters":{"width":150,"height":80,"content":"Downloads the selected video"},"typeVersion":1},{"id":"e71a87a8-816f-4ec3-95f1-84dc7e53a1c2","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[560,160],"parameters":{"width":150,"height":80,"content":"Uploads video to Facebook Ad Account"},"typeVersion":1},{"id":"b5c42829-5e8c-4693-aa4d-005eac224ca0","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[740,380],"parameters":{"width":210,"height":80,"content":"Prepares ID and Ad Account/Page info"},"typeVersion":1},{"id":"3125893f-bf28-4472-96ce-dcab1726a0b2","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[840,160],"parameters":{"width":170,"height":80,"content":"Creates the ad creative using uploaded video"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"c70b52c1-6804-4fbc-b924-7ed1c2a4126d","connections":{"Download Video":{"main":[[{"node":"Upload Video to FB","type":"main","index":0}]]},"Manual Trigger":{"main":[[{"node":"List Drive Videos","type":"main","index":0}]]},"Extract Video ID":{"main":[[{"node":"Create Ad Creative","type":"main","index":0}]]},"List Drive Videos":{"main":[[{"node":"Download Video","type":"main","index":0}]]},"Upload Video to FB":{"main":[[{"node":"Extract Video ID","type":"main","index":0}]]}}}


name: Automated Video Analysis: AI-Powered Insight Generation from Google Drive
author_name: Yaron Been
author_username: yaron-nofluff
categories: []
created_at: 2025-06-03T11:26:41.816Z
updated_at: 2025-06-03T11:26:41.816Z
url: https://n8n.io/workflows/4621
scraped_at: 2025-06-19 22:50:10
description:
  This cutting-edge n8n automation is a sophisticated video intelligence tool designed to transform raw video content into actionable insights. By intelligently connecting Google Drive, AI analysis, and automated processing, this workflow:

  Discovers Video Content: 
     Automatically retrieves videos from Google Drive
     Supports scheduled or on-demand analysis
     Eliminates manual content searching

  Advanced AI Analysis:
     Leverages Google Gemini AI
     Provides comprehensive video insights
     Extracts meaningful content summaries

  Intelligent Processing:
     Validates file status
     Prepares content for AI analysis
     Ensures high-quality insight generation

  Seamless Workflow Integration:
     Automated scheduling
     Cross-platform content processing
     Reduces manual intervention

  Key Benefits
  🤖 Full Automation: Zero-touch video intelligence
  💡 AI-Powered Insights: Advanced content analysis
  📊 Comprehensive Processing: Detailed video understanding
  🌐 Multi-Platform Synchronization: Seamless content flow

  Workflow Architecture

  🔹 Stage 1: Content Discovery
  Scheduled Trigger**: Automated workflow initiation
  Google Drive Integration**: Video file retrieval
  Intelligent File Selection**:
    Identifies target videos
    Prepares for AI analysis

  🔹 Stage 2: Content Preparation
  File Download**
  LLM Chain Processing**
  AI-Ready Content Formatting**

  🔹 Stage 3: AI Analysis
  Gemini API Integration**
  Comprehensive Content Examination**
  Intelligent Insight Generation**

  🔹 Stage 4: Result Structuring
  Analysis Result Formatting**
  Structured Insight Preparation**
  Ready-to-Use Intelligence**

  Potential Use Cases
  Content Creators**: Video content analysis
  Marketing Teams**: Content insight generation
  Educational Institutions**: Lecture and presentation review
  Research Organizations**: Automated video intelligence
  Media Companies**: Rapid content assessment

  Setup Requirements
  Google Drive
     Connected Google account
     Configured video folder
     Appropriate sharing settings

  Google Gemini API
     API credentials
     Configured analysis parameters
     Access to Gemini Pro model

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

  Future Enhancement Suggestions
  🤖 Multi-model AI analysis
  📊 Detailed insight scoring
  🔔 Automated reporting
  🌐 Cross-platform insight sharing
  🧠 Advanced content categorization

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

  Ethical Guidelines
  Respect content privacy
  Maintain transparent analysis practices
  Ensure appropriate content usage
  Protect intellectual property rights

  Hashtag Performance Boost 🚀
  #AIVideoAnalysis #ContentIntelligence #GeminiAI #VideoInsights #AutomatedLearning #AIWorkflow #MachineLearning #ContentAnalytics #TechInnovation #AIAutomation

  Workflow Visualization

  [Schedule Trigger]
      ⬇️
  [Download from Drive]
      ⬇️
  [LLM Chain Processing]
      ⬇️
  [Check File Status]
      ⬇️
  [Analyze Video]
      ⬇️
  [Format Analysis Result]

  Connect With Me

  Ready to revolutionize your video intelligence?

  📧 Email: Yaron@nofluff.online

  🎥 YouTube: @YaronBeen

  💼 LinkedIn: Yaron Been

  Transform your video content analysis with intelligent, automated solutions!

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

workflow_json:
  {"id":"En63BLYn2fE6YxKh","meta":{"instanceId":"57c71fe69aec521b7d0bd3751d2e0aaa08f8884418e122571610a23c9eb8a65c","templateCredsSetupCompleted":true},"name":"Video_analysis","tags":[],"nodes":[{"id":"5cf5eee1-1a5a-481b-b0a7-e6bc8e7a072a","name":"Download Video from Drive","type":"n8n-nodes-base.googleDrive","position":[-80,-100],"parameters":{"fileId":{"__rl":true,"mode":"list","value":""},"options":{},"operation":"download","authentication":"oAuth2"},"credentials":{"googleDriveOAuth2Api":{"id":"pIW55BNPyp4T9msu","name":"Google Drive account 2"}},"typeVersion":1},{"id":"b46a5743-2ec9-48c8-9884-1cda4d021ec5","name":"Check File Status","type":"n8n-nodes-base.httpRequest","position":[360,-100],"parameters":{"url":"https://generativelanguage.googleapis.com/v1beta/files/your_file_id","options":{},"authentication":"predefinedCredentialType"},"typeVersion":1},{"id":"957978bf-d401-4f5e-b15e-64c2a7d806e2","name":"Analyze Video","type":"n8n-nodes-base.httpRequest","position":[540,-100],"parameters":{"url":"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent","options":{},"requestMethod":"POST","jsonParameters":true,"bodyParametersJson":"{\n  \"contents\": [\n    {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"fileData\": {\n            \"fileUri\": \"files/your_file_id\"\n          }\n        },\n        {\n          \"text\": \"Please analyze the video and provide a summary.\"\n        }\n      ]\n    }\n  ]\n}"},"typeVersion":1},{"id":"78834072-6f1a-43e5-8d53-6f65b8ef31a3","name":"Format Analysis Result","type":"n8n-nodes-base.set","position":[720,-100],"parameters":{"options":{}},"typeVersion":1},{"id":"acd2575c-2145-43d2-930a-0c95fdbf0035","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-260,-100],"parameters":{"rule":{"interval":[{}]}},"typeVersion":1.2},{"id":"6f710275-eb3b-4d11-98d3-9191176960ef","name":"Sticky Note - Assistance","type":"n8n-nodes-base.stickyNote","position":[940,-260],"parameters":{"color":4,"width":340,"height":620,"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\nAuthor:\nYaron Been\n![Yaron Been](https://1.gravatar.com/avatar/a4e4dcaa1f76ff5266bbf80e8df86d22efda890474c68f7796e72fd82e3f2375?size=512&d=initials)"},"typeVersion":1},{"id":"a322cc61-d934-489d-8984-7b7fbf19ed67","name":"Basic LLM Chain","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[60,-100],"parameters":{"text":"Hi, could you please prepare the video below:\n","promptType":"define"},"typeVersion":1.5},{"id":"ea265edc-b687-4aae-ad2d-3f27be704afc","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[20,200],"parameters":{"options":{}},"credentials":{"googlePalmApi":{"id":"cHiuNFEYYehlLyFW","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"01975cf6-f26e-4d14-a595-59cce454b9a2","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-300,-360],"parameters":{"width":560,"content":"This workflow automates the download, status check, and AI-based analysis of a video file from Google Drive using Gemini API."},"typeVersion":1},{"id":"a5c33cfe-9dc1-4741-87b0-f564e8d8dc9d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-280,80],"parameters":{"width":150,"height":80,"content":"Set execution interval (e.g., daily)"},"typeVersion":1},{"id":"dbf28a97-1dac-4d20-af65-180c59dfa690","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-100,80],"parameters":{"width":150,"height":80,"content":"Pulls video using Google Drive node"},"typeVersion":1},{"id":"81977563-018b-4b9b-b440-71f84abea87e","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[120,60],"parameters":{"width":150,"height":80,"content":"Prepares and passes input to Gemini"},"typeVersion":1},{"id":"18a0147d-f9d1-4332-90a5-60346cbec9c2","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[320,60],"parameters":{"width":150,"height":80,"content":"Validates video is uploaded to Gemini endpoint"},"typeVersion":1},{"id":"be07e477-aee6-4546-8930-907b1b41780a","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[520,60],"parameters":{"width":150,"height":80,"content":"Uses Gemini API to analyze video content"},"typeVersion":1},{"id":"b082a61d-3f5b-4395-a095-d9177cdce954","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[720,60],"parameters":{"width":150,"height":80,"content":"Structures the summary output\n\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"948c65d2-fbc8-4204-860a-cda81b0b8eb2","connections":{"Analyze Video":{"main":[[{"node":"Format Analysis Result","type":"main","index":0}]]},"Basic LLM Chain":{"main":[[{"node":"Check File Status","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Download Video from Drive","type":"main","index":0}]]},"Check File Status":{"main":[[{"node":"Analyze Video","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"Basic LLM Chain","type":"ai_languageModel","index":0}]]},"Download Video from Drive":{"main":[[{"node":"Basic LLM Chain","type":"main","index":0}]]}}}


name: AI-Powered Customer Service Automation with GPT, LangChain & Smart Routing
author_name: Paul
author_username: diagopl
categories: []
created_at: 2025-06-03T17:32:20.022Z
updated_at: 2025-06-03T17:32:20.022Z
url: https://n8n.io/workflows/4626
scraped_at: 2025-06-19 22:49:15
description:
  AI-Powered Customer Service Automation with Smart Routing

  How it works

  Core Intelligence Pipeline
  • Multi-Layer Message Analysis - Every customer interaction passes through three specialized AI classifiers: privacy detection (identifies sensitive data and security requirements), intent recognition (categorizes requests as purchases, inquiries, complaints, technical support, or order tracking), and sentiment analysis (monitors emotional tone from neutral to critical frustration levels)

  • Dynamic Knowledge Integration - The system maintains live connections to your company's knowledge base and order management systems, automatically querying relevant information before crafting responses. This ensures accuracy and eliminates outdated information while providing real-time order status updates

  • Conversational Memory & Context - Advanced chat memory preserves conversation history across sessions, enabling the AI to maintain context, avoid repetitive responses, and build on previous interactions for more natural, human-like conversations

  • Intelligent Response Generation - The AI agent synthesizes information from multiple sources (knowledge base, order systems, conversation history) while adapting its tone and approach based on detected customer sentiment and privacy requirements

  Smart Escalation System
  • Automated Triage Classification - A sophisticated routing engine categorizes each interaction into four escalation levels: Normal (AI-handled routine inquiries), Human Request (explicit agent requests), Critical Complaint (serious issues requiring immediate attention), and Owner Escalation (extreme situations with legal implications or persistent anger)

  • Context-Aware Handoffs - When escalation is required, the system automatically generates comprehensive situation summaries for human agents, including conversation history, customer sentiment analysis, and specific issue classification

  • Multi-Channel Notifications - Escalated cases trigger appropriate alerts via email to designated team members based on severity level, ensuring proper resource allocation and response times

  Data Intelligence & Analytics
  • Comprehensive Interaction Logging - Every conversation is captured with full context including customer sentiment, intent classification, AI responses, and escalation decisions, creating a rich dataset for performance analysis and system improvement

  • Conversation Context Generation - For escalated cases, the system automatically produces detailed conversation summaries and context reports to help human agents understand the full situation before taking over

  Set up steps

  Platform Integration (20-30 minutes)
  • Messaging Platform Connection - Configure your primary communication channel (supports multiple messaging platforms) with proper API credentials and webhook setup for real-time message processing
  • AI Service Configuration - Connect OpenAI API credentials for the language models powering the classification engines and response generation
  • Database Setup - Establish connections to your customer database and order management systems for personalized responses and order tracking capabilities

  Knowledge Base Preparation (45-60 minutes)
  • Company Information Import - Upload or connect your existing knowledge base, including product catalogs, policy documents, FAQ sections, and troubleshooting guides
  • Order Database Integration - Link your order management system to enable real-time order status queries, shipping tracking, and return processing
  • Response Templates - Configure standard response patterns and company voice guidelines to ensure consistent brand communication

  Escalation & Routing Setup (15-25 minutes)
  • Team Structure Configuration - Define escalation paths and assign notification recipients for different severity levels (standard support, critical complaints, owner-level issues)
  • Email Integration - Connect email service for automated escalation notifications with customizable templates for different situation types
  • Escalation Triggers - Fine-tune the classification thresholds that determine when conversations require human intervention

  Testing & Optimization (30-45 minutes)
  • Conversation Flow Testing - Run comprehensive test scenarios covering various customer intents, sentiment levels, and escalation triggers to validate system responses
  • Knowledge Base Validation - Verify that the AI can accurately retrieve and apply information from your knowledge base for common customer queries
  • Escalation Path Verification - Test all escalation routes to ensure proper notifications and handoff procedures are functioning correctly
  • Performance Monitoring Setup - Configure analytics tracking to monitor response accuracy, escalation rates, and customer satisfaction metrics

  Advanced Configuration (Optional - 30-60 minutes)
  • Multi-Language Support - Configure language detection and response capabilities for international customer base
  • Custom Classification Rules - Adjust intent and sentiment classification parameters based on your specific business context and customer communication patterns
  • Integration Extensions - Connect additional business systems (CRM, billing, inventory) for enhanced customer service capabilities

  Technical Specifications

  AI Models & Processing
  • Powered by GPT-4 family models for natural language understanding and generation
  • Real-time voice transcription capabilities for multi-modal customer interactions
  • Structured output parsing for consistent data classification and routing decisions
  • Context-aware memory management with configurable conversation history retention

  Data Security & Privacy
  • Automatic detection of sensitive information with privacy-first handling protocols
  • Configurable data retention policies and secure storage of conversation logs
  • Customer verification requirements for accessing sensitive account information
  • GDPR-compliant data processing and storage practices

  Scalability & Performance
  • Modular architecture supporting easy integration of additional messaging platforms
  • Database-agnostic design (supports PostgreSQL, Supabase, and other systems)
  • Horizontal scaling capabilities for high-volume customer service operations
  • Real-time processing with minimal latency for immediate customer responses

  Detailed technical implementation guides, API configuration examples, and troubleshooting documentation are embedded within the workflow nodes for development teams.

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.telegram","n8n-nodes-base.gmail","n8n-nodes-base.supabase","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.openAi","@n8n/n8n-nodes-langchain.textClassifier","@n8n/n8n-nodes-langchain.memoryPostgresChat","@n8n/n8n-nodes-langchain.toolThink"]

workflow_json:
  {"id":"h02mLLP5Q0k7rOnZ","meta":{"templateCredsSetupCompleted":true},"name":"AI-Powered Customer Service Automation with GPT, LangChain & Smart Routing","tags":[],"nodes":[{"id":"166bbde1-8755-4cc5-97f6-d74ff59ace4f","name":"Download File1","type":"n8n-nodes-base.telegram","position":[-1260,6020],"webhookId":"00c7755c-cd84-4aa4-89fe-c56f1f0cb50d","parameters":{},"typeVersion":1.2},{"id":"ed616fbb-37e3-4921-8489-c73f804a9079","name":"Transcribe1","type":"@n8n/n8n-nodes-langchain.openAi","position":[-1040,6020],"parameters":{},"typeVersion":1.6},{"id":"43401bc8-f640-4ba5-b302-2950fb5ed511","name":"Telegram Trigger1","type":"n8n-nodes-base.telegramTrigger","position":[-1700,6200],"webhookId":"75096a78-a466-4f4e-bc0d-f68e9e952231","parameters":{},"typeVersion":1.1},{"id":"771f6729-6905-452d-bb22-3c77175a8501","name":"Merge3","type":"n8n-nodes-base.merge","position":[860,5300],"parameters":{},"typeVersion":3.1},{"id":"664c272c-417f-41d7-a4a2-6611de4bcde9","name":"Aggregate3","type":"n8n-nodes-base.aggregate","position":[1080,5300],"parameters":{},"typeVersion":1},{"id":"026c3136-c0f1-4d84-a916-edf07d29cc95","name":"Merge4","type":"n8n-nodes-base.merge","position":[900,6600],"parameters":{},"typeVersion":3.1},{"id":"d4d9b351-8725-4d22-9389-1a12d166405b","name":"OpenAI Chat Model8","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[240,5680],"parameters":{},"typeVersion":1.2},{"id":"d55f8a89-cb2b-465e-be9f-5e160fd9cf36","name":"OpenAI Chat Model10","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[240,6000],"parameters":{},"typeVersion":1.2},{"id":"f86cf4c8-047f-4f2a-9f3c-90f6c7593fe9","name":"OpenAI Chat Model11","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[280,6280],"parameters":{},"typeVersion":1.2},{"id":"49684dd6-45d1-4659-9a63-103d121517a8","name":"Think1","type":"@n8n/n8n-nodes-langchain.toolThink","position":[1860,5640],"parameters":{},"typeVersion":1},{"id":"af8b5ab4-b100-442f-84be-d3384a064087","name":"Voice or Text","type":"n8n-nodes-base.switch","position":[-1480,6200],"parameters":{},"typeVersion":3.2},{"id":"a3ddbd5c-89f4-4b13-8496-4c930f9cc533","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1860,6040],"parameters":{"content":""},"typeVersion":1},{"id":"5b12d87f-ae5c-4fe7-becd-1507f8e4ac3a","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[400,6000],"parameters":{},"typeVersion":1.2},{"id":"f8d92a15-f1d7-48c6-9120-bdfeb8e7103a","name":"Structured Output Parser1","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[400,6300],"parameters":{},"typeVersion":1.2},{"id":"72208554-80eb-48cf-bf9f-bf0031c59450","name":"Postgres Chat Memory","type":"@n8n/n8n-nodes-langchain.memoryPostgresChat","position":[1660,5660],"parameters":{},"typeVersion":1.3},{"id":"a4aaede1-c203-404d-815d-1b809565aa15","name":"sentiment classifier","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[280,6180],"parameters":{},"executeOnce":true,"typeVersion":1.6},{"id":"20b52d96-f878-4b19-a2fa-c92a1e642e3e","name":"intent classifier","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[260,5840],"parameters":{},"typeVersion":1.6},{"id":"734a03da-5151-4424-80cb-d93c239fb61c","name":"Structured Output Parser2","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[440,5680],"parameters":{},"typeVersion":1.2},{"id":"cc1d47bc-df5e-4d00-97c0-16c046958907","name":"privacy classifier","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[280,5520],"parameters":{},"typeVersion":1.6},{"id":"3d3cf16b-54e0-4726-9281-78c7b19cc536","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[2260,5740],"parameters":{"content":""},"typeVersion":1},{"id":"2d697ea7-3abf-4adf-ac89-79df0e4ec7a1","name":"Knowledge base","type":"n8n-nodes-base.googleDocsTool","position":[2320,5820],"parameters":{},"typeVersion":2},{"id":"c55bf827-2744-4568-a0ee-e023d7c731b6","name":"orders database","type":"n8n-nodes-base.googleSheetsTool","position":[2040,5820],"parameters":{},"typeVersion":4.5},{"id":"9c0b1668-8176-4ebe-88de-7971975670eb","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1620,5580],"parameters":{"content":""},"typeVersion":1},{"id":"67557a8f-6979-4de7-830a-32519f1cdaa4","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1460,5640],"parameters":{},"typeVersion":1.2},{"id":"9a877509-cdbf-470e-8fc2-c6e01179559d","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2400,5080],"parameters":{"content":""},"typeVersion":1},{"id":"45cf1bee-b76c-434b-b741-aa9b2b69d68d","name":"Historial Chat and feedback","type":"n8n-nodes-base.googleSheets","position":[2460,5140],"parameters":{},"typeVersion":4.5},{"id":"b5cbddc3-7b42-4dd2-a85a-70f9ce7625ad","name":"respond","type":"n8n-nodes-base.telegram","position":[2480,5360],"webhookId":"88d7bd09-3589-40a5-af17-7dad5b2c51f0","parameters":{},"typeVersion":1.2},{"id":"296bfe0a-274c-45f6-beac-29be94ba91e4","name":"Text","type":"n8n-nodes-base.set","position":[-1140,6300],"parameters":{},"typeVersion":3.4},{"id":"5d95c556-1f4b-44de-beab-6d9e10d39026","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[1080,6600],"parameters":{},"typeVersion":1},{"id":"77776751-51b2-4ff5-a08b-ed94751dadd7","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1220,6760],"parameters":{},"typeVersion":1.2},{"id":"fcada9f2-6e98-4824-a019-8267a1d86a0d","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[160,5260],"parameters":{"content":""},"typeVersion":1},{"id":"21364bfb-a211-4f06-9337-cde63889e234","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[2020,6040],"parameters":{"content":""},"typeVersion":1},{"id":"a4aed731-3445-4087-8339-49a13f118765","name":"Normal path / success","type":"n8n-nodes-base.noOp","position":[1680,6960],"parameters":{},"typeVersion":1},{"id":"a24a6100-4769-4bde-8f66-20621eec0113","name":"Owner escalation","type":"n8n-nodes-base.gmail","position":[2080,6180],"webhookId":"aa184623-5ecc-423c-86bd-6521bffcdeb7","parameters":{},"typeVersion":2.1},{"id":"9855fb4c-716b-4aa9-bcbb-e175b0faecac","name":"Critical complaint.","type":"n8n-nodes-base.gmail","position":[2080,6660],"webhookId":"aa184623-5ecc-423c-86bd-6521bffcdeb7","parameters":{},"typeVersion":2.1},{"id":"a76f2295-9084-4a08-822a-99fd143406da","name":"Human request.","type":"n8n-nodes-base.gmail","position":[2080,6420],"webhookId":"aa184623-5ecc-423c-86bd-6521bffcdeb7","parameters":{},"typeVersion":2.1},{"id":"ab94460f-fcfc-4697-86bb-98e78129d1f9","name":"Merge","type":"n8n-nodes-base.merge","position":[-760,6180],"parameters":{},"typeVersion":3.1},{"id":"67634fad-16a3-467a-8bef-08f7519dc78c","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[200,6940],"parameters":{},"typeVersion":1.2},{"id":"0bfec7e7-29e3-4fe0-b150-a6689a8c2088","name":"Supabase1","type":"n8n-nodes-base.supabaseTool","position":[340,6940],"parameters":{},"typeVersion":1},{"id":"568cdc98-723c-471b-aa3f-b406ce63357e","name":"Human intervention","type":"@n8n/n8n-nodes-langchain.textClassifier","position":[1260,6600],"parameters":{},"typeVersion":1.1},{"id":"49a7c0f6-4d4f-4fbe-bb4c-9d5cd556f19c","name":"Aliment context for next messages","type":"n8n-nodes-base.supabase","position":[2480,5600],"parameters":{},"typeVersion":1},{"id":"71cf835b-b799-4115-9920-dbf779f3e874","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1240,6360],"parameters":{"content":""},"typeVersion":1},{"id":"abe3ad98-5f46-48bc-8ef4-00796a8e69b4","name":"Generate conv context","type":"@n8n/n8n-nodes-langchain.agent","position":[260,6720],"parameters":{},"typeVersion":2},{"id":"a370f70a-d69b-492c-957e-148a249651d4","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-3240,4740],"parameters":{"content":""},"typeVersion":1},{"id":"b924e7c7-e0e2-41ae-aba6-3a418a35ee35","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-1800,5020],"parameters":{"content":""},"typeVersion":1},{"id":"b2ca23a4-f8b5-4ef6-8de8-c4c85f80cbbc","name":"Customer service AGENT","type":"@n8n/n8n-nodes-langchain.agent","position":[1720,5340],"parameters":{},"typeVersion":1.8}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"createdAt":"2025-06-05T05:04:15.823Z","updatedAt":"2025-06-08T18:00:26.000Z","versionId":"ffd3d748-4d74-4ee9-aa02-384f6869cdaf","isArchived":false,"staticData":null,"connections":{"Text":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Merge":{"main":[[{"node":"intent classifier","type":"main","index":0},{"node":"sentiment classifier","type":"main","index":0},{"node":"privacy classifier","type":"main","index":0},{"node":"Merge4","type":"main","index":2},{"node":"Generate conv context","type":"main","index":0},{"node":"Merge3","type":"main","index":3},{"node":"Merge4","type":"main","index":3}]]},"Merge3":{"main":[[{"node":"Aggregate3","type":"main","index":0}]]},"Merge4":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Think1":{"ai_tool":[[{"node":"Customer service AGENT","type":"ai_tool","index":0}]]},"Aggregate":{"main":[[{"node":"Human intervention","type":"main","index":0}]]},"Supabase1":{"ai_tool":[[{"node":"Generate conv context","type":"ai_tool","index":0}]]},"Aggregate3":{"main":[[{"node":"Customer service AGENT","type":"main","index":0}]]},"Transcribe1":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Voice or Text":{"main":[[{"node":"Download File1","type":"main","index":0}],[{"node":"Text","type":"main","index":0}]]},"Download File1":{"main":[[{"node":"Transcribe1","type":"main","index":0}]]},"Knowledge base":{"ai_tool":[[{"node":"Customer service AGENT","type":"ai_tool","index":0}]]},"orders database":{"ai_tool":[[{"node":"Customer service AGENT","type":"ai_tool","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Customer service AGENT","type":"ai_languageModel","index":0}]]},"Telegram Trigger1":{"main":[[{"node":"Voice or Text","type":"main","index":0}]]},"intent classifier":{"main":[[{"node":"Merge4","type":"main","index":1},{"node":"Merge3","type":"main","index":1}]]},"Human intervention":{"main":[[{"node":"Owner escalation","type":"main","index":0}],[{"node":"Human request.","type":"main","index":0}],[{"node":"Critical complaint.","type":"main","index":0}],[{"node":"Normal path / success","type":"main","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"Human intervention","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model2":{"ai_languageModel":[[{"node":"Generate conv context","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model8":{"ai_languageModel":[[{"node":"privacy classifier","type":"ai_languageModel","index":0}]]},"privacy classifier":{"main":[[{"node":"Merge3","type":"main","index":0}]]},"OpenAI Chat Model10":{"ai_languageModel":[[{"node":"intent classifier","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model11":{"ai_languageModel":[[{"node":"sentiment classifier","type":"ai_languageModel","index":0}]]},"Postgres Chat Memory":{"ai_memory":[[{"node":"Customer service AGENT","type":"ai_memory","index":0}]]},"sentiment classifier":{"main":[[{"node":"Merge3","type":"main","index":2},{"node":"Merge4","type":"main","index":0}]]},"Generate conv context":{"main":[[{"node":"Merge4","type":"main","index":4}]]},"Customer service AGENT":{"main":[[{"node":"Historial Chat and feedback","type":"main","index":0},{"node":"respond","type":"main","index":0},{"node":"Aliment context for next messages","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"intent classifier","type":"ai_outputParser","index":0}]]},"Structured Output Parser1":{"ai_outputParser":[[{"node":"sentiment classifier","type":"ai_outputParser","index":0}]]},"Structured Output Parser2":{"ai_outputParser":[[{"node":"privacy classifier","type":"ai_outputParser","index":0}]]}},"triggerCount":0}


name: Discover Hidden Website API Endpoints Using Regex and AI
author_name: Yulia
author_username: yulia
categories: []
created_at: 2025-06-03T20:24:40.505Z
updated_at: 2025-06-03T20:24:40.505Z
url: https://n8n.io/workflows/4627
scraped_at: 2025-06-19 22:49:51
description:
  💡 What it is for

  This workflow helps to automatically discover undocumented API endpoints by analysing JavaScript files from the website's HTML code.

  When building automation for platforms without public APIs, we face a significant technical barrier. In a perfect world, every service would offer well-documented APIs with clear endpoints and authentication methods. But the reality is different.

  Before we resort to complex web scraping, let's analyse the architecture of the platform and check whether it makes internal API calls. We will examine JavaScript files embedded in the HTML source code to find and extract potential API endpoints.

  ⚙️Key Features

  To discover hidden API endpoints, we can apply two major approaches:

  1. Predefined regex extraction: manually insert a fixed regex with the necessary conditions to extract endpoints. Unlike LLM, which creates a custom regex for each JS file, we provide a generic expression to capture all URL strings. We do not want to accidentally miss important API endpoints. 

  2. AI-supported extraction: 
    ask LLMs to examine the structure of the JavaScript code. The 1st model will:
    capture potential API endpoints
    create a detailed description of each identified endpoint with methods and query parameters
    the 2nd LLM connected to the AI Agent will generate a regex for each JS file individually based on the output of the 1st model.
  	 
  In addition to pure endpoint extraction, we supplement our analysis with:	 

  AI regex validation:** the AI Agent calls a validation tool to iteratively improve its regex based on the reference data.  

  Results comparison:** side-by-side analysis of API endpoints extracted with a predefined regex against AI-supported results.
  ✅Requirements:

  OpenRouter API access: for AI-powered analysis (Gemini + Claude models by default)
  Minimal setup: simply configure the target URL and run
  Platforms: JS files must be accessible and have embedded standard API endpoints patterns (/api/, /v1/, etc.)  

  💪Use Cases

  📚 API documentation: create complete endpoint descriptions for internal APIs
  🚀 Automation & integration projects: find the APIs you need when official documentation is missing
  🛠 Web scraping projects: discover data access patterns
  🔍 Security research: map attack surfaces and explore unprotected endpoints

  🎉Extracted the endpoints, what now? 
  To execute API requests, we often need additional information such as query parameters or JSON body data:
  One way to find out exactly how the request is being made on the platform is to navigate to the Network tab in the Dev Tools console while interacting with the platform. Look for anything that resembles API requests and review the request/response headers, payload and query parameters. 
  Alternatively, you can also check the JS file and the page source code for the required values.

  ✨Inspiration

  As a guitarist who also builds workflows, I wanted to automate communication with the booking platform I use in my music project. While trying to connect to the platform from n8n, I ran into a challenge: no public APIs. 

  Fortunately, I found out that the platform I work with was built as a modern web app with client-side JavaScript that contained information about the API structure. This led me to the topic of hidden API endpoints and eventually to this workflow. 

  It is part of my music booking project which I presented at the n8n Community Meetup in Berlin on 22 May 2025.

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

workflow_json:
  {"id":"c5KEf1x6qMsdFPbT","meta":{"instanceId":"26b813dbc9e6a5d4d0e9118e36933b8ffd29262f560a7abf71d40736214ae089"},"name":"Discover Hidden Website API Endpoints Using Regex and AI","tags":[],"nodes":[{"id":"cf0b4351-ccd5-409f-bc96-7ac1ae645b47","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[3080,1820],"parameters":{"color":4,"width":800,"height":520,"content":"# Validation tool: the AI agent self-evaluates and iteratively improves "},"typeVersion":1},{"id":"d80057fc-912b-4aa1-97df-3ad8e93e168e","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[0,520],"parameters":{"color":6,"width":1540,"height":420,"content":"# 1. API Endpoints Extraction With a Predefined Regex  \n* Paste the **URL** of the target website into the **URL** field of the **Configuration** node.\n* Fetch the **HTML page** of the site and extract the **URLs of the JS files**.  \n* Keep relevant JS files with potential **API endpoints** (e.g. local, bundled, CDN sources). You can customise the logic to your needs: add or remove URL conditions.\n* Load JS content from kept URLs: convert references to JS files into properly formatted, complete URLs.\n* Apply predefined **regex** to extract API endpoints. \n* Keep JS files with enough URLs **(>4 endpoints)**. Assume that JS files with fewer URLs do not contain relevant API endpoints. Discard them to send only the necessary data to the LLM.\n* Clean up the extracted URLs by removing duplicated items. \n\n"},"typeVersion":1},{"id":"ba232bb7-8b9f-4ad4-bc10-25c997728c8a","name":"Auto-fixing Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserAutofixing","position":[3320,1500],"parameters":{"options":{}},"typeVersion":1},{"id":"a6d848f2-c1d4-40b2-8f69-55425c6d9843","name":"Start API Discovery","type":"n8n-nodes-base.manualTrigger","position":[0,980],"parameters":{},"typeVersion":1},{"id":"1003b136-9567-4498-8113-0ad1726bc41e","name":"Configuration","type":"n8n-nodes-base.set","position":[180,980],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d1dde61e-fa30-4c24-a9d0-cd539ee08334","name":"URL","type":"string","value":"<URL of the website i.e. https://example.com>"},{"id":"3536b6ab-3fbc-4a88-81fe-d47920d37a40","name":"User-Agent","type":"string","value":"Mozilla/5.0 (compatible; API-Discovery-Bot/1.0)"}]}},"typeVersion":3.4},{"id":"62735481-3571-4df2-8c3d-afe20a1703b8","name":"Fetch Website HTML","type":"n8n-nodes-base.httpRequest","position":[360,980],"parameters":{"url":"={{ $json.URL }}","options":{"timeout":30000,"redirect":{"redirect":{}},"response":{"response":{"neverError":true}},"allowUnauthorizedCerts":true},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"User-Agent","value":"={{ $json['User-Agent'] }}"}]}},"typeVersion":4.2},{"id":"f72069a0-28ee-42a8-9400-f64601beb609","name":"Extract URLs of JS files","type":"n8n-nodes-base.html","position":[540,980],"parameters":{"options":{},"operation":"extractHtmlContent","extractionValues":{"values":[{"key":"JS URLs","attribute":"src","cssSelector":"script[src]","returnArray":true,"returnValue":"attribute"}]}},"typeVersion":1.2},{"id":"d1d12617-779b-4afa-b9fb-a9a98870c60f","name":"Split URLs of JS files","type":"n8n-nodes-base.splitOut","position":[720,980],"parameters":{"options":{},"fieldToSplitOut":"JS URLs"},"typeVersion":1},{"id":"794b8871-2fc9-4e46-8eee-6579cbcad8c8","name":"Keep Relevant JS Files","type":"n8n-nodes-base.filter","position":[900,980],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"78e816c0-78ae-4a5c-a72e-a41ddb20919f","operator":{"type":"boolean","operation":"equals"},"leftValue":"={{ $json['JS URLs'].startsWith('/') || $json['JS URLs'].startsWith('./') }}","rightValue":true},{"id":"46442f81-14e6-4acc-bc90-b49571748a00","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"yimg"},{"id":"7953c6e1-ecec-4590-9620-b61d5a37e311","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"={{ ($('Configuration').first().json.URL).extractDomain() }}"},{"id":"cdac1d00-ee7b-4f70-af95-8fa2f5c8c491","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"/build/"},{"id":"831e432e-eeca-490d-aed0-735b1130f337","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"/dist/"},{"id":"dec40baf-b2a3-4192-9f2a-3f5eeb0b692c","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"bundle"},{"id":"edc77e96-d193-4339-a0b3-1bcf17744b7f","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'].extractDomain() }}","rightValue":"cdn"},{"id":"72295f0a-703f-4050-8d07-9d712db1025e","operator":{"type":"string","operation":"startsWith"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"/dist"},{"id":"948da288-7c23-4b62-90e1-7a38ebaed16d","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"/frontend/"},{"id":"89c4bfe0-2fa1-4135-ac16-503db39325e9","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json['JS URLs'] }}","rightValue":"/packages/"}]}},"typeVersion":2.2},{"id":"d3aeef5a-98ad-49cc-abc0-6fa8d8f73783","name":"Fetch JS Content","type":"n8n-nodes-base.httpRequest","position":[1080,980],"parameters":{"url":"={{ !!$json['JS URLs'].extractDomain() ? $json['JS URLs'].replace(/^\\/\\//, 'https://') : ($('Configuration').first().json.URL+'/'+$json['JS URLs']).replaceAll(/(?<!:)\\/\\//g,'/').replaceAll(/(?<!:)\\/\\//g,'/') }}","options":{"batching":{"batch":{"batchSize":1}},"response":{"response":{"neverError":true}}}},"typeVersion":4.2},{"id":"30de7d2a-86f7-4de4-92f6-cc9387432407","name":"Extract API Endpoints","type":"n8n-nodes-base.set","position":[1260,980],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d7f393c9-7c3c-4cd1-a6f4-d0fdb2ea4876","name":"Endpoints","type":"array","value":"={{ [...$json.data.replace(/\\\\u002[Ff]/g, '/').matchAll(/(?:[\"'`])((?:https?:\\/\\/[^\\/\\s\"'`]+)?\\/[^\\s\"'`]*?)(?:[\"'`])/g)].map(m => m[1].split('?')[0].replace(/\\/\\*+$/, '')).filter(url => url.includes('/') && url.length > 2 && !url.match(/\\.(js|css|png|jpg|gif|svg|ico)$/i)) }}"},{"id":"b8fbc2ff-9d45-41f4-b9bd-902d056ad76b","name":"JS","type":"boolean","value":true},{"id":"063fa794-c1e3-41df-81ec-ff3d5eecabc5","name":"Source","type":"string","value":"={{ $('Split URLs of JS files').item.json['JS URLs'] }}"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"da398951-fda2-40d3-a38e-e83ae9a9dfeb","name":"Check Endpoints Count","type":"n8n-nodes-base.if","position":[1440,980],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"9ec79d99-e2c4-47f3-9920-07c00ae10f71","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.Endpoints.length }}","rightValue":4}]}},"typeVersion":2.2},{"id":"2a4e5d2e-fcac-4f29-b042-0e6287b636c5","name":"Split Endpoints","type":"n8n-nodes-base.splitOut","position":[1640,980],"parameters":{"include":"selectedOtherFields","options":{},"fieldToSplitOut":"Endpoints","fieldsToInclude":"JS, Source"},"typeVersion":1},{"id":"53ebcbf7-1ba8-4a98-8a9e-ff73537c4ebe","name":"Remove Duplicates","type":"n8n-nodes-base.removeDuplicates","position":[1800,980],"parameters":{"options":{}},"typeVersion":2},{"id":"316b5b26-a96a-427f-9d20-8391a1c24bb5","name":"AI Endpoints Analysis","type":"n8n-nodes-base.httpRequest","position":[1820,1160],"parameters":{"url":"https://openrouter.ai/api/v1/chat/completions","method":"POST","options":{"timeout":1000000,"batching":{"batch":{"batchSize":1,"batchInterval":30000}}},"jsonBody":"={\n  \"model\": \"google/gemini-2.5-pro-preview\",\n   \"temperature\": 0.1,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"Here is a JS file of the webseite. Please help me to discover API endpoints of the webseite. Look thouroughly at the provided JS code, identify all API endpoints and create a short summary for each one. Specify the methods for each API endpoint.\"\n    },{\n      \"role\": \"user\",\n      \"content\": {{ JSON.stringify($json.data) }}\n    }\n  ]\n}","sendBody":true,"specifyBody":"json","authentication":"predefinedCredentialType","nodeCredentialType":"openRouterApi"},"credentials":{"openRouterApi":{"id":"r1DY63sclH2QsDBK","name":"OpenRouter account"}},"retryOnFail":true,"typeVersion":4.2,"waitBetweenTries":5000},{"id":"0449852b-015a-4e2e-b096-5dceb3c64b6c","name":"Add Source Metadata","type":"n8n-nodes-base.set","position":[2000,1160],"parameters":{"options":{"stripBinary":true},"assignments":{"assignments":[{"id":"6c670b9e-b9be-4c25-a0fa-8cd8cdacc622","name":"Source","type":"string","value":"={{ $('Reference for Source Metadata').item.json.Source }}"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"c4ef28ed-ff34-41c1-a237-40f1c3a1efba","name":"Reference for Source Metadata","type":"n8n-nodes-base.noOp","position":[1640,1160],"parameters":{},"typeVersion":1},{"id":"286e733f-a42d-4c87-b253-cff48170e91a","name":"Process Each Analyzed File","type":"n8n-nodes-base.splitInBatches","position":[1640,1480],"parameters":{"options":{}},"typeVersion":3},{"id":"ac9fca2a-6d2e-44ae-b2be-e9aad7f89e9b","name":"Format AI Results","type":"n8n-nodes-base.set","position":[1820,1480],"parameters":{"options":{},"assignments":{"assignments":[{"id":"a787bf2a-85c0-4e93-944d-3acf2d82c1e6","name":"Filename","type":"string","value":"=file{{$node[\"Process Each Analyzed File\"].context[\"currentRunIndex\"].toString().padStart(2, '0');}}.txt"},{"id":"51056f59-befb-4b30-ad3d-41ec0b7b621c","name":"Source","type":"string","value":"={{ $json.Source }}"},{"id":"128467f6-c064-4d6f-9e2f-a427e9dfc73e","name":"choices[0].message.content","type":"string","value":"={{ $json?.choices[0]?.message?.content || $json?.choices[0]?.message?.reasoning }}"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"682bab5d-036d-40c2-aff7-1d844697517f","name":"Prepare Endpoints File(s)","type":"n8n-nodes-base.convertToFile","position":[2000,1480],"parameters":{"options":{"fileName":"={{ $json.Filename }}"},"operation":"toText","sourceProperty":"choices[0].message.content","binaryPropertyName":"=data"},"typeVersion":1.1,"alwaysOutputData":true},{"id":"fd93d79e-6477-4cf3-af4a-9d5ddecc3c93","name":"Save Endpoints File(s)","type":"n8n-nodes-base.readWriteFile","position":[2180,1480],"parameters":{"options":{},"fileName":"={{ $binary.data.fileName }}","operation":"write"},"typeVersion":1},{"id":"5d04fe81-982c-4e07-826e-48f0afbabde6","name":"Pass File Name, No Binary","type":"n8n-nodes-base.set","position":[2000,1340],"parameters":{"options":{"stripBinary":true},"assignments":{"assignments":[]},"includeOtherFields":true},"typeVersion":3.4},{"id":"019b4248-b5ae-4a66-ba55-e05046e0f0bb","name":"Merge AI Analysis & File Name","type":"n8n-nodes-base.merge","position":[2320,1260],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3.1},{"id":"4988dbbb-b73b-409c-90cc-1902115ab760","name":"Create Endpoints Regex With AI","type":"@n8n/n8n-nodes-langchain.agent","position":[3280,1260],"parameters":{"text":"=Here is the file name: {{ $json.fileName }}\n\nHere is the report:\n~~~~\n{{ $json.choices[0].message.content }}\n~~~~","options":{"maxIterations":4,"systemMessage":"You are a helpful assistant. You will receive a report with a description of a hidden API. Your task is to generate a regex in a form of n8n expression. This regex should ONLY extract a clean endpoint URL, mentioned in the source file. Use tool to check the validity of the expression. \n\nSEARCH FOR THESE PATTERNS:\n1. /api/ endpoints: '/api/users', '/api/v1/data'\n2. Versioned paths: '/v1/', '/v2/', '/v3/', '/v9/'  \n3. Combined: '/api/v1/', '/api/v2/', '/api/v9/'\n4. Dynamic construction: '/api/' + version + '/users'\n5. Template literals: `/api/v${version}/data`\n6. Object properties: endpoints.v1.users, api.v2.messages\n\nHere is a regex which extracts endpoints from all report files. Use it as an example:\n\n{{ [...$json.data.replace(/\\\\u002[Ff]/g, '/').matchAll(/(?:[\"'`])((?:https?:\\/\\/[^\\/\\s\"'`]+)?\\/[^\\s\"'`]*?)(?:[\"'`])/g)].map(m => m[1].split('?')[0].replace(/\\/\\*+$/, '')).filter(url => url.includes('/') && url.length > 2 && !url.match(/\\.(js|css|png|jpg|gif|svg|ico)$/i)) }}\n\nGenerate expressions for ALL report files. "},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"e976ce33-d4e7-48a7-9879-1679526cb9f3","name":"Regex Generation LLM","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[3160,1560],"parameters":{"model":"anthropic/claude-3.7-sonnet","options":{"timeout":3600000,"temperature":0.2}},"credentials":{"openRouterApi":{"id":"r1DY63sclH2QsDBK","name":"OpenRouter account"}},"typeVersion":1},{"id":"7d8618d9-7b3f-473e-99e9-932c89a0cf8b","name":"Validate LLM Regex","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[3620,1480],"parameters":{"workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}","cachedResultName":"={{ $workflow.id }}"},"workflowInputs":{"value":{"Filename":"={{ $fromAI('Filename', `from the user prompt`, 'string') }}","query.n8nexpression":"={{ $fromAI('n8nexpression', `valid n8n expression with regex. example: \\{\\{ $json.data.match([PUT REGEX HERE])\\}\\}`, 'string') }}"},"schema":[{"id":"query.n8nexpression","type":"string","display":true,"removed":false,"required":false,"displayName":"query.n8nexpression","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Filename","type":"string","display":true,"removed":false,"required":false,"displayName":"Filename","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["query.n8nexpression"],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.2},{"id":"e794bc60-fef9-4c76-bb65-b8438eb80792","name":"Parse AI Regex Output","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[3480,1680],"parameters":{"schemaType":"manual","inputSchema":"{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"n8nexpression\": {\n\t\t\t\"type\": \"A valid regex to extract clean API endpoints. Example {{ $json.data.match([PUT REGEX HERE])}}\"\n\t\t}\n\t}\n}"},"typeVersion":1.2},{"id":"55aafb04-4cac-46d7-832e-91b99466f3c3","name":"Regex Validation Start","type":"n8n-nodes-base.executeWorkflowTrigger","position":[3140,2040],"parameters":{"workflowInputs":{"values":[{"name":"query.n8nexpression"},{"name":"Filename"}]}},"typeVersion":1.1},{"id":"e30b3def-09c1-42c8-afbb-c1e0421146fb","name":"Load Reference Endpoints","type":"n8n-nodes-base.readWriteFile","position":[3380,1940],"parameters":{"options":{},"fileSelector":"={{ $json.Filename }}"},"typeVersion":1},{"id":"5ebb63c2-8a99-47f8-8ea4-87ff2aff674b","name":"Extract Endpoints File Text","type":"n8n-nodes-base.extractFromFile","position":[3600,1940],"parameters":{"options":{},"operation":"text"},"typeVersion":1},{"id":"47e010ce-38f0-4235-966d-ad604d0c079b","name":"Merge Regex, File Name & Reference Endpoints","type":"n8n-nodes-base.merge","position":[3400,2160],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3.1},{"id":"dbb3f828-a4e0-44de-b712-f1e6b8593b9a","name":"Evaluate LLM Regex","type":"n8n-nodes-base.set","position":[3620,2160],"parameters":{"include":"except","options":{},"assignments":{"assignments":[{"id":"08f321e4-1012-48d8-ad6e-ed358cf36375","name":"Evaluation results","type":"string","value":"={{ $evaluateExpression($json['query.n8nexpression']) }}"}]},"excludeFields":"data","includeOtherFields":true},"typeVersion":3.4},{"id":"3fac22e4-4c2d-4f3e-b644-09ef9904cd26","name":"Merge Initial AI Analysis & AI Agent Output","type":"n8n-nodes-base.merge","position":[3740,1140],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3.1},{"id":"188a39a5-be2f-4646-9ff8-b35c676b909b","name":"Prepare Data for Regex Extraction","type":"n8n-nodes-base.set","position":[3940,1140],"parameters":{"include":"selected","options":{},"assignments":{"assignments":[{"id":"dc5f209e-87e7-465f-90b6-2ca2272bb7d1","name":"data","type":"string","value":"={{ $json.choices[0].message.content }}"},{"id":"232536f2-4081-43e8-8650-24d5d72a2187","name":"output.n8nexpression","type":"string","value":"={{ !!$json?.output?.n8nexpression ? $json?.output?.n8nexpression : \"\" }}"}]},"includeFields":"output, fileName, Source","includeOtherFields":true},"typeVersion":3.4},{"id":"1c8926aa-98da-4868-b917-19bca53520a0","name":"Execute LLM Regex","type":"n8n-nodes-base.set","position":[4120,1140],"parameters":{"include":"selected","options":{"ignoreConversionErrors":true},"assignments":{"assignments":[{"id":"d7f393c9-7c3c-4cd1-a6f4-d0fdb2ea4876","name":"Endpoints","type":"array","value":"={{ $evaluateExpression($json.output.n8nexpression) }}"},{"id":"fede8667-f874-4200-a3aa-0ce18cbc52ab","name":"LLM","type":"boolean","value":true}]},"includeFields":"fileName, Source","includeOtherFields":true},"typeVersion":3.4},{"id":"fc403a6d-8e59-448e-8d31-f576dfacf53f","name":"Split LLM-extracted Endpoints","type":"n8n-nodes-base.splitOut","position":[4300,1140],"parameters":{"include":"selectedOtherFields","options":{},"fieldToSplitOut":"Endpoints","fieldsToInclude":"LLM, fileName, Source"},"typeVersion":1},{"id":"fe9477cf-7c65-461f-b053-a89b329361e1","name":"Remove LLM Endpoints Duplicates","type":"n8n-nodes-base.removeDuplicates","position":[4500,1140],"parameters":{"options":{}},"typeVersion":2},{"id":"40a6dd8a-2955-40d9-845d-43035ec04364","name":"Merge Original And LLM Endpoints","type":"n8n-nodes-base.merge","position":[5000,1120],"parameters":{"mode":"combine","options":{},"joinMode":"keepEverything","fieldsToMatchString":"Endpoints, Source"},"typeVersion":3.1},{"id":"87919c16-e0c2-4c60-8e78-4aa9f23736fa","name":"Final Merge with Enriched File Name","type":"n8n-nodes-base.merge","position":[5200,1120],"parameters":{"mode":"combine","options":{"clashHandling":{"values":{"resolveClash":"preferLast","overrideEmpty":true}},"multipleMatches":"all"},"joinMode":"enrichInput1","fieldsToMatchString":"Source"},"typeVersion":3.1},{"id":"c6039111-8f99-40d3-9d84-56674b53e74f","name":"Sort Merged Endpoints","type":"n8n-nodes-base.sort","position":[5400,1120],"parameters":{"options":{},"sortFieldsUi":{"sortField":[{"fieldName":"fileName"},{"fieldName":"Endpoints"}]}},"typeVersion":1},{"id":"2fc96028-979c-4c52-85b1-fd4295e94354","name":"Reorder Output Fields","type":"n8n-nodes-base.set","position":[5580,1120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"2d87ee3f-59cd-440f-9ad1-81af1db079c5","name":"Endpoints","type":"string","value":"={{ $json.Endpoints }}"},{"id":"f6f00797-2d07-49f1-a2df-e044e82acd9a","name":"JS","type":"string","value":"={{ $json.JS }}"},{"id":"8a5acf2e-f362-4811-95b6-f876dfc6c9d2","name":"Source","type":"string","value":"={{ $json.Source }}"},{"id":"4bf6a24c-c61b-4085-b60c-b7c31a612604","name":"fileName","type":"string","value":"={{ $json.fileName }}"},{"id":"d8f566c0-8d5e-486b-bfb8-a2c36d2271da","name":"LLM","type":"string","value":"={{ $json.LLM }}"}]}},"typeVersion":3.4},{"id":"b44b2577-e937-43ea-bdd5-403070caa50e","name":"Export Comparison Results To Excel","type":"n8n-nodes-base.convertToFile","position":[5760,1120],"parameters":{"options":{"fileName":"api_comparison.xlsx","headerRow":true},"operation":"xlsx"},"typeVersion":1.1},{"id":"86dbcf40-3b36-48b7-94e6-ab5267c30ad9","name":"Prepare Source & File Name for Merge","type":"n8n-nodes-base.removeDuplicates","position":[5200,1280],"parameters":{"compare":"selectedFields","options":{"removeOtherFields":true},"fieldsToCompare":"Source, fileName"},"typeVersion":2},{"id":"0664e7ae-bcd9-4dde-93db-1572bfaa894e","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"color":5,"width":1540,"height":520,"content":"# The workflow helps to automatically find hidden API endpoints in web platforms that don't provide public APIs by analysing their JavaScript code.\n ## Modern web applications often use internal API endpoints for frontend-backend communication but don't provide them as documented public APIs. These endpoints are often embedded in JavaScript files and can be extracted for different use cases. When none or few relevant endpoints can be identified, we can still understand the site architecture, routing patterns and internal organisation. \n\n"},"typeVersion":1},{"id":"1cffa311-ac2c-4746-aa2c-0c5194776861","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[20,760],"parameters":{"width":760,"height":140,"content":"## Regex extracts all URL-like strings with API-focused filtering\n* Scans the code of each JS file for quoted URL strings\n* Captures relative, absolute URLs & internal routes\n* **Excludes:** static files (.js, .css, .png, .jpg, etc.), short strings (< 3 characters), non-path strings (without '/')\n* Cleans URLs (removes query parameters, slashes)"},"typeVersion":1},{"id":"ceaec55d-5626-4724-b4ec-d5738ad23b57","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[20,220],"parameters":{"width":760,"height":140,"content":"## The workflow is best suited for:\n* Knockout.js & Next.js/Nuxt.js applications with embedded API calls \n* SPA platforms that use fetch/axios to communicate with the backend\n* Modern web apps with bundled JavaScript containing endpoint strings\n* Platforms that using standard patterns (/api/, /v*, internal routes, etc.)"},"typeVersion":1},{"id":"5dc66bb7-3645-4959-a52e-73658f5fa09e","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[780,220],"parameters":{"width":740,"height":140,"content":"## The workflow may not be suited for:\n* Dynamically generated endpoints (runtime build)\n* WebSocket only communication without REST endpoints\n* Fully obfuscated code\n* Server-side only architecture with no client-side API calls "},"typeVersion":1},{"id":"8ad235ab-fdb5-4eee-bc5e-b0be081244ef","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[500,380],"parameters":{"color":3,"width":580,"height":120,"content":"## Requirements:\n* The target platform must embed API endpoints in JS as string literals \n* JS files must be accessible and not heavily obfuscated\n* The platform must use standard endpoint patterns (/api/, versioned paths, etc.)"},"typeVersion":1},{"id":"05119e49-411f-440a-9765-4ec8e229e8b2","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[2140,140],"parameters":{"width":1540,"height":800,"content":"# 2. AI-supported API Endpoints Extraction  \n\n"},"typeVersion":1},{"id":"7896a8f2-2914-432c-ac04-856f1555d569","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[2160,460],"parameters":{"color":5,"width":700,"content":"## Stage 2. LLM Regex Generation\n* Feed the analysis results from the 1st LLM to the 2nd LLM via the **Tools Agent**.\n* By default, **Claude 3.7 Sonnet** is used to generate regex.\n* The LLM creates custom regexes based on the analysis of each AI JS file using the Agent's system prompt.  "},"typeVersion":1},{"id":"7b1d73c9-c7e1-4b75-8f1e-a08fcd76a577","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[2160,640],"parameters":{"color":4,"width":700,"height":260,"content":"## Stage 3. LLM Regex Validation \n* The **Agent** calls the **Validation tool** which checks the LLM regex accuracy. \n* The **Validation tool** calls a sub-workflow to test the LLM regex against the reference endpoint files prepared by the 1st LLM.\n* The **Validation tool** extracts the endpoints from the reference file using the LLM regex and sends the evaluation results back to the **Agent**.\n* The **Agent** compares the LLM regex evaluation results with the incoming data from the 1st LLM. \n* If the results do not match, the LLM creates a new regex and the Agent repeats the validation process.  \n* The **Agent** can iterate up to 4 times till it finds the optimal regex. "},"typeVersion":1},{"id":"571233f3-0e25-455b-b7e6-3498721ef6d3","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[2160,240],"parameters":{"color":6,"width":700,"height":200,"content":"## Stage 1. Initial AI Analysis\n* Send JS file content to **LLM** via the **OpenRouter API**.\n* LLM performs a comprehensive JS code analysis for each kept file to identify API endpoints with detailed descriptions, HTTP methods and query parameters. The default LLM is **Gemini 2.5 Pro-Preview**. You can specify a different model available through the OpenRouter API in the JSON body of the **HTTP Request node**.\n* **Loop Over Items** node saves the analysis result on the n8n instance drive one by one. This is necessary for the subsequent step when the **AI agent** validates the regex using the **Tool** node.\n"},"typeVersion":1},{"id":"ea7dd713-a97d-4a29-86d6-885a3c24a5cf","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","position":[3060,240],"parameters":{"color":3,"width":520,"height":180,"content":"## Warning!\n* The **Agent** does not generate regex in 100% of situations. Sometimes it gives the message **‘The Agent stopped due to max iterations’** or creates a regex which does not retrieve the relevant endpoints. \n* For these situations, we have the results of a fixed predefined regex and a detailed description of each API endpoint found by the 1st LLM.   "},"typeVersion":1},{"id":"98bc1708-1617-4104-a66b-dadfec2dc384","name":"Sticky Note13","type":"n8n-nodes-base.stickyNote","position":[2900,740],"parameters":{"color":6,"width":760,"content":"## Stage 4. LLM Regex Execution\n* After the **Agent** node, merge the results of the 1st LLM and the **Agent** output. \n* Execute a final LLM regex on the output of the 1st LLM similar to how the **Validation tool** did it.\n* Remove duplicates and clean up extracted endpoints."},"typeVersion":1},{"id":"99853c4d-20d0-4465-ad6a-c97d1b83cb1e","name":"Sticky Note12","type":"n8n-nodes-base.stickyNote","position":[5000,760],"parameters":{"color":3,"width":860,"height":200,"content":"# Final comparison \n* Combine endpoints from both extraction approaches (predefined regex + LLM extraction).\n* Add filename references to the combined result.\n* Sort and organise results for side-by-side comparison.\n* Export merged comparison results to .xlsx."},"typeVersion":1},{"id":"1f0f991f-a180-4cc6-8ac7-bb7f16f6b755","name":"Sticky Note15","type":"n8n-nodes-base.stickyNote","position":[0,1160],"parameters":{"color":3,"width":1540,"height":500,"content":"\n\n\n\n\n\n\n* https://www.sofaconcerts.org (**Knockout.js framework**). A music booking platform and starting point for this workflow. The **Google AI Studio** model helped define **most relevant endpoints** for automating booking communication between the platform and Slack: login, cookie session extension, fetching full event details, event ID and full dialog history endpoints. One endpoint for sending messages back to the platform as well as a detailed request format had to be explored using the **Network Tab in the Dev Tools** console.\n\n* https://bandcamp.com (**Knockout.js framework**). Found **20+ API endpoints**, some working without authentication, e.g. https://bandcamp.com/api/salesfeed/1/get_initial. **Warning:** in this example, due to inconsistent model results, had to manually upload LLM analysis results before sending them to the **Agent**. \n\n* https://www.otto.de (backend is written in **Rust**, frontend is likely custom). Discovered **search autocomplete API endpoint** that allows exploration of product categories and specific items sold on the platform. \n\n* https://www.airbnb.com (complex **React**-based architecture). Found over **500** URL strings with dozens of potential API endpoints. The workflow makes it much faster to understand the sophisticated structure of the platform by analyzing the code of JS files.   \n\n* https://www.jameda.de (**FOSJsRoutingBundle in Symfony**). Found several **ajax endpoints** for general information on specific doctors and their available time slots, e.g. https://www.jameda.de/ajax/doctor/slots-from-nearest-day/392937. To learn how to make requests, review the JS file + page source code for the required ID values. E.g. 327423 in the example URL is the code for a specific doctor.\n\n* https://www.espn.co.uk (**jQuery/Bootstrap** with **Node.js** components). Identified over **300** URL strings, some matching API endpoints listed on **GitHub:** https://gist.github.com/akeaswaran/b48b02f1c94f873c6655e7129910fc3b. LLM analysis revealed several fan API endpoints. "},"typeVersion":1},{"id":"ff90a549-958d-4596-b9d1-c08ccb5ddefa","name":"Sticky Note14","type":"n8n-nodes-base.stickyNote","position":[0,1160],"parameters":{"height":80,"content":"# Examples: "},"typeVersion":1},{"id":"6e821dac-803f-4ca6-9100-8cd5e42e97f3","name":"Insufficient Endpoints","type":"n8n-nodes-base.noOp","position":[1640,800],"parameters":{},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"89d2f3db-d155-489b-bcf0-459a75fc4feb","connections":{"Configuration":{"main":[[{"node":"Fetch Website HTML","type":"main","index":0}]]},"Split Endpoints":{"main":[[{"node":"Remove Duplicates","type":"main","index":0}]]},"Fetch JS Content":{"main":[[{"node":"Extract API Endpoints","type":"main","index":0}]]},"Execute LLM Regex":{"main":[[{"node":"Split LLM-extracted Endpoints","type":"main","index":0}]]},"Format AI Results":{"main":[[{"node":"Prepare Endpoints File(s)","type":"main","index":0}]]},"Remove Duplicates":{"main":[[{"node":"Merge Original And LLM Endpoints","type":"main","index":0}]]},"Fetch Website HTML":{"main":[[{"node":"Extract URLs of JS files","type":"main","index":0}]]},"Validate LLM Regex":{"ai_tool":[[{"node":"Create Endpoints Regex With AI","type":"ai_tool","index":0}]]},"Add Source Metadata":{"main":[[{"node":"Process Each Analyzed File","type":"main","index":0},{"node":"Merge AI Analysis & File Name","type":"main","index":1}]]},"Start API Discovery":{"main":[[{"node":"Configuration","type":"main","index":0}]]},"Regex Generation LLM":{"ai_languageModel":[[{"node":"Create Endpoints Regex With AI","type":"ai_languageModel","index":0},{"node":"Auto-fixing Output Parser","type":"ai_languageModel","index":0}]]},"AI Endpoints Analysis":{"main":[[{"node":"Add Source Metadata","type":"main","index":0}]]},"Check Endpoints Count":{"main":[[{"node":"Split Endpoints","type":"main","index":0},{"node":"Reference for Source Metadata","type":"main","index":0}],[{"node":"Insufficient Endpoints","type":"main","index":0}]]},"Extract API Endpoints":{"main":[[{"node":"Check Endpoints Count","type":"main","index":0}]]},"Parse AI Regex Output":{"ai_outputParser":[[{"node":"Auto-fixing Output Parser","type":"ai_outputParser","index":0}]]},"Reorder Output Fields":{"main":[[{"node":"Export Comparison Results To Excel","type":"main","index":0}]]},"Sort Merged Endpoints":{"main":[[{"node":"Reorder Output Fields","type":"main","index":0}]]},"Keep Relevant JS Files":{"main":[[{"node":"Fetch JS Content","type":"main","index":0}]]},"Regex Validation Start":{"main":[[{"node":"Load Reference Endpoints","type":"main","index":0},{"node":"Merge Regex, File Name & Reference Endpoints","type":"main","index":1}]]},"Save Endpoints File(s)":{"main":[[{"node":"Process Each Analyzed File","type":"main","index":0}]]},"Split URLs of JS files":{"main":[[{"node":"Keep Relevant JS Files","type":"main","index":0}]]},"Extract URLs of JS files":{"main":[[{"node":"Split URLs of JS files","type":"main","index":0}]]},"Load Reference Endpoints":{"main":[[{"node":"Extract Endpoints File Text","type":"main","index":0}]]},"Auto-fixing Output Parser":{"ai_outputParser":[[{"node":"Create Endpoints Regex With AI","type":"ai_outputParser","index":0}]]},"Pass File Name, No Binary":{"main":[[{"node":"Merge AI Analysis & File Name","type":"main","index":0}]]},"Prepare Endpoints File(s)":{"main":[[{"node":"Save Endpoints File(s)","type":"main","index":0}]]},"Process Each Analyzed File":{"main":[[{"node":"Pass File Name, No Binary","type":"main","index":0}],[{"node":"Format AI Results","type":"main","index":0}]]},"Extract Endpoints File Text":{"main":[[{"node":"Merge Regex, File Name & Reference Endpoints","type":"main","index":0}]]},"Merge AI Analysis & File Name":{"main":[[{"node":"Merge Initial AI Analysis & AI Agent Output","type":"main","index":0},{"node":"Create Endpoints Regex With AI","type":"main","index":0}]]},"Reference for Source Metadata":{"main":[[{"node":"AI Endpoints Analysis","type":"main","index":0}]]},"Split LLM-extracted Endpoints":{"main":[[{"node":"Remove LLM Endpoints Duplicates","type":"main","index":0}]]},"Create Endpoints Regex With AI":{"main":[[{"node":"Merge Initial AI Analysis & AI Agent Output","type":"main","index":1}]]},"Remove LLM Endpoints Duplicates":{"main":[[{"node":"Merge Original And LLM Endpoints","type":"main","index":1},{"node":"Prepare Source & File Name for Merge","type":"main","index":0}]]},"Merge Original And LLM Endpoints":{"main":[[{"node":"Final Merge with Enriched File Name","type":"main","index":0}]]},"Prepare Data for Regex Extraction":{"main":[[{"node":"Execute LLM Regex","type":"main","index":0}]]},"Final Merge with Enriched File Name":{"main":[[{"node":"Sort Merged Endpoints","type":"main","index":0}]]},"Prepare Source & File Name for Merge":{"main":[[{"node":"Final Merge with Enriched File Name","type":"main","index":1}]]},"Merge Initial AI Analysis & AI Agent Output":{"main":[[{"node":"Prepare Data for Regex Extraction","type":"main","index":0}]]},"Merge Regex, File Name & Reference Endpoints":{"main":[[{"node":"Evaluate LLM Regex","type":"main","index":0}]]}}}


name: Generate Videos with AI, ElevenLabs,PIAPI Shotstack/Creatomate & Post to Youtube
author_name: Immanuel
author_username: spectrabit
categories: []
created_at: 2025-06-03T21:27:45.642Z
updated_at: 2025-06-03T21:27:45.642Z
url: https://n8n.io/workflows/4630
scraped_at: 2025-06-19 22:48:45
description:
  Auto-Generate Long Videos with AI, ElevenLabs,PIAPI,Shotstack/Creatomate & Post to Youtube

  Overview
  This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform integrations (Airtable, Google Sheets, YouTube) to streamline the process.  
  Target Audience
  Content creators, video producers, and YouTubers** seeking to automate video content creation.
  Digital marketing teams** managing video campaigns for travel or history niches.
  Users familiar with n8n, Airtable, Google Sheets, YouTube, and API integrations**.

  Problem Solved
  Manually managing YouTube video production, from ideation to posting, is time-consuming and prone to errors. This workflow addresses:
  Content Sourcing**: Generates video ideas using AI based on "domain of choice".
  Content Formatting**: Automatically creates detailed scripts and scene structures.
  Visual Production**: Produces high-quality images and renders videos with minimal manual input.
  Multi-Platform Integration**: Publishes to YouTube with status tracking in Airtable and Google Sheets.
  Status Tracking**: Monitors progress (Generated, Scripted, Produced, Published) across platforms.
  Prerequisites
  Before setting up, ensure you have:
  An n8n instance (self-hosted or cloud)
  API credentials for:
     OpenAI (for idea generation)
     PIAPI.ai (for image and video generation)
     ElevenLabs (for audio generation)
     Shotstack (for video rendering)
     Creatomate (for video rendering)
     Airtable & Google Sheets and Drive (for storage and tracking)
     Gmail (for notifications)
     YouTube API (for posting to YouTube)

  How the Automation Works (Step by Step)
  Trigger (Schedule Trigger)  
     Initiates the workflow daily 
     Connects to "Generate Idea"

  Generate Idea  
     Uses OpenAI to create a unique 4-minute video idea with a title, description, keywords, scene structure, and intrigue note
     Checks Airtable "Ideas" table via searchAirtable to avoid duplicates
     Connects to "Parse Ideas"

  Parse Ideas  
     Extracts title, description, and notes from the OpenAI output using JavaScript
     Connects to "Add Ideas"

  Add Ideas  
     Stores the initial idea in Google Sheets "Ideas" sheet with fields like "Idea", "Description", and "Progress" (set to "Generated")
     Connects to "Store in Airtable"

  Store in Airtable  
     Saves the idea to Airtable "Ideas" table with mapped fields and typecast enabled
     Connects to "Generate Script"

  Generate Script  
     Creates a 500-600 word script with 8-10 scenes using OpenAI, based on the latest "Generated" idea
     Uses Structured Output Parser to format output
     Connects to "Parse Script Output"

  Parse Script Output  
     Formats the script into readable text and JSON, extracting scenes and closing question
     Connects to "Store Script"

  Store Script  
     Saves the script to Google Sheets "Production" sheet with "Script", "Scenes", and "Status" (set to "Scripted")
     Connects to "Store Script in Airtable"

  Store Script in Airtable  
     Saves the script to Airtable "Production" table with mapped fields and typecast enabled
     Connects to "Updated Idea to Scripted"

  Updated Idea to Scripted  
      Updates the idea status to "Scripted" in Google Sheets "Ideas" sheet
      Connects to "Update Status Ideas Table"

  Update Status Ideas Table  
      Updates the idea status to "Scripted" in Airtable "Ideas" table, matching by "Idea ID"
      Connects to "Extract Scenes"

  Extract Scenes  
      Parses scene data from Airtable "Production" table for image generation
      Connects to "Text-to-Image"

  Text-to-Image  
      Generates images for each scene using PIAPI
      Connects to "Wait for 4 Min"

  Wait for 4 Min  
      Waits 3 minutes to allow image generation to complete
      Connects to  "Get Images" 

  Trigger (Schedule Trigger1)  
      Initiates the posting process daily 
      Connects to "Search for Latest Ready Video"

  Search for Latest Ready Video  
      Searches Airtable "Production" table for the latest video with "Status" = "Ready"
      Connects to "If Ready?"

  If Ready?  
      Checks if a video is ready (condition: Status contains Ready)
      If true, connects to "Download Video" and "Update Production Table"

  Download Video  
      Downloads the video file using the VideoURL from Airtable
      Connects to "Post YouTube"

  Post YouTube  
      Uploads the video to YouTube with title and description, using YouTube OAuth2
  Update Production Table  
      Updates the "Production" sheet in Google Sheets, setting "Status" to "Published" and matching by "Production ID"
  Additional Nodes and Processes
  OpenAI Chat Model**: Powers "Generate Idea" and "Generate Script" with GPT
  Structured Output Parser**: Ensures proper JSON output for scripts
  Get Images**: Retrieves generated images 
  Extract Narration**: Prepares narration for voice generation
  Voice Generation**: Generates voiceovers 
  Generate Music Prompt**: Creates music prompts using OpenAI
  Text-to-Music**: Generates music 
  Build Shotstack Timeline**: Constructs video timeline 
  ShotStack Render Video**: Renders the final video 
  Poll Rendered Videos**: Checks video rendering status 
  Final Video**: Updates Airtable "Production" with final video details
  Final Video Update**: Updates Google Sheets "Production" with video URL
  Music Urls**: Adds music URLs to the process 

  Setup Requirements
  Before starting, ensure you have the following

  1  n8n Instance
     A self-hosted or cloud-based n8n instance to run the workflow
     
  2  API Credentials
     OpenAI: API key 
     Airtable: Personal Access Token (e.g, "Airtable Personal Access Token 
     Google Sheets: OAuth2 credentials 
     PIAPI: HTTP Header Auth key 
     YouTube: OAuth2 credentials
  3  Airtable Configuration
     Base: "Youtube Videos" 
     Tables:
       "Ideas"  
       "Production" 
     Share with the Airtable token

  4  Google Sheets Configuration
     Document: "Youtube Videos" 
     Sheets:
       "Ideas" 
       "Production" 
     Share with the Google Sheets credential email

  Shotstack Configuration (Assumed)
     API key and endpoint for video rendering (not specified in JSON)

  Setup Instructions
  Import the Workflow
     Import the provided JSON file into your n8n instance

  Configure Credentials
     Add OpenAI, Airtable, Google Sheets, PIAPI, and YouTube credentials in n8n’s credential manager

  Set Up Airtable
     Create or update the "Ideas" and "Production" tables with the specified fields
     Ensure proper permissions with the Airtable token

  Configure Google Sheets
     Create or update the "Ideas" and "Production" sheets with the specified columns
     Share the document with the Google Sheets credential email

  Schedule Triggers
     Set "Schedule Trigger" to trigger

  Test the Workflow
     Run manually to verify each node’s functionality
     Check Airtable, Google Sheets, and YouTube for updates
     Ensure PIAPI image generation completes (wait 4 minutes)

  Monitor and Adjust
     Monitor API rate limits (e.g, PIAPI, YouTube)
     Adjust wait times if image or video generation delays occur
     Verify connections for unlinked nodes 

  Benefits
  Efficiency**: Automates the entire process from idea to posting
  Scalability**: Handles daily video production
  Quality**: Ensures cinematic scripts and visuals
  Tracking**: Provides detailed progress monitoring

  Notes
  Rate Limits**: Be aware of PIAPI (150,000 units per task) and YouTube API limits
  Timing**: Adjust wait nodes (e.g, "Wait for 4 Min") based on API response times

  Conclusion and Suggestions to Improve the Automation

  Conclusion
  This workflow streamlines YouTube video production, making it ideal for busy content creators, video producers, and marketing teams. Customize it by adding more platforms, adjusting wait delays for image/video generation, or enhancing notifications for status updates. Share your feedback in the n8n community to help others benefit from this automation.

  Suggestions to Improve

  Customization**: Adjust prompts, timings, and API parameters based on your needs
  Expand "Text-to-Music**" with multiple music styles or integrate a royalty-free music API for variety.
  Improve Video Rendering**: Optimize "Build Shotstack Timeline" and "ShotStack Render Video" with predefined templates to reduce rendering time.
  Add Analytics Tracking**: Include a node to fetch YouTube Analytics post-upload for performance monitoring.
  Error Handling**: Add error-catching nodes (e.g., "If" nodes) to retry failed image or video generations.
  Notification System**: Incorporate email or Slack notifications for key milestones (e.g., script completion, video upload).

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

workflow_json:
  {"meta":{"instanceId":"3aaeb6eaba3494bbdbe57e25fa3d02783cfbc460b1e823f7b741cf26edc7ca3d","templateCredsSetupCompleted":true},"nodes":[{"id":"36a44f23-80ce-49d2-a7c6-112c76db393c","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[3060,-480],"parameters":{},"typeVersion":1},{"id":"e20f7123-a3e9-4dbc-9668-707c017811da","name":"Parse Ideas","type":"n8n-nodes-base.code","position":[3620,-480],"parameters":{},"typeVersion":1,"alwaysOutputData":true},{"id":"694638ee-7fbd-42d4-b1c5-317c7880215a","name":"Generate Script","type":"@n8n/n8n-nodes-langchain.agent","position":[4180,-480],"parameters":{},"typeVersion":1.9},{"id":"b4b694c0-8267-4b39-92d1-2d83cdc27ee7","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[4180,-260],"parameters":{},"typeVersion":1.2},{"id":"eb1f7370-004d-4e7e-ba68-9108f4307426","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[3260,-280],"parameters":{},"typeVersion":1.2},{"id":"34eda2c1-42e9-458d-af0c-d00d2d8fe15a","name":"searchAirtable","type":"n8n-nodes-base.airtableTool","position":[3440,-280],"parameters":{},"typeVersion":2.1},{"id":"80747c80-0854-45c5-9eef-0c61f5bfc424","name":"Add Ideas","type":"n8n-nodes-base.googleSheets","position":[3820,-480],"parameters":{},"executeOnce":true,"typeVersion":4.5,"alwaysOutputData":true},{"id":"24615a9e-6195-4ba4-b76a-c148424b9fb3","name":"Generate Idea","type":"@n8n/n8n-nodes-langchain.agent","position":[3260,-480],"parameters":{},"typeVersion":1.9},{"id":"13f0ec76-27f5-4248-89d6-f0f0755b1335","name":"Store in Airtable","type":"n8n-nodes-base.airtable","position":[4000,-480],"parameters":{},"typeVersion":2.1},{"id":"79a425fd-8663-4952-a848-6d0254441afe","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[4360,-260],"parameters":{},"typeVersion":1.2},{"id":"883c9c55-ed99-4442-b848-9c579114fd3c","name":"Store Script","type":"n8n-nodes-base.googleSheets","position":[3220,160],"parameters":{},"typeVersion":4.5},{"id":"89fffcc9-451e-4875-b673-9b82dfd81105","name":"Store Script in Airtable","type":"n8n-nodes-base.airtable","position":[3380,80],"parameters":{},"typeVersion":2.1},{"id":"fbbb5dc9-9d4b-40d3-b616-ef8908be8939","name":"Parse Script Output","type":"n8n-nodes-base.code","position":[3060,160],"parameters":{},"typeVersion":2},{"id":"cc0c5220-1f86-4814-9e95-064059f5d496","name":"Update Status Ideas Table","type":"n8n-nodes-base.airtable","position":[3700,160],"parameters":{},"typeVersion":2.1},{"id":"21953a80-2661-43f0-abfd-412c7077c8a8","name":"Updated Idea to Scripted","type":"n8n-nodes-base.googleSheets","position":[3520,160],"parameters":{},"typeVersion":4.5},{"id":"e25d7a2b-b0db-4f91-8cb8-09231b903e73","name":"Extract Scenes","type":"n8n-nodes-base.code","position":[3860,160],"parameters":{},"typeVersion":2},{"id":"0d814668-3de2-4f7b-9dba-1ca1b4d68a18","name":"Text-to-Image","type":"n8n-nodes-base.httpRequest","position":[4540,-20],"parameters":{},"typeVersion":4.2},{"id":"0b37c05b-3726-4ceb-8f26-1106ce415106","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[3000,-640],"parameters":{"content":""},"typeVersion":1},{"id":"fa946cdf-51b1-4db1-8113-cfae49305a88","name":"Wait for 4 Min","type":"n8n-nodes-base.wait","position":[4700,-20],"webhookId":"2319783c-b9b5-4771-b6c7-1c4f85c5e364","parameters":{},"typeVersion":1.1},{"id":"ce6fd36d-d2f1-4714-a269-c33536f5f603","name":"Store Image Urls in Airtable","type":"n8n-nodes-base.airtable","position":[5540,-80],"parameters":{},"typeVersion":2.1},{"id":"0f12f103-e31d-49bd-b320-107261c3c87a","name":"Get Images","type":"n8n-nodes-base.httpRequest","position":[4860,-20],"parameters":{},"typeVersion":4.2},{"id":"5df31e39-af23-48c5-b060-856741466e11","name":"Get ImageUrls","type":"n8n-nodes-base.code","position":[4580,260],"parameters":{},"typeVersion":2},{"id":"46c95791-9d90-4c47-9041-26f19617b6f7","name":"Scene Image Urls","type":"n8n-nodes-base.code","position":[4740,260],"parameters":{},"typeVersion":2},{"id":"7d15f8a4-38cc-4201-a761-5b6a2a8c448d","name":"Extract Narration","type":"n8n-nodes-base.code","position":[5720,-20],"parameters":{},"typeVersion":2},{"id":"b1d59040-d4ca-49c9-b318-88a724d96922","name":"Voice Generation","type":"n8n-nodes-base.httpRequest","position":[5860,-20],"parameters":{},"typeVersion":4.2},{"id":"486f0401-afc3-4aa8-91bb-d21c7516fade","name":"Store Sound","type":"n8n-nodes-base.googleDrive","position":[6220,-20],"parameters":{},"typeVersion":3},{"id":"2ca32e3e-527c-4fdf-9fcf-fe231a9198ea","name":"Wait 2 Min","type":"n8n-nodes-base.wait","position":[6040,-20],"webhookId":"2fc60693-37f5-445c-ac74-69070cf1349b","parameters":{},"typeVersion":1.1},{"id":"c533403f-3bec-4ddd-a8b7-5d2b803348ae","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[3000,-20],"parameters":{"content":""},"typeVersion":1},{"id":"e5786afb-3ead-4594-8dc5-9753c72327c7","name":"Store Voice Urls","type":"n8n-nodes-base.airtable","position":[5680,-200],"parameters":{},"typeVersion":2.1},{"id":"28c841dc-efae-4923-97e0-4a871b39fd49","name":"Aggregating Voice Urls","type":"n8n-nodes-base.code","position":[5340,-200],"parameters":{},"typeVersion":2},{"id":"29447c31-b2a8-4717-baee-4b6f97009136","name":"Update VoiceUrls","type":"n8n-nodes-base.googleSheets","position":[5520,-200],"parameters":{},"typeVersion":4.5},{"id":"b7149459-bcc5-4ecc-87cc-302a3f2a1720","name":"Update ImageUrls","type":"n8n-nodes-base.googleSheets","position":[5340,-20],"parameters":{},"typeVersion":4.5,"alwaysOutputData":true},{"id":"19e68b62-90cf-408f-939d-ddb8f3d4a842","name":"Prepare Video Assets","type":"n8n-nodes-base.code","position":[5360,260],"parameters":{},"typeVersion":2,"alwaysOutputData":true},{"id":"21363e02-dd5f-4516-af4c-135c27f9413b","name":"Wait 5 Min","type":"n8n-nodes-base.wait","position":[5920,260],"webhookId":"e34850a6-fc5c-475b-97e8-3a68064ecd4f","parameters":{},"typeVersion":1.1},{"id":"36cee79d-3b8b-44de-ba42-1b47691d2b0e","name":"Allow Access","type":"n8n-nodes-base.googleDrive","position":[6420,-20],"parameters":{},"typeVersion":3},{"id":"d959cc31-f4ec-4592-b59e-23c7b9768e7f","name":"ShotStack Render Video","type":"n8n-nodes-base.httpRequest","position":[5760,260],"parameters":{},"typeVersion":4.2},{"id":"321debb6-6bb1-42cb-ba39-e72868c04426","name":"Build Shotstack Timeline","type":"n8n-nodes-base.code","position":[5560,260],"parameters":{},"typeVersion":2},{"id":"862b6946-b890-44a6-97df-71e60ccf159d","name":"Download video","type":"n8n-nodes-base.httpRequest","position":[6580,260],"parameters":{},"typeVersion":4.2},{"id":"44d57140-f19c-45fc-a249-1f6f84a8864a","name":"Store video","type":"n8n-nodes-base.googleDrive","position":[6740,260],"parameters":{},"typeVersion":3},{"id":"cc2566b3-c9d2-4d34-8717-e6cdfaede637","name":"Limit","type":"n8n-nodes-base.limit","position":[3060,500],"parameters":{},"typeVersion":1},{"id":"c5086e3a-7df0-423a-bc51-560b22852fc3","name":"2 Min Wait","type":"n8n-nodes-base.wait","position":[3540,500],"webhookId":"50f8e100-8e26-4f5a-967e-a55caee1273b","parameters":{},"typeVersion":1.1},{"id":"77cb8c16-3b67-4a5f-b2d3-f16c68c2481a","name":"Generate Music Prompt","type":"@n8n/n8n-nodes-langchain.agent","position":[4040,160],"parameters":{},"typeVersion":1.9},{"id":"58c14cf6-f78f-418b-be91-2c238a81b85b","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[4000,340],"parameters":{},"typeVersion":1.2},{"id":"b8c66a9f-162b-42ba-8c40-edcdb3087ac6","name":"MusicPrompt","type":"n8n-nodes-base.set","position":[4360,160],"parameters":{},"typeVersion":3.4},{"id":"abb57b0a-9edf-4bf5-a213-cf2e1c9a6fc7","name":"Text toMusic","type":"n8n-nodes-base.httpRequest","position":[3380,500],"parameters":{},"typeVersion":4.2},{"id":"fc9a5fbf-572c-49f9-a7e4-f67cfa18640e","name":"Music Store","type":"n8n-nodes-base.googleDrive","position":[3720,500],"parameters":{},"typeVersion":3},{"id":"6b5b4ea7-24d5-448d-9a38-c013ae7d62b6","name":"Access to Anyone with Link","type":"n8n-nodes-base.googleDrive","position":[3920,500],"parameters":{},"typeVersion":3},{"id":"45aa327a-e4b8-4156-8360-e86115cb3192","name":"Store Music Urls","type":"n8n-nodes-base.airtable","position":[4360,580],"parameters":{},"typeVersion":2.1},{"id":"00d07c43-5802-4047-b96d-62b358d1c55d","name":"Add Aggregate Music URLs","type":"n8n-nodes-base.code","position":[4100,500],"parameters":{},"typeVersion":2},{"id":"21408eb7-b148-45ce-a8c7-786df3291cfa","name":"Parse Music Prompts","type":"n8n-nodes-base.code","position":[3220,500],"parameters":{},"typeVersion":2},{"id":"d5c04b27-dfd4-4bc7-bc69-5669a49820b4","name":"Merge","type":"n8n-nodes-base.merge","position":[5100,260],"parameters":{},"typeVersion":3.1},{"id":"21e70479-888b-4c23-9882-f00c7900d6b7","name":"Poll Rendered Videos","type":"n8n-nodes-base.httpRequest","position":[6060,260],"parameters":{},"typeVersion":4.2},{"id":"ed1b5fec-bc8c-4029-9dfc-bf39d75d9e68","name":"Final Video","type":"n8n-nodes-base.airtable","position":[6240,260],"parameters":{},"typeVersion":2.1},{"id":"888353b0-f6fe-46b3-8df8-4cc65cdd8f37","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[4540,-260],"parameters":{"content":""},"typeVersion":1},{"id":"e8f3db94-c36a-4a3c-aff6-6e4348a8cd2d","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[5280,-280],"parameters":{"content":""},"typeVersion":1},{"id":"b34f34f3-3375-416e-a2f6-c86c66db6739","name":"Wait for Render","type":"n8n-nodes-base.wait","position":[5700,1240],"webhookId":"ed710d73-6a8d-4e29-b338-70ba84bb6de2","parameters":{},"typeVersion":1.1},{"id":"3bce253b-047a-4160-b48f-55c185c2609f","name":"Get Final Video","type":"n8n-nodes-base.httpRequest","position":[5860,1240],"parameters":{},"typeVersion":4.2},{"id":"43ca990d-f654-4233-95a7-e504b3c22a3b","name":"Check Video Status","type":"n8n-nodes-base.switch","position":[6020,1240],"parameters":{},"typeVersion":3.2,"alwaysOutputData":true},{"id":"8e65d53d-46b3-4d5e-994a-60edc0f31950","name":"Video Creatomate","type":"n8n-nodes-base.httpRequest","position":[5500,1240],"parameters":{},"typeVersion":4.2},{"id":"a25b1aa1-9131-49bc-b83e-fadaead37b1f","name":"Prepare  Assets For Creatomate","type":"n8n-nodes-base.code","disabled":true,"position":[5480,1060],"parameters":{},"typeVersion":2,"alwaysOutputData":true},{"id":"ca23b9b7-7f23-474b-817d-112a5d1ae031","name":"List Elements","type":"n8n-nodes-base.code","position":[5640,1080],"parameters":{},"typeVersion":2},{"id":"60af65ac-36ef-4ae0-95cf-c66668853136","name":"Download Binary","type":"n8n-nodes-base.httpRequest","position":[6220,1220],"parameters":{},"typeVersion":4.2},{"id":"ee786362-5ca9-411e-9fa7-ff9dc1cffef1","name":"Final Creatomate Video","type":"n8n-nodes-base.googleDrive","position":[6400,1220],"parameters":{},"typeVersion":3},{"id":"07a72990-e402-4cdf-b52a-64268232234d","name":"Youtube Video Created","type":"n8n-nodes-base.gmail","position":[6580,1220],"webhookId":"b2f823fa-ff6b-4cf2-915e-0b9e66663233","parameters":{},"typeVersion":2.1},{"id":"5dec2e5f-4adc-4cee-97f4-b0b002ac52b4","name":"Failed Creation","type":"n8n-nodes-base.gmail","position":[6360,1360],"webhookId":"5bc7c656-a0d4-4abb-a0ab-15bbbd9fba0f","parameters":{},"typeVersion":2.1},{"id":"ce6a796b-cdf4-4793-9b5c-ce2640c5b80b","name":"Final Video Update","type":"n8n-nodes-base.googleSheets","position":[6420,260],"parameters":{},"typeVersion":4.5,"alwaysOutputData":true},{"id":"e3a0bbd1-13a5-45fe-bcb9-c2ffb392beb6","name":"Final Video Creatomate","type":"n8n-nodes-base.airtable","position":[6720,1220],"parameters":{},"typeVersion":2.1},{"id":"f52ff588-0829-4b90-8f9d-9b50dbdf5ad4","name":"Creatomate Final Video","type":"n8n-nodes-base.googleSheets","position":[6720,1400],"parameters":{},"typeVersion":4.5},{"id":"b40b9dde-88c6-440e-99a5-af4f2c6ad309","name":"Music Urls","type":"n8n-nodes-base.googleSheets","position":[4360,380],"parameters":{},"typeVersion":4.5},{"id":"3f1c339f-d66e-4e98-9330-b855896cbfc4","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[6920,-660],"parameters":{"content":""},"typeVersion":1},{"id":"3c15accd-d96b-4e2e-a7bf-8c28190ed117","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[6920,1120],"parameters":{"content":""},"typeVersion":1},{"id":"c3d05e27-93b5-46d4-8a0d-009bda573614","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[5280,960],"parameters":{"content":""},"typeVersion":1},{"id":"73cc5a0c-0828-43db-b740-4bf49165601f","name":"Download Video","type":"n8n-nodes-base.httpRequest","position":[5400,-420],"parameters":{},"typeVersion":4.2},{"id":"63073d8f-e210-4f69-b52e-ceba622fcb97","name":"Post YouTube","type":"n8n-nodes-base.youTube","position":[5580,-480],"parameters":{},"typeVersion":1},{"id":"403e2d54-83c5-4e2c-a0c4-e81857afa65f","name":"Search for Latest Ready Video","type":"n8n-nodes-base.airtable","position":[4920,-480],"parameters":{},"typeVersion":2.1},{"id":"c6e252df-4f94-4a3f-84e3-933df8968624","name":"Update Pepduction Table","type":"n8n-nodes-base.googleSheets","position":[5400,-620],"parameters":{},"typeVersion":4.5},{"id":"c60e3b97-7c27-4597-a36d-aded332fd23a","name":"If Ready?","type":"n8n-nodes-base.if","position":[5120,-480],"parameters":{},"typeVersion":1},{"id":"92513f0e-4b15-42a3-95e1-430cc3cbeefa","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[4520,-660],"parameters":{"content":""},"typeVersion":1},{"id":"7c730e10-35d9-41f1-959a-f95c87007ce4","name":"Schedule Trigger1","type":"n8n-nodes-base.scheduleTrigger","position":[4720,-480],"parameters":{},"typeVersion":1}],"pinData":{},"connections":{"Limit":{"main":[[{"node":"Parse Music Prompts","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Prepare Video Assets","type":"main","index":0}]]},"Add Ideas":{"main":[[{"node":"Store in Airtable","type":"main","index":0}]]},"If Ready?":{"main":[[{"node":"Download Video","type":"main","index":0},{"node":"Update Pepduction Table","type":"main","index":0}]]},"2 Min Wait":{"main":[[{"node":"Music Store","type":"main","index":0}]]},"Get Images":{"main":[[{"node":"Get ImageUrls","type":"main","index":0}]]},"Music Urls":{"main":[[{"node":"Text-to-Image","type":"main","index":0}]]},"Wait 2 Min":{"main":[[{"node":"Store Sound","type":"main","index":0}]]},"Wait 5 Min":{"main":[[{"node":"Poll Rendered Videos","type":"main","index":0}]]},"Final Video":{"main":[[{"node":"Final Video Update","type":"main","index":0}]]},"Music Store":{"main":[[{"node":"Access to Anyone with Link","type":"main","index":0},{"node":"Add Aggregate Music URLs","type":"main","index":0}]]},"MusicPrompt":{"main":[[{"node":"Limit","type":"main","index":0}]]},"Parse Ideas":{"main":[[{"node":"Add Ideas","type":"main","index":0}]]},"Store Sound":{"main":[[{"node":"Allow Access","type":"main","index":0},{"node":"Aggregating Voice Urls","type":"main","index":0}]]},"Allow Access":{"main":[[]]},"Store Script":{"main":[[{"node":"Store Script in Airtable","type":"main","index":0}]]},"Text toMusic":{"main":[[{"node":"2 Min Wait","type":"main","index":0}]]},"Generate Idea":{"main":[[{"node":"Parse Ideas","type":"main","index":0}]]},"Get ImageUrls":{"main":[[{"node":"Scene Image Urls","type":"main","index":0}]]},"List Elements":{"main":[[{"node":"Video Creatomate","type":"main","index":0}]]},"Text-to-Image":{"main":[[{"node":"Wait for 4 Min","type":"main","index":0}]]},"Download Video":{"main":[[{"node":"Post YouTube","type":"main","index":0}]]},"Download video":{"main":[[{"node":"Store video","type":"main","index":0}]]},"Extract Scenes":{"main":[[{"node":"Generate Music Prompt","type":"main","index":0},{"node":"Text-to-Image","type":"main","index":0}]]},"Wait for 4 Min":{"main":[[{"node":"Get Images","type":"main","index":0}]]},"searchAirtable":{"ai_tool":[[{"node":"Generate Idea","type":"ai_tool","index":0}]]},"Download Binary":{"main":[[{"node":"Final Creatomate Video","type":"main","index":0}]]},"Generate Script":{"main":[[{"node":"Parse Script Output","type":"main","index":0}]]},"Get Final Video":{"main":[[{"node":"Check Video Status","type":"main","index":0}]]},"Wait for Render":{"main":[[{"node":"Get Final Video","type":"main","index":0}]]},"Scene Image Urls":{"main":[[{"node":"Update ImageUrls","type":"main","index":0},{"node":"Merge","type":"main","index":1}]]},"Schedule Trigger":{"main":[[{"node":"Generate Idea","type":"main","index":0}]]},"Store Music Urls":{"main":[[{"node":"Music Urls","type":"main","index":0}]]},"Store Voice Urls":{"main":[[]]},"Update ImageUrls":{"main":[[{"node":"Store Image Urls in Airtable","type":"main","index":0},{"node":"Extract Narration","type":"main","index":0}]]},"Update VoiceUrls":{"main":[[{"node":"Store Voice Urls","type":"main","index":0}]]},"Video Creatomate":{"main":[[{"node":"Wait for Render","type":"main","index":0}]]},"Voice Generation":{"main":[[{"node":"Wait 2 Min","type":"main","index":0}]]},"Extract Narration":{"main":[[{"node":"Voice Generation","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Generate Idea","type":"ai_languageModel","index":0}]]},"Schedule Trigger1":{"main":[[{"node":"Search for Latest Ready Video","type":"main","index":0}]]},"Store in Airtable":{"main":[[{"node":"Generate Script","type":"main","index":0}]]},"Check Video Status":{"main":[[{"node":"Download Binary","type":"main","index":0}],[{"node":"Failed Creation","type":"main","index":0}],[{"node":"Wait for Render","type":"main","index":0}]]},"Final Video Update":{"main":[[{"node":"Download video","type":"main","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"Generate Script","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model2":{"ai_languageModel":[[{"node":"Generate Music Prompt","type":"ai_languageModel","index":0}]]},"Parse Music Prompts":{"main":[[{"node":"Text toMusic","type":"main","index":0}]]},"Parse Script Output":{"main":[[{"node":"Store Script","type":"main","index":0}]]},"Poll Rendered Videos":{"main":[[{"node":"Final Video","type":"main","index":0}]]},"Prepare Video Assets":{"main":[[{"node":"Build Shotstack Timeline","type":"main","index":0}]]},"Generate Music Prompt":{"main":[[{"node":"MusicPrompt","type":"main","index":0}]]},"Youtube Video Created":{"main":[[{"node":"Final Video Creatomate","type":"main","index":0}]]},"Aggregating Voice Urls":{"main":[[{"node":"Update VoiceUrls","type":"main","index":0},{"node":"Merge","type":"main","index":0}]]},"Final Creatomate Video":{"main":[[{"node":"Youtube Video Created","type":"main","index":0}]]},"Final Video Creatomate":{"main":[[{"node":"Creatomate Final Video","type":"main","index":0}]]},"ShotStack Render Video":{"main":[[{"node":"Wait 5 Min","type":"main","index":0}]]},"Add Aggregate Music URLs":{"main":[[{"node":"Store Music Urls","type":"main","index":0},{"node":"Merge","type":"main","index":2}]]},"Build Shotstack Timeline":{"main":[[{"node":"ShotStack Render Video","type":"main","index":0}]]},"Store Script in Airtable":{"main":[[{"node":"Updated Idea to Scripted","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Generate Script","type":"ai_outputParser","index":0}]]},"Updated Idea to Scripted":{"main":[[{"node":"Update Status Ideas Table","type":"main","index":0}]]},"Update Status Ideas Table":{"main":[[{"node":"Extract Scenes","type":"main","index":0}]]},"Access to Anyone with Link":{"main":[[]]},"Store Image Urls in Airtable":{"main":[[]]},"Search for Latest Ready Video":{"main":[[{"node":"If Ready?","type":"main","index":0}]]},"Prepare  Assets For Creatomate":{"main":[[{"node":"List Elements","type":"main","index":0}]]}}}


name: Auto-Generate LinkedIn Posts from Articles with Dumpling AI and GPT-4o
author_name: Yang
author_username: yang
categories: []
created_at: 2025-06-03T22:28:16.392Z
updated_at: 2025-06-03T22:28:16.392Z
url: https://n8n.io/workflows/4631
scraped_at: 2025-06-19 22:50:33
description:
  👤 Who is this for?

  This workflow is ideal for social media managers, personal brand strategists, ghostwriters, and founders who want to post regularly on LinkedIn without spending hours writing from scratch. It’s also useful for marketing agencies and assistants looking to automate consistent post creation using curated articles as source material.

  🧩 What problem does this workflow solve?

  Manually reading multiple articles, extracting key insights, and writing a clean, professional LinkedIn post is a time-consuming process. This workflow automates everything: from pulling topics, finding related articles, summarizing them using AI, and even generating a matching image to accompany the post. It ensures faster content turnaround, more consistency, and less manual effort.

  🔁 What this workflow does

  This workflow starts manually and retrieves one topic marked as “To do” from a Google Sheet. That topic is used as a search term for Dumpling AI’s search endpoint, which scrapes and returns the top three article contents related to the topic. These articles are sent to a LangChain agent powered by GPT-4o, which analyzes and summarizes the content into a LinkedIn post in a friendly, insightful tone. It also generates an image prompt for the post.

  After generating the post and image prompt, the data is extracted using a Set node. The prompt is sent to Dumpling AI’s image generation endpoint, which returns an image URL. Finally, the post text, image prompt, image URL, and status update (“created”) are saved back to the original row in Google Sheets.

  🛠️ Workflow Breakdown

  Manual Trigger – Starts the automation.
  Google Sheets (Get Topic) – Searches for the first row in your content pipeline sheet where the “status” is “To do”.
  HTTP Request (Dumpling AI Search) – Uses the topic as a search query to pull 3 article contents using Dumpling AI’s API.
  Set LangChain GPT Model – Defines GPT-4o as the LLM for the LangChain Agent.
  LangChain Agent (Summarize & Generate) – Summarizes all 3 articles and generates a LinkedIn post and a related image prompt.
  Set (Extract Data) – Extracts postText and imagePrompt from the LangChain agent output.
  HTTP Request (Dumpling Image Gen) – Sends imagePrompt to Dumpling AI’s image generation endpoint.
  Update Google Sheets – Writes the post, image prompt, and image URL back to the sheet and changes the row status to “created”.

  ⚙️ Setup Instructions

  Dumpling AI
     Sign up at Dumpling AI
     Get your API key and connect it in the HTTP Request nodes (Search and Image endpoints)
     Use the /search endpoint to retrieve article content
     Use the /generate-image endpoint to create the image

  Google Sheets
     Create a spreadsheet with columns: topic, status, postText, imagePrompt, imageURL
     Add sample topics and set their status to To do

  LangChain (GPT-4o)
     Connect your OpenAI credentials to n8n
     Make sure GPT-4o is available in your OpenAI account
     Use the LangChain node to process multi-input summarization and generate a social media caption

  Customize the Prompt (Optional)
     Adjust the Set node to tweak the input format sent to the LangChain agent
     Add constraints like tone, hashtags, or emojis to fit your brand style

  🧠 How to Customize This Workflow

  Change the content source (RSS feed, Notion DB, etc.) instead of Google Sheets
  Add a scheduler node to run this automatically every morning or weekly
  Use Airtable instead of Google Sheets for more control and filtering
  Send the final post to LinkedIn using the Buffer or LinkedIn API
  Add a Telegram or Slack notification when new content is ready for approval

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

workflow_json:
  {"id":"1Y5FzMEqaYHEsXxR","meta":{"instanceId":"a1ae5c8dc6c65e674f9c3947d083abcc749ef2546dff9f4ff01de4d6a36ebfe6","templateCredsSetupCompleted":true},"name":"Auto-Generate LinkedIn Posts from Articles with Dumpling AI and GPT-4o","tags":[],"nodes":[{"id":"3e99adb0-0445-4516-9404-a96e5e273722","name":"Start Workflow","type":"n8n-nodes-base.manualTrigger","position":[-1060,-120],"parameters":{},"typeVersion":1},{"id":"bed177e1-ac0b-4159-8ac7-ae51af05da37","name":" Get \"To do\" Topics from Sheet","type":"n8n-nodes-base.googleSheets","position":[-840,-120],"parameters":{"options":{"returnFirstMatch":true},"filtersUI":{"values":[{"lookupValue":"To do","lookupColumn":"Status"}]},"sheetName":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"https://docs.google.com/spreadsheets/d/173W0S2tDXXSSFmN6igySo9ftW4_MTH1Tr_2wGIRwHdg/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"https://docs.google.com/spreadsheets/d/173W0S2tDXXSSFmN6igySo9ftW4_MTH1Tr_2wGIRwHdg/edit?usp=drivesdk","cachedResultName":"content library"}},"credentials":{"googleSheetsOAuth2Api":{"id":"GaJqJHuS5mQxap7q","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"cfd11e52-1a0b-4f55-a623-40f7f8233ef1","name":"Scrape Articles via Dumpling AI Search","type":"n8n-nodes-base.httpRequest","position":[-620,-120],"parameters":{"url":" https://app.dumplingai.com/api/v1/search","method":"POST","options":{},"jsonBody":"={\n  \"query\": \"{{ $json.Topic }}\",\n  \"numResultsToScrape\": \"3\",\n   \"scrapeResults\": \"true\"\n}\n ","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"RLFzAcGRepr5eXZB","name":"Dumpling AI-n8n"}},"typeVersion":4.2},{"id":"96f68697-8ef2-42a7-b9ef-10044cac2b0a","name":"Enable GPT-4o for LangChain Agent","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-540,100],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{"responseFormat":"json_object"}},"credentials":{"openAiApi":{"id":"fdhWALG84tBLgSZT","name":"OpenAi account"}},"typeVersion":1.2},{"id":"d2acc5f1-b366-4e07-8f1b-953c591f63b0","name":"Summarize 3 Articles + Generate LinkedIn Post + Image Prompt","type":"@n8n/n8n-nodes-langchain.agent","position":[-400,-120],"parameters":{"text":"=Article 1:{{ $json.organic[0].scrapeOutput.content }}\n\nArticle 2:{{ $json.organic[1].scrapeOutput.content }}\n\nArticle 3:{{ $json.organic[2].scrapeOutput.content }}","options":{"systemMessage":"= Agent Prompt (Final Version):\nYou are a professional AI content assistant. Based on the 3 articles I will provide, generate a LinkedIn post and also create an image prompt that visually represents the message of the post.\n\nInstructions:\n\nRead all 3 articles.\n\nCombine key insights from them into a single LinkedIn post.\n\nWrite the post in a conversational, professional tone — no robotic language.\n\nThe first line must grab attention and spark curiosity.\n\nAvoid hashtags, emojis, and clickbait phrases.\n\nKeep the post under 1,300 characters.\n\nUse correct punctuation only. Do not use hyphens.\n\nAfter writing the post, generate a short and clear image prompt that can be used to create a LinkedIn graphic. It should be based on the main message or visual idea from the post.\n\nReturn your response in the following JSON format:\n\njson\nCopy\nEdit\n{\n  \"postText\": \"Write the full LinkedIn post here...\",\n  \"imagePrompt\": \"A short visual prompt that summarizes the theme of the post, such as 'A modern workspace with AI-powered tools automating business processes'\"\n}\n"},"promptType":"define"},"typeVersion":1.9},{"id":"d1f25b3a-3044-4ca6-937e-c61439d545c8","name":" Extract Post Text and Image Prompt","type":"n8n-nodes-base.set","position":[-20,-120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"bc9d47f0-b4b9-437e-b37d-c1396d316b15","name":"postText","type":"string","value":"={{ JSON.parse($json[\"output\"]).postText }}\n"},{"id":"fc8def21-2cc2-4029-a66d-df02530a1535","name":"imagePrompt","type":"string","value":"={{ JSON.parse($json[\"output\"]).imagePrompt }}"}]}},"typeVersion":3.4},{"id":"1ccd4791-92c9-4572-9e0c-cb60477dabdd","name":"Generate Image with Dumpling AI","type":"n8n-nodes-base.httpRequest","position":[220,-120],"parameters":{"url":" https://app.dumplingai.com/api/v1/generate-ai-image","method":"POST","options":{},"jsonBody":"={\n  \"model\": \"FLUX.1-pro\",\n  \"input\": {\n    \"prompt\": \"{{ $json.imagePrompt }}\"\n  }\n}\n\n ","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"RLFzAcGRepr5eXZB","name":"Dumpling AI-n8n"}},"typeVersion":4.2},{"id":"be8bd9f0-1cff-41c9-b26e-c6f365aa86fd","name":"Update Google Sheet with Post & Image","type":"n8n-nodes-base.googleSheets","position":[440,-120],"parameters":{"columns":{"value":{"Image":"={{ $json.images[0].url }}","Topic":"={{ $(' Get \"To do\" Topics from Sheet').item.json.Topic }}","Status":"created","Content":"={{ $(' Extract Post Text and Image Prompt').item.json.postText }}"},"schema":[{"id":"Topic","type":"string","display":true,"removed":false,"required":false,"displayName":"Topic","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Status","type":"string","display":true,"required":false,"displayName":"Status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Content","type":"string","display":true,"required":false,"displayName":"Content","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Image","type":"string","display":true,"required":false,"displayName":"Image","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":["Topic"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"https://docs.google.com/spreadsheets/d/173W0S2tDXXSSFmN6igySo9ftW4_MTH1Tr_2wGIRwHdg/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"https://docs.google.com/spreadsheets/d/173W0S2tDXXSSFmN6igySo9ftW4_MTH1Tr_2wGIRwHdg/edit?usp=drivesdk","cachedResultName":"content library"}},"credentials":{"googleSheetsOAuth2Api":{"id":"GaJqJHuS5mQxap7q","name":"Google Sheets account"}},"typeVersion":4.6},{"id":"44ad06d9-d5f7-4a3c-a894-943ec46ac0f0","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1060,-280],"parameters":{"width":900,"height":200,"content":"### 📚 Get Topic and Summarize Articles with AI\n\nThis part starts the workflow manually, pulls the first \"To do\" topic from a Google Sheet, and passes the topic to Dumpling AI to perform a Google search and scrape the top 3 article contents. The LangChain Agent, powered by GPT-4o, uses these articles to generate a LinkedIn post and an image prompt, all formatted in structured JSON. This combines real-world content scraping with AI summarization in one seamless step.\n"},"typeVersion":1},{"id":"528021a8-6b26-4177-b9fa-eb2405ac7d8d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-100,-280],"parameters":{"width":760,"height":200,"content":"### 🧠 Refine Output and Store Content\n\nOnce the AI Agent returns the LinkedIn post and image prompt, the Set node extracts both fields. Dumpling AI then uses the image prompt to generate a relevant visual. Finally, the result (post text, generated image, and topic) is saved back to the Google Sheet. This completes the loop from input topic to ready-to-use LinkedIn content with visuals—all automated.\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"5208235f-4bc6-417c-8a38-2bc92b7a75f9","connections":{"Start Workflow":{"main":[[{"node":" Get \"To do\" Topics from Sheet","type":"main","index":0}]]}," Get \"To do\" Topics from Sheet":{"main":[[{"node":"Scrape Articles via Dumpling AI Search","type":"main","index":0}]]},"Generate Image with Dumpling AI":{"main":[[{"node":"Update Google Sheet with Post & Image","type":"main","index":0}]]},"Enable GPT-4o for LangChain Agent":{"ai_languageModel":[[{"node":"Summarize 3 Articles + Generate LinkedIn Post + Image Prompt","type":"ai_languageModel","index":0}]]}," Extract Post Text and Image Prompt":{"main":[[{"node":"Generate Image with Dumpling AI","type":"main","index":0}]]},"Scrape Articles via Dumpling AI Search":{"main":[[{"node":"Summarize 3 Articles + Generate LinkedIn Post + Image Prompt","type":"main","index":0}]]},"Summarize 3 Articles + Generate LinkedIn Post + Image Prompt":{"main":[[{"node":" Extract Post Text and Image Prompt","type":"main","index":0}]]}}}


name: Extract & Enrich LinkedIn Comments to Leads with Apify → Google Sheets/CSV
author_name: Saverflow AI
author_username: saverflowai
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.code"]
categories: []
created_at: 2025-06-04T02:39:54.846Z
updated_at: 2025-06-04T02:39:54.846Z
url: https://n8n.io/workflows/4635
scraped_at: 2025-06-19 22:48:42
description:
  🚀 LinkedIn Comments to Leads Extractor & Enricher (Apify) → Google Sheets / CSV

  Overview

  Automate LinkedIn lead generation by scraping comments from targeted posts and enriching profiles with detailed data

  This n8n workflow automatically extracts leads from LinkedIn post comments using Apify's powerful scrapers (no LinkedIn login required), enriches the data with additional profile information, and exports everything to Google Sheets or CSV format.

  ✨ Key Features

  🔍 No Login Required: Scrape LinkedIn data without sharing credentials
  💰 Cost-Effective: First 1,000 comments are free with Apify
  📊 Data Enrichment: Enhance basic comment data with full profile details
  📈 Export Options: Choose between Google Sheets or CSV output
  🎯 Targeted Scraping: Focus on specific posts for quality leads

  🛠️ Apify Scrapers Used

  1. LinkedIn Post Comments Scraper
  Tool**: LinkedIn Post Comments, Replies, Engagements Scraper | No Cookies
  Pricing**: $5.00 per 1,000 results
  Function**: Extracts all comments and engagement data from specified LinkedIn posts

  2. LinkedIn Profile Batch Scraper
  Tool**: LinkedIn Profile Details Batch Scraper (No Cookies Required)
  Pricing**: $5.00 per 1,000 results
  Function**: Enriches scraped profiles with detailed information

  &gt; 💡 Free Tier: Apify provides 1,000 free scraped comments to get you started!

  📋 Prerequisites

  Required API Credentials

  Apify Token
     Add your APIFY_TOKEN to the workflow credentials
     Get your token from Apify Console

  Google Sheets Credentials (if using Sheets export)
     Configure OAuth credentials for Google Sheets integration
     Follow n8n's Google Sheets setup guide

  🔄 Workflow Process

  Default Mode: Form-Based Execution

  Manual Trigger → Launches the workflow
  Form Submission → User-friendly form for inputting LinkedIn post URLs
  Comment Scraping → Apify extracts all comments from specified posts
  Profile Enrichment → Additional profile data gathered for each commenter
  Data Processing → Creates unique, enriched lead list
  Google Sheets Export → Automatically populates your spreadsheet

  Result: You'll be redirected to a Google Sheets document containing all enriched leads

  Alternative Mode: CSV Export

  For users preferring CSV output:

  Disable: Form trigger nodes
  Enable: Manual trigger node
  Disable: Google Sheets export nodes
  Enable: CSV download nodes
  Configure: Add post IDs/URLs in "Set manual fields" node
  Execute: Run workflow and download CSV from the CSV node

  📊 Output Data Structure

  Your exported data will include:

  Basic Info**: Name, headline, location
  Profile Details**: Company, position, industry
  Engagement Data**: Comment content, engagement metrics
  Contact Info**: Available profile links and connections
  Enriched Data**: Additional profile insights from Apify

  💡 Pro Tips

  Quality over Quantity**: Target posts with high-quality, relevant engagement
  Monitor Costs**: Track your Apify usage to stay within budget
  Data Hygiene**: Regularly clean and deduplicate your lead lists
  Compliance**: Ensure your scraping activities comply with LinkedIn's terms of service

  🆘 Troubleshooting

  Common Issues:
  Authentication Errors**: Verify your Apify token is correctly configured
  Empty Results**: Check that your LinkedIn post URLs are valid and public
  Export Failures**: Ensure Google Sheets credentials are properly set up

  Need Help? Contact Saverflow.ai for support and custom workflow development.

workflow_json:
  {"meta":{"instanceId":"30e5848b346369e688a90590edfdf72f9e085f2b2ed50b31cf94f3bfb8c384ed","templateId":"4635"},"nodes":[{"id":"66c32da3-373c-42a9-bf51-5bec1fd6c4cd","name":"Trigger manually","type":"n8n-nodes-base.manualTrigger","disabled":true,"position":[1240,1360],"parameters":{},"typeVersion":1},{"id":"6a0decfe-9539-4c10-9474-0031fa91dfc5","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[380,240],"parameters":{"color":5,"width":1620,"height":1000,"content":"# 🚀 LinkedIn Comments to Leads Extractor & Enricher (Apify) → Google Sheets / CSV\n\n## Overview\n\n**Automate LinkedIn lead generation by scraping comments from targeted posts and enriching profiles with detailed data**\n\nThis n8n workflow automatically extracts leads from LinkedIn post comments using Apify's powerful scrapers (no LinkedIn login required), enriches the data with additional profile information, and exports everything to Google Sheets or CSV format.\n\n---\n\n## ✨ Key Features\n\n- 🔍 **No Login Required**: Scrape LinkedIn data without sharing credentials\n- 💰 **Cost-Effective**: First 1,000 comments are free with Apify\n- 📊 **Data Enrichment**: Enhance basic comment data with full profile details\n- 📈 **Export Options**: Choose between Google Sheets or CSV output\n- 🎯 **Targeted Scraping**: Focus on specific posts for quality leads\n\n---\n\n## 🛠️ Apify Scrapers Used\n\n### 1. LinkedIn Post Comments Scraper\n- **Tool**: [LinkedIn Post Comments, Replies, Engagements Scraper | No Cookies](https://apify.com/apimaestro/linkedin-post-comments-replies-engagements-scraper-no-cookies/api/python)\n- **Pricing**: $5.00 per 1,000 results\n- **Function**: Extracts all comments and engagement data from specified LinkedIn posts\n\n### 2. LinkedIn Profile Batch Scraper\n- **Tool**: [LinkedIn Profile Details Batch Scraper (No Cookies Required)](https://apify.com/apimaestro/linkedin-profile-batch-scraper-no-cookies-required)\n- **Pricing**: $5.00 per 1,000 results\n- **Function**: Enriches scraped profiles with detailed information\n\n> 💡 **Free Tier**: Apify provides 1,000 free scraped comments to get you started!\n\n---\n"},"typeVersion":1},{"id":"e206b173-eb8a-4721-8251-8b0ebb2aa38f","name":"On form submission","type":"n8n-nodes-base.formTrigger","position":[1300,1760],"webhookId":"a81d04b5-169a-4368-b925-91fb0660b6b2","parameters":{"options":{"ignoreBots":true,"buttonLabel":"Submit","appendAttribution":false,"respondWithOptions":{"values":{"redirectUrl":"=https://docs.google.com/spreadsheets/u/0/","respondWith":"redirect"}}},"formTitle":"Linkedin Posts Comments Leads Scraper","formFields":{"values":[{"fieldType":"textarea","fieldLabel":"Post IDs/URLs","placeholder":"e.g. 7334385757769416704, https://www.linkedin.com/feed/update/urn:li:activity:7334385757769416704/","requiredField":true},{"fieldType":"number","fieldLabel":"How many comments you want to scrape?","placeholder":"Default: 100"}]},"responseMode":"lastNode","formDescription":"=<div style=\"font-family: Arial, sans-serif; line-height: 1.8; color: #333; word-wrap: break-word; overflow-wrap: break-word;\">\n\n<p style=\"margin-bottom: 20px;\"><strong style=\"color: #0077b5;\">🔸 Step 1: Add Posts URLs</strong></p>\n<p style=\"margin-bottom: 20px;\">The workflow accepts various LinkedIn post identifier formats:</p>\n\n<p style=\"margin-bottom: 18px;\"><strong>📊 Numeric post IDs:</strong><br>\n<span style=\"font-family: monospace; background: #f5f5f5; padding: 4px 6px; word-break: break-all; margin-top: 8px; display: inline-block;\">7334385757769416704</span></p>\n\n<p style=\"margin-bottom: 18px;\"><strong>🔗 Activity URLs:</strong><br>\n<span style=\"font-family: monospace; background: #f5f5f5; padding: 4px 6px; word-break: break-all; display: block; margin-top: 8px;\">https://www.linkedin.com/feed/update/urn:li:activity:273437/</span></p>\n\n<p style=\"margin-bottom: 25px;\"><strong>🌐 Full post URLs:</strong><br>\n<span style=\"font-family: monospace; background: #f5f5f5; padding: 4px 6px; word-break: break-all; display: block; margin-top: 8px;\">https://www.linkedin.com/posts/username_title-activity-7334385757769416704-dMnz</span></p>\n\n<hr style=\"margin: 30px 0; border: 1px solid #ddd;\">-------------------\n\n<p style=\"margin-bottom: 20px;\"><strong style=\"color: #28a745;\">✅ Step 2: Results</strong></p>\n<p style=\"margin-bottom: 20px;\">Once finished, you'll be redirected to Google Sheets where you can find your result with the name:</p>\n<p style=\"background: #f0f8ff; padding: 15px; border-left: 4px solid #0077b5; margin: 20px 0;\">\n<strong>\"LinkedIn-Posts-Comments-Leads-{{ $now.format('yyyy-MM-dd') }}\"</strong>\n</p>\n\n<hr style=\"margin: 30px 0; border: 1px solid #ddd;\">-------------------\n\n\n<p style=\"color: #666; font-size: 14px; margin-top: 25px;\"><em>💡 Tip: Make sure your LinkedIn URLs are publicly accessible for the best results.</em></p>\n\n</div>"},"typeVersion":2.2},{"id":"d90f3510-b326-4352-90f4-772eca3d5b9b","name":"Set APIFY Token","type":"n8n-nodes-base.set","position":[1820,1460],"parameters":{"options":{},"assignments":{"assignments":[{"id":"20febbcc-0a59-4a89-8932-9bbb34b0e9f9","name":"APIFY_TOKEN","type":"string","value":""},{"id":"291758a3-c73f-4db5-a2b3-5f88664a8b53","name":"limit","type":"number","value":"={{ $json.limit }}"},{"id":"921b72d5-3688-4324-9d36-50668548344e","name":"postIds","type":"array","value":"={{ $json.postIds }}"}]},"includeOtherFields":true},"notesInFlow":true,"typeVersion":3.4},{"id":"36eb3f1f-e0db-4175-964e-9200bf503918","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1740,1360],"parameters":{"color":3,"width":260,"height":300,"content":"## 1. Set APIFY TOKEN\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### _(CLICK ME)_"},"typeVersion":1},{"id":"5237c7a8-e2b4-49ae-a070-9cd885e1bc18","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1420,1280],"parameters":{"color":2,"height":300,"content":"_(or if run manually ENABLE this)_  \n### 4. Set Post ID/URL\n\n\n\n\n\n\n\n\n\n\n\n\n\n### _(CLICK ME)_ and Connect\n"},"typeVersion":1},{"id":"9637dc03-c409-477d-a596-c84f4df12d63","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1160,1620],"parameters":{"color":3,"width":400,"height":380,"content":"## 3. You can run through the form (check Form URL)\n\n\n\n\n\n\n\n\n\n\n\n\n\n### _(CLICK ME)_ \nIf run manually DISABLE this node"},"typeVersion":1},{"id":"efe492e1-78f7-4f55-89d7-caea70767044","name":"Set fields from the form","type":"n8n-nodes-base.set","position":[1620,1760],"parameters":{"options":{},"assignments":{"assignments":[{"id":"916bb8f7-34c5-4f2f-b13d-f60d228abc1f","name":"postIds","type":"array","value":"={{ $json['Post IDs/URLs'].replaceAll('\\n','').replaceAll('\\r', '').split(',').filter(item => $ifEmpty(item, false))  }}"},{"id":"7ff3d2f4-ab8a-444f-9747-f95166a950bd","name":"limit","type":"number","value":"={{ $json['How many comments you want to scrape?'] || 100 }}"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"aea3954b-94cf-4785-a692-a46d45b9add5","name":"Set manual fields","type":"n8n-nodes-base.set","disabled":true,"position":[1480,1360],"parameters":{"options":{},"assignments":{"assignments":[{"id":"af09ad86-b3dd-45b7-b17d-cb810e4b48d6","name":"postIds","type":"array","value":"['https://www.linkedin.com/feed/update/urn:li:activity:7334385757769416704/', 'https://www.linkedin.com/feed/update/urn:li:activity:7318557377971023872/']"},{"id":"b2f9412e-4c81-454f-ad84-a1d5f6547a26","name":"limit","type":"number","value":100}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"c9d2e385-9c38-43ea-88bd-e7363f215cc7","name":"More runs needed?","type":"n8n-nodes-base.if","notes":"Per run it's only 100 comments","position":[2620,1460],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"19224073-c84d-456f-b694-318df4223d2a","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.summary.totalComments }}","rightValue":100},{"id":"8156447e-75dd-4cad-8fc8-17366667d165","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $('Set APIFY Token').first().json.limit }}","rightValue":100}]}},"notesInFlow":true,"typeVersion":2.2},{"id":"021e8ae2-6773-4154-ab59-61dab49b16e9","name":"Set pagination","type":"n8n-nodes-base.code","position":[2840,1320],"parameters":{"jsCode":"const limitPages = Math.ceil($('Set APIFY Token').first().json.limit / 100)\nconst totalComments = $('Run Apify Comments Scraper').last().json.summary.totalComments \nconst availablePages = Math.ceil(totalComments / 100)\n\nconst totalRuns = availablePages <= limitPages ? availablePages : limitPages\n\nlet currentPage = 2\n\n\nreturn {\n  json: {\n    items:\n      Array.from({ length: totalRuns }, (_, i) => {\n        return { currentPage: currentPage + i }\n      })\n  }\n};"},"typeVersion":2},{"id":"5371649d-d032-452d-8af6-13a679b254fd","name":"Split Out","type":"n8n-nodes-base.splitOut","position":[3060,1320],"parameters":{"options":{},"fieldToSplitOut":"items"},"typeVersion":1},{"id":"4003ce75-3e13-4d2a-9199-bac9f5bda6de","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[2400,1460],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"items"},"typeVersion":1},{"id":"c25710e8-c47c-4fb9-91e1-d9fe37ad53fa","name":"Gather All Comments","type":"n8n-nodes-base.set","position":[3720,1120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"b4280f11-a50b-4065-8742-9f994c6ee84d","name":"items","type":"array","value":"={{ $json.items.concat($('Aggregate').item.json.items) }}"}]}},"typeVersion":3.4},{"id":"2876c38b-ed23-4d6b-9a65-97c1b70d245a","name":"Create Unique List of Leads","type":"n8n-nodes-base.code","position":[4180,1480],"parameters":{"jsCode":"// Get all input items\nconst items = $input.first().json.items;\n\n// Use reduce to filter unique profile_url values\nconst uniqueProfiles = items.reduce((acc, item) => {\n  // Check if this profile_url is already in the accumulator\n  console.log(item)\n  if (item.author && !acc.some(i => i.profile_url === item.author.profile_url)) {\n    acc.push(item.author);\n  }\n  return acc;\n}, []);\n\nreturn uniqueProfiles"},"typeVersion":2},{"id":"80336fb8-a783-4907-89eb-82b9877a7b36","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[2000,1040],"parameters":{"color":7,"width":2040,"height":840,"content":"## 🛠 Running Apify LinkedIn Comments Scrapers and processing data\nWe want to run an Apify scraper once to validate the number of available comments and then run it multiple times if necessary."},"typeVersion":1},{"id":"3877d666-27e5-4bf7-8a1c-3c1e4dce32d8","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[4040,1040],"parameters":{"width":1700,"height":840,"content":"## Create a unique list of Leads, ✨ enrich ✨ it with more data\nOnce we have all of the comment authors, we need to enrich them with more information from LinkedIn\n"},"typeVersion":1},{"id":"fdbf8690-b517-4773-819a-e8bd92ddcd25","name":"Run Apify Comments Scraper","type":"n8n-nodes-base.httpRequest","position":[2180,1460],"parameters":{"url":"={{ 'https://api.apify.com/v2/acts/apimaestro~linkedin-post-comments-replies-engagements-scraper-no-cookies/run-sync-get-dataset-items?token=' +$json.APIFY_TOKEN}}","method":"POST","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"postIds","value":"={{ $json.postIds }}"},{"name":"page_number","value":"={{ 1 }}"},{"name":"sortOrder","value":"most recent"},{"name":"limit","value":"={{ $json.limit }}"}]}},"typeVersion":4.2},{"id":"5b426074-2649-48cf-9a55-cedfe1cb0bf7","name":"Run Apify Comments Scraper Loop","type":"n8n-nodes-base.httpRequest","position":[3500,1340],"parameters":{"url":"={{ 'https://api.apify.com/v2/acts/apimaestro~linkedin-post-comments-replies-engagements-scraper-no-cookies/run-sync-get-dataset-items?token=' + $('Set APIFY Token').first().json.APIFY_TOKEN}}","method":"POST","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"postIds","value":"={{ $('Set APIFY Token').first().json.postIds }}"},{"name":"page_number","value":"={{ $json.currentPage }}"},{"name":"sortOrder","value":"most recent"},{"name":"limit","value":"={{ $('Set APIFY Token').first().json.limit }}"}]}},"typeVersion":4.2},{"id":"b3038b0f-d025-4843-8204-1bb498b193ce","name":"Run Apify Profile Enrichment","type":"n8n-nodes-base.httpRequest","position":[5220,1500],"parameters":{"url":"={{ 'https://api.apify.com/v2/acts/apimaestro~linkedin-profile-batch-scraper-no-cookies-required/run-sync-get-dataset-items?token=' + $('Set APIFY Token').first().json.APIFY_TOKEN}}","method":"POST","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"usernames","value":"={{ $json.batches }}"}]}},"typeVersion":4.2},{"id":"87194dbf-8d63-438a-8081-8ed7a4e93169","name":"Split Out Batches","type":"n8n-nodes-base.splitOut","position":[4640,1480],"parameters":{"include":"allOtherFields","options":{},"fieldToSplitOut":"batches"},"typeVersion":1},{"id":"4fe12998-abdd-4659-aaa7-1aeef2ad241a","name":"Loop Over Comments","type":"n8n-nodes-base.splitInBatches","position":[3280,1320],"parameters":{"options":{}},"typeVersion":3},{"id":"e1a29bde-cfe6-4c89-a601-3ae0b582e052","name":"Loop Over Profiles","type":"n8n-nodes-base.splitInBatches","position":[4940,1480],"parameters":{"options":{}},"typeVersion":3},{"id":"1eb148c9-17a9-4d02-99a0-e647b3398ea4","name":"Split in batches","type":"n8n-nodes-base.code","position":[4400,1480],"parameters":{"jsCode":"const uniqueProfiles = $input.all().map(item => item.json.profile_url)\n\n// Split the uniqueProfiles in batches of 500 for the Apify\nconst chunkSize = 500;\nconst batches = [];\n\nfor (let i = 0; i < uniqueProfiles.length; i += chunkSize) {\n  batches.push(uniqueProfiles.slice(i, i + chunkSize));\n}\n\n\nreturn { batches };"},"typeVersion":2},{"id":"596572a6-7ffe-4cfa-b662-8cd083dbaccc","name":"Aggregate Comments","type":"n8n-nodes-base.aggregate","position":[3780,1340],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"items"},"typeVersion":1},{"id":"1dc0b52f-3c86-40ea-8c4b-399872e22259","name":"Aggregate Profiles","type":"n8n-nodes-base.aggregate","position":[5440,1500],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"items"},"typeVersion":1},{"id":"21cc6cc8-d4dc-40d9-9cfb-0069786af878","name":"Aggregate All Profiles","type":"n8n-nodes-base.aggregate","position":[5220,1320],"parameters":{"options":{"mergeLists":true},"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"items"}]}},"typeVersion":1},{"id":"84708fbf-bed4-4ce3-85c9-3ea16a9358c5","name":"Aggregate All Comments","type":"n8n-nodes-base.aggregate","position":[3500,1120],"parameters":{"options":{"mergeLists":true},"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"items"}]}},"typeVersion":1},{"id":"ecab78f3-dcf3-4ddc-afdd-e0d49df4eaca","name":"Convert to File","type":"n8n-nodes-base.convertToFile","disabled":true,"position":[6100,1140],"parameters":{"options":{"headerRow":true}},"executeOnce":true,"typeVersion":1.1},{"id":"36b226d0-a07b-48f1-9a28-85aebf794fd9","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[5840,1040],"parameters":{"color":2,"width":660,"height":380,"content":"## You can either run it manually (not through form) and download the CSV\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nYou need to activate \"Trigger manual\" nodes first\n\n### _(CLICK ME) and Connect_"},"typeVersion":1},{"id":"f278ede4-329d-4248-9f6c-b9bb14fa13aa","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[5840,1500],"parameters":{"color":3,"width":660,"height":380,"content":"## 2. Add credentials to Google Sheets\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### _(CLICK ME)_"},"typeVersion":1},{"id":"49cf9532-0e2f-487e-b6d4-eeb15fec3885","name":"Prepare the list for export","type":"n8n-nodes-base.code","position":[5440,1320],"parameters":{"jsCode":"function flatten(obj, prefix = '', res = {}) {\n  for (const key in obj) {\n    const value = obj[key];\n    const prefixedKey = prefix ? `${prefix}_${key}` : key;\n    if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n      flatten(value, prefixedKey, res);\n    } else {\n      res[prefixedKey] = value;\n    }\n  }\n  return res;\n}\n\nreturn $input.first().json.items.map(item => ({\n  json: flatten(item)\n}));"},"typeVersion":2},{"id":"33928b41-e209-4240-a636-41874b87b2f8","name":"Create Google Sheet","type":"n8n-nodes-base.googleSheets","position":[5920,1640],"parameters":{"title":"=LinkedIn-Posts-Comments-Leads-{{ $now.format('yyyy-MM-dd+T') }}","options":{},"resource":"spreadsheet","sheetsUi":{"sheetValues":[{"title":"Leads"}]}},"credentials":{"googleSheetsOAuth2Api":{"id":"w7X41eUzPcqOkYCg","name":"Google Sheets account"}},"executeOnce":true,"typeVersion":4.5},{"id":"d6e02f6e-0031-4dd8-922b-7981def48097","name":"Add Leads","type":"n8n-nodes-base.googleSheets","position":[6340,1640],"parameters":{"columns":{"value":{},"schema":[{"id":"profileUrl","type":"string","display":true,"required":false,"displayName":"profileUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_fullname","type":"string","display":true,"required":false,"displayName":"basic_info_fullname","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_first_name","type":"string","display":true,"required":false,"displayName":"basic_info_first_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_last_name","type":"string","display":true,"required":false,"displayName":"basic_info_last_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_headline","type":"string","display":true,"required":false,"displayName":"basic_info_headline","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_public_identifier","type":"string","display":true,"required":false,"displayName":"basic_info_public_identifier","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_profile_picture_url","type":"string","display":true,"required":false,"displayName":"basic_info_profile_picture_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_about","type":"string","display":true,"required":false,"displayName":"basic_info_about","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_location_country","type":"string","display":true,"required":false,"displayName":"basic_info_location_country","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_location_city","type":"string","display":true,"required":false,"displayName":"basic_info_location_city","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_location_full","type":"string","display":true,"required":false,"displayName":"basic_info_location_full","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_location_country_code","type":"string","display":true,"required":false,"displayName":"basic_info_location_country_code","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_creator_hashtags","type":"string","display":true,"required":false,"displayName":"basic_info_creator_hashtags","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_is_creator","type":"string","display":true,"required":false,"displayName":"basic_info_is_creator","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_is_influencer","type":"string","display":true,"required":false,"displayName":"basic_info_is_influencer","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_is_premium","type":"string","display":true,"required":false,"displayName":"basic_info_is_premium","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_created_timestamp","type":"string","display":true,"required":false,"displayName":"basic_info_created_timestamp","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_show_follower_count","type":"string","display":true,"required":false,"displayName":"basic_info_show_follower_count","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_background_picture_url","type":"string","display":true,"required":false,"displayName":"basic_info_background_picture_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_urn","type":"string","display":true,"required":false,"displayName":"basic_info_urn","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_follower_count","type":"string","display":true,"required":false,"displayName":"basic_info_follower_count","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_connection_count","type":"string","display":true,"required":false,"displayName":"basic_info_connection_count","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_current_company","type":"string","display":true,"required":false,"displayName":"basic_info_current_company","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_current_company_urn","type":"string","display":true,"required":false,"displayName":"basic_info_current_company_urn","defaultMatch":false,"canBeUsedToMatch":true},{"id":"basic_info_current_company_url","type":"string","display":true,"required":false,"displayName":"basic_info_current_company_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"experience","type":"string","display":true,"required":false,"displayName":"experience","defaultMatch":false,"canBeUsedToMatch":true},{"id":"education","type":"string","display":true,"required":false,"displayName":"education","defaultMatch":false,"canBeUsedToMatch":true},{"id":"certifications","type":"string","display":true,"required":false,"displayName":"certifications","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"autoMapInputData","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{"useAppend":true,"cellFormat":"USER_ENTERED"},"operation":"append","sheetName":{"__rl":true,"mode":"id","value":"={{ $('Create Google Sheet').first().json.sheets[0].properties.sheetId }}"},"documentId":{"__rl":true,"mode":"id","value":"={{ $('Create Google Sheet').first().json.spreadsheetId }}"}},"credentials":{"googleSheetsOAuth2Api":{"id":"w7X41eUzPcqOkYCg","name":"Google Sheets account"}},"executeOnce":false,"typeVersion":4.5},{"id":"fdb1fb37-bc5a-435d-97b4-aef5fbb8175f","name":"Set the list for sheets","type":"n8n-nodes-base.code","position":[6140,1640],"parameters":{"jsCode":"\nreturn $('Prepare the list for export').all();"},"typeVersion":2},{"id":"fe6d63a8-dadd-4187-814a-7a421bbb6d3f","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[380,2200],"parameters":{"color":5,"width":1180,"height":280,"content":"\n---\n\n## 📊 Output Data Structure\n\nYour exported data will include:\n\n- **Basic Info**: Name, headline, location\n- **Profile Details**: Company, position, industry\n- **Engagement Data**: Comment content, engagement metrics\n- **Contact Info**: Available profile links and connections\n- **Enriched Data**: Additional profile insights from Apify\n\n"},"typeVersion":1},{"id":"cc6512e8-8b8b-42b6-ba41-02a647bf6f5d","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[1560,2200],"parameters":{"width":760,"height":540,"content":"---\n\n## 💡 Pro Tips\n\n- **Quality over Quantity**: Target posts with high-quality, relevant engagement\n- **Monitor Costs**: Track your Apify usage to stay within budget\n- **Data Hygiene**: Regularly clean and deduplicate your lead lists\n- **Compliance**: Ensure your scraping activities comply with LinkedIn's terms of service\n\n---\n\n## 🆘 Troubleshooting\n\n**Common Issues:**\n- **Authentication Errors**: Verify your Apify token is correctly configured\n- **Empty Results**: Check that your LinkedIn post URLs are valid and public\n- **Export Failures**: Ensure Google Sheets credentials are properly set up\n\n**Need Help?** Contact [Saverflow.ai](https://saverflow.ai) for support and custom workflow development.\n\n---\n\n*Powered by Saverflow.ai | Streamline your lead generation with intelligent automation*"},"typeVersion":1},{"id":"ad786f97-cc63-4259-a469-5c5d271b17f8","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[380,1240],"parameters":{"color":6,"width":1620,"height":960,"content":"\n## 📋 Prerequisites\n\n### Required API Credentials\n\n1. **Apify Token**\n   - Add your `APIFY_TOKEN` to the workflow credentials\n   - [Get your token from Apify Console](https://apify.com/account#/integrations)\n\n2. **Google Sheets Credentials** *(if using Sheets export)*\n   - Configure OAuth credentials for Google Sheets integration\n   - [Follow n8n's Google Sheets setup guide](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/?utm_source=n8n_app&utm_medium=credential_settings&utm_campaign=create_new_credentials_modal)\n\n---\n\n## 🔄 Workflow Process\n\n### Default Mode: Form-Based Execution\n\n1. **Manual Trigger** → Launches the workflow\n2. **Form Submission** → User-friendly form for inputting LinkedIn post URLs\n3. **Comment Scraping** → Apify extracts all comments from specified posts\n4. **Profile Enrichment** → Additional profile data gathered for each commenter\n5. **Data Processing** → Creates unique, enriched lead list\n6. **Google Sheets Export** → Automatically populates your spreadsheet\n\n**Result**: You'll be redirected to a Google Sheets document containing all enriched leads\n\n### Alternative Mode: CSV Export\n\nFor users preferring CSV output:\n\n1. **Disable**: Form trigger nodes\n2. **Enable**: Manual trigger node\n3. **Disable**: Google Sheets export nodes\n4. **Enable**: CSV download nodes\n5. **Configure**: Add post IDs/URLs in \"Set manual fields\" node\n6. **Execute**: Run workflow and download CSV from the CSV node\n"},"typeVersion":1},{"id":"66685e68-953e-41b7-bc24-3de11ec8798a","name":"Done","type":"n8n-nodes-base.noOp","position":[7060,1360],"parameters":{},"typeVersion":1}],"pinData":{},"connections":{"Add Leads":{"main":[[{"node":"Done","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"More runs needed?","type":"main","index":0}]]},"Split Out":{"main":[[{"node":"Loop Over Comments","type":"main","index":0}]]},"Set pagination":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"Convert to File":{"main":[[]]},"Set APIFY Token":{"main":[[{"node":"Run Apify Comments Scraper","type":"main","index":0}]]},"Split in batches":{"main":[[{"node":"Split Out Batches","type":"main","index":0}]]},"Trigger manually":{"main":[[{"node":"Set manual fields","type":"main","index":0}]]},"More runs needed?":{"main":[[{"node":"Set pagination","type":"main","index":0}],[{"node":"Create Unique List of Leads","type":"main","index":0}]]},"Set manual fields":{"main":[[]]},"Split Out Batches":{"main":[[{"node":"Loop Over Profiles","type":"main","index":0}]]},"Aggregate Comments":{"main":[[{"node":"Loop Over Comments","type":"main","index":0}]]},"Aggregate Profiles":{"main":[[{"node":"Loop Over Profiles","type":"main","index":0}]]},"Loop Over Comments":{"main":[[{"node":"Aggregate All Comments","type":"main","index":0}],[{"node":"Run Apify Comments Scraper Loop","type":"main","index":0}]]},"Loop Over Profiles":{"main":[[{"node":"Aggregate All Profiles","type":"main","index":0}],[{"node":"Run Apify Profile Enrichment","type":"main","index":0}]]},"On form submission":{"main":[[{"node":"Set fields from the form","type":"main","index":0}]]},"Create Google Sheet":{"main":[[{"node":"Set the list for sheets","type":"main","index":0}]]},"Gather All Comments":{"main":[[{"node":"Create Unique List of Leads","type":"main","index":0}]]},"Aggregate All Comments":{"main":[[{"node":"Gather All Comments","type":"main","index":0}]]},"Aggregate All Profiles":{"main":[[{"node":"Prepare the list for export","type":"main","index":0}]]},"Set the list for sheets":{"main":[[{"node":"Add Leads","type":"main","index":0}]]},"Set fields from the form":{"main":[[{"node":"Set APIFY Token","type":"main","index":0}]]},"Run Apify Comments Scraper":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Create Unique List of Leads":{"main":[[{"node":"Split in batches","type":"main","index":0}]]},"Prepare the list for export":{"main":[[{"node":"Create Google Sheet","type":"main","index":0},{"node":"Convert to File","type":"main","index":0}]]},"Run Apify Profile Enrichment":{"main":[[{"node":"Aggregate Profiles","type":"main","index":0}]]},"Run Apify Comments Scraper Loop":{"main":[[{"node":"Aggregate Comments","type":"main","index":0}]]}}}


name: Automate Social Media Content with AI for Instagram, Facebook, LinkedIn & X
author_name: LukaszB
author_username: lukaszb
categories: []
created_at: 2025-06-04T03:00:43.654Z
updated_at: 2025-06-04T03:00:43.654Z
url: https://n8n.io/workflows/4637
scraped_at: 2025-06-19 22:48:42
description:
  AI Social Media Content Automation – n8n Workflow

  This workflow is built for creators, solopreneurs, SaaS founders, and agencies looking to automate their social media content process from idea to publication. It combines the power of OpenAI, Google Sheets, and official APIs for Instagram, Facebook, X (Twitter), and LinkedIn to deliver fully automated, brand-consistent social media posts — including text, images, hashtags, CTAs, and scheduling.

  No more switching tools, rewriting content, or forgetting to post. Just set it up once and let your brand grow automatically.

  🔧 What the Workflow Does
  Generates platform-specific post ideas based on your brand tone.
  Selects the best idea (or lets you manually input one).
  Writes tailored posts for Instagram, Facebook, X, and LinkedIn.
  Auto-generates platform-specific visuals using OpenAI (DALL·E) and uploads to Cloudinary.
  Publishes content directly using official platform APIs.
  Logs all actions to Google Sheets and optionally sends a summary email via Gmail.

  ⚙️ How It Works
  Trigger the workflow manually, on a schedule, or from a chatbot.
  AI generates multiple post ideas and filters the best one.
  Based on the selected idea, it generates full posts for each platform.
  Custom visuals are created using OpenAI and uploaded to Cloudinary.
  Final post content is merged and sent to Instagram, Facebook, X, and LinkedIn.
  Logs and optional reports are created in Google Sheets and Gmail.

  🛠️ Setup Steps
  Set up your accounts and credentials: OpenAI, Cloudinary, Gmail, Meta, LinkedIn, X, and Google Sheets.
  Import the workflow and subworkflow (Get Brand Brief) into n8n.
  Replace all placeholders (sheet IDs, access tokens, profile/page IDs, brand brief URLs).
  Optionally personalize prompts and output templates to match your brand voice.
  Setup time: ~30–45 minutes (including credentials and testing).

  Detailed configuration notes are included in sticky nodes throughout the workflow.

  📦 Included in Your Package
  JSON workflow file (main flow + brand brief subflow)
  Google Sheets templates for history logging
  Setup documentation (Markdown & PDF)
  Placeholder reference sheet

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.facebookGraphApi","n8n-nodes-base.twitter","n8n-nodes-base.gmail","n8n-nodes-base.linkedIn","n8n-nodes-base.notion","n8n-nodes-base.googleDocs","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.toolWorkflow","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"ieuaDljDSKnZW1CR","meta":{"instanceId":"740c1df6d3b1b6ea8a9d2223701f6904173f9e3cf7381cd181644b043420ba09"},"name":"Social media cross posting","tags":[],"nodes":[{"id":"b3a52a5d-7bfe-4fda-8ab7-9d74de088a53","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[2060,820],"parameters":{},"typeVersion":1.2},{"id":"15542640-1d00-41b9-82c5-d5a4ebcfb75e","name":"Get_Brand_Brief","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[2340,820],"parameters":{},"typeVersion":2.1},{"id":"e321a191-70dc-40c4-856c-eda6e539fa81","name":"AI Content creator","type":"@n8n/n8n-nodes-langchain.agent","position":[2220,560],"parameters":{},"typeVersion":1.8},{"id":"131f3368-653b-468d-9323-b74c4f86a515","name":"Get Brief","type":"n8n-nodes-base.executeWorkflow","position":[-800,560],"parameters":{},"typeVersion":1.2},{"id":"8fd73c02-63b3-471e-b44f-c1f0c5e29d54","name":"Edit Fields","type":"n8n-nodes-base.set","position":[1440,560],"parameters":{},"typeVersion":3.4},{"id":"49e958ff-a1e4-4e2c-9fbb-e16840bcc997","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[-400,780],"parameters":{},"typeVersion":1.2},{"id":"9e7f7e6e-b7f8-4457-84eb-fc24354cb666","name":"Idea creator","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[-580,560],"parameters":{},"typeVersion":1.6},{"id":"2ee53b83-7ab2-4018-805b-9d4dbb235ae6","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-1320,640],"parameters":{},"typeVersion":1},{"id":"3c262ffa-b8c7-4477-a825-92b70e0eb4e4","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-940,300],"parameters":{"content":""},"typeVersion":1},{"id":"709ecf38-4467-4c9a-821d-b6933d83d215","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1880,300],"parameters":{"content":""},"typeVersion":1},{"id":"253f5e80-cb8f-4647-aea9-f23286f7b948","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[340,2080],"parameters":{},"typeVersion":1.1},{"id":"1d6e201b-fcad-4319-aa4e-5d5914c4635b","name":"Notion","type":"n8n-nodes-base.notion","position":[560,2080],"parameters":{},"typeVersion":2.2},{"id":"b6274635-b94d-453d-9e8c-6cefe2074e3d","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[780,2080],"parameters":{},"typeVersion":1},{"id":"f8a72627-9e29-4d76-ac5d-1d159d9775a0","name":"Edit Fields1","type":"n8n-nodes-base.set","position":[1000,2080],"parameters":{},"typeVersion":3.4},{"id":"c6977d95-7cb3-43dc-910b-f34aee49e34c","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-40,1860],"parameters":{"content":""},"typeVersion":1},{"id":"a531aba0-1796-498b-aaaf-f89a7f78d1f6","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-580,800],"parameters":{},"typeVersion":1.2},{"id":"adb2943b-019d-4b42-b270-fbf57b25ff03","name":"Upload media to Instagram","type":"n8n-nodes-base.facebookGraphApi","position":[5140,420],"parameters":{},"typeVersion":1},{"id":"e34f8e99-636e-44c9-afc2-51ebe17a77c4","name":"Publish Post on IG","type":"n8n-nodes-base.facebookGraphApi","position":[5420,420],"parameters":{},"typeVersion":1},{"id":"97222747-0fa5-4ee4-ba11-7b09ad8e1690","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","position":[5020,320],"parameters":{"content":""},"typeVersion":1},{"id":"7c9703ab-0948-4d80-bbb1-42620a0cc7e6","name":"Merge3","type":"n8n-nodes-base.merge","position":[4700,420],"parameters":{},"typeVersion":3.1},{"id":"f4a526cf-d3c4-4584-a686-7444c7ed9f9b","name":"Merge4","type":"n8n-nodes-base.merge","position":[4700,1160],"parameters":{},"typeVersion":3.1},{"id":"ac9900d4-c48e-41c5-a318-7fbaeb5664e6","name":"X","type":"n8n-nodes-base.twitter","onError":"continueRegularOutput","position":[5300,1860],"parameters":{},"typeVersion":2},{"id":"feb929f6-032f-47ca-aa79-b9cdbdb631be","name":"Sticky Note16","type":"n8n-nodes-base.stickyNote","position":[3280,300],"parameters":{"content":""},"typeVersion":1},{"id":"e0b2322b-a3da-42e7-9afe-b011e456b4f5","name":"Sticky Note17","type":"n8n-nodes-base.stickyNote","position":[3140,120],"parameters":{"content":""},"typeVersion":1},{"id":"99b486e7-11c5-47e2-a6cb-3a9728627303","name":"Edit Fields4","type":"n8n-nodes-base.set","position":[4520,260],"parameters":{},"typeVersion":3.4},{"id":"efd21c27-e0f3-43e6-966d-4ccecebdc39e","name":"Edit Fields5","type":"n8n-nodes-base.set","position":[4540,1000],"parameters":{},"typeVersion":3.4},{"id":"7309c9ae-8cd2-4aaa-931d-14e4ff8c1894","name":"LinkedIn","type":"n8n-nodes-base.linkedIn","onError":"continueRegularOutput","position":[5280,2580],"parameters":{},"typeVersion":1},{"id":"13e5becb-e793-45c3-a1d4-acd65bcad6aa","name":"Merge5","type":"n8n-nodes-base.merge","position":[4760,2580],"parameters":{},"typeVersion":3.1},{"id":"d738c947-3dd3-48dc-9d6d-6624a545402f","name":"Edit Fields6","type":"n8n-nodes-base.set","position":[4580,2420],"parameters":{},"typeVersion":3.4},{"id":"61673acb-2ece-46a7-ac08-15d3aec3924d","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-1320,840],"webhookId":"cc6818c6-10a1-400b-9a17-7773ff0b891f","parameters":{},"typeVersion":1.1},{"id":"40926adb-faca-458c-b433-eb74a26c33d2","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[280,560],"parameters":{},"typeVersion":1.9},{"id":"5bb9b6bb-1e8f-482c-89cb-4d6601413d2a","name":"OpenAI Chat Model3","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[220,840],"parameters":{},"typeVersion":1.2},{"id":"b1485e4d-d5fc-450f-ae24-465ff08d479e","name":"Google Sheets","type":"n8n-nodes-base.googleSheetsTool","position":[640,840],"parameters":{},"typeVersion":4.6},{"id":"19518d54-18a6-4f9f-9385-9b0205274a0f","name":"Get_Brand_Brief1","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[440,840],"parameters":{},"typeVersion":2.1},{"id":"9b69b348-9e52-4cb6-bde8-67fa1acb83fd","name":"Check Examples1","type":"n8n-nodes-base.googleSheetsTool","position":[2500,820],"parameters":{},"typeVersion":4.5},{"id":"81ca8c02-a438-4516-8ef8-4e16f9c84d13","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[2200,820],"parameters":{},"typeVersion":1.3},{"id":"531c20c8-85a4-47ee-9e4d-4e2c315019a6","name":"Social Media Content1","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[2660,820],"parameters":{},"typeVersion":1.2},{"id":"90c9e8dd-504d-4a50-9002-9b65d08f6bdc","name":"IG Image generator","type":"@n8n/n8n-nodes-langchain.openAi","position":[3520,400],"parameters":{},"typeVersion":1.8},{"id":"3e51e978-3dd7-4c10-a797-b2e3a1acd7bc","name":"FB Image generator","type":"@n8n/n8n-nodes-langchain.openAi","position":[3540,1140],"parameters":{},"typeVersion":1.8},{"id":"0a0b7cc9-27e4-467f-98d3-373df678bb81","name":"LinkedIn Image generator","type":"@n8n/n8n-nodes-langchain.openAi","position":[3560,2580],"parameters":{},"typeVersion":1.8},{"id":"2e0a79ba-b65e-4715-962b-37160983266b","name":"Facebook Post","type":"n8n-nodes-base.facebookGraphApi","onError":"continueRegularOutput","position":[5320,1160],"parameters":{},"typeVersion":1,"alwaysOutputData":true},{"id":"fc70dceb-2700-4ad3-979d-aa35e715a5f4","name":"Merge","type":"n8n-nodes-base.merge","position":[6720,2540],"parameters":{},"typeVersion":3.1},{"id":"aafcb369-d1f0-492b-bb17-213da72e170e","name":"Gmail","type":"n8n-nodes-base.gmail","position":[7360,2560],"webhookId":"531c4f73-015d-4ef7-8436-36c333ecdd71","parameters":{},"typeVersion":2.1},{"id":"e60b7d5e-21c0-4bbe-8db6-8ec61acbf6c8","name":"Aggregate1","type":"n8n-nodes-base.aggregate","position":[6980,2560],"parameters":{},"typeVersion":1},{"id":"5098abdf-7705-49d1-baa9-f377af07376a","name":"Sticky Note21","type":"n8n-nodes-base.stickyNote","position":[6500,2200],"parameters":{"content":""},"typeVersion":1},{"id":"20c6758f-3ee7-4ecd-aca3-8d41ebbfddcb","name":"Add to History","type":"n8n-nodes-base.googleSheets","position":[780,560],"parameters":{},"typeVersion":4.6},{"id":"d2c08180-bb7a-4eaf-b84d-ca5bb101caf1","name":"Sticky Note22","type":"n8n-nodes-base.stickyNote","position":[3140,840],"parameters":{"content":""},"typeVersion":1},{"id":"31ae2efd-9c71-4e7a-8dad-681e7a9b0b6e","name":"Sticky Note19","type":"n8n-nodes-base.stickyNote","position":[3300,1040],"parameters":{"content":""},"typeVersion":1},{"id":"01d9be7a-8b24-4d3d-8203-564c5f8e1959","name":"Sticky Note12","type":"n8n-nodes-base.stickyNote","position":[5020,1040],"parameters":{"content":""},"typeVersion":1},{"id":"b3936140-1db2-43db-8631-4bb2d3fbd409","name":"Sticky Note25","type":"n8n-nodes-base.stickyNote","position":[3140,1540],"parameters":{"content":""},"typeVersion":1},{"id":"2de31058-e1e3-4939-8b64-31c232cda880","name":"Sticky Note26","type":"n8n-nodes-base.stickyNote","position":[3300,1740],"parameters":{"content":""},"typeVersion":1},{"id":"01ee1db0-6142-4353-b25e-8640559c1d81","name":"Merge6","type":"n8n-nodes-base.merge","position":[4420,1860],"parameters":{},"typeVersion":3.1},{"id":"8dd0b5e3-8e8d-42d3-a98e-8c121958d9cd","name":"Edit Fields7","type":"n8n-nodes-base.set","position":[4260,1700],"parameters":{},"typeVersion":3.4},{"id":"4c27e97c-d714-4ed2-8687-ecd5d0432eba","name":"Sticky Note27","type":"n8n-nodes-base.stickyNote","position":[3140,2260],"parameters":{"content":""},"typeVersion":1},{"id":"2b8fdbdf-626c-48f7-b773-0329cafcb2e3","name":"Sticky Note28","type":"n8n-nodes-base.stickyNote","position":[3300,2460],"parameters":{"content":""},"typeVersion":1},{"id":"322e6be4-4354-4ef8-bdb8-2227ff6480d1","name":"Sticky Note14","type":"n8n-nodes-base.stickyNote","position":[5020,2480],"parameters":{"content":""},"typeVersion":1},{"id":"6cf82d22-7c92-4a60-b77a-f7d5dd26d7a0","name":"X Image generator","type":"@n8n/n8n-nodes-langchain.openAi","position":[3540,1840],"parameters":{},"typeVersion":1.8},{"id":"721cf0a1-a1f8-41e8-92cb-dd923d503ad8","name":"Sticky Note15","type":"n8n-nodes-base.stickyNote","position":[5040,1740],"parameters":{"content":""},"typeVersion":1},{"id":"d7f1d581-f19d-4846-a718-22fd9c10451b","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[4560,1640],"parameters":{"content":""},"typeVersion":1},{"id":"768dbb8a-7732-408a-9239-5bf1e0d05374","name":"Add Examples","type":"n8n-nodes-base.googleSheets","position":[4360,3100],"parameters":{},"typeVersion":4.5},{"id":"56789045-4ea7-4089-97a9-62c2c8d3fec6","name":"Google Docs","type":"n8n-nodes-base.googleDocs","disabled":true,"position":[560,2460],"parameters":{},"typeVersion":2},{"id":"eb01b4e0-d696-44e0-9b40-12c6e2fad559","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[400,2340],"parameters":{"content":""},"typeVersion":1},{"id":"8bf1b32c-cec0-4ec3-b454-189a1b0f1958","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[4120,2940],"parameters":{"content":""},"typeVersion":1},{"id":"60f46c2a-8a8d-46bd-a345-e4a7e5999cd1","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[60,300],"parameters":{"content":""},"typeVersion":1},{"id":"df0707e8-aeaa-4b7b-9412-cc4fba36a4d0","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1140,300],"parameters":{"content":""},"typeVersion":1},{"id":"e840dc65-069b-44b9-93e2-17c343670600","name":"HTTP Request","type":"n8n-nodes-base.httpRequest","position":[4020,2580],"parameters":{},"typeVersion":4.2},{"id":"1428375a-be0d-457d-88f3-313694546394","name":"Post image Cloudianry IG","type":"n8n-nodes-base.httpRequest","position":[3820,400],"parameters":{},"typeVersion":4.2},{"id":"044f8b91-1766-4183-a012-36e28287f2eb","name":"Post image Cloudianry FB","type":"n8n-nodes-base.httpRequest","position":[3860,1140],"parameters":{},"typeVersion":4.2},{"id":"e93929b2-9cbc-4826-9e7a-6e3bd651848e","name":"Post image Cloudianry X","type":"n8n-nodes-base.httpRequest","position":[3820,1840],"parameters":{},"typeVersion":4.2},{"id":"898e761d-abfa-4ea5-a5ef-40c2b67c87bf","name":"Post image Cloudianry LIn","type":"n8n-nodes-base.httpRequest","position":[3800,2580],"parameters":{},"typeVersion":4.2},{"id":"6ffdea4c-1f03-4cf4-913f-653019f0965c","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-1320,440],"parameters":{},"typeVersion":1.2},{"id":"ceeb4aee-6c35-4ac1-84df-3ed36147a0f2","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-1460,300],"parameters":{"content":""},"typeVersion":1},{"id":"9b18e14c-ead6-42c1-aaa7-918383acab18","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[6400,160],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"881c0ae7-8264-44d8-85a7-70206c98186a","connections":{"X":{"main":[[{"node":"Merge","type":"main","index":2}]]},"Merge":{"main":[[{"node":"Aggregate1","type":"main","index":0}]]},"Merge3":{"main":[[{"node":"Upload media to Instagram","type":"main","index":0}]]},"Merge4":{"main":[[{"node":"Facebook Post","type":"main","index":0}]]},"Merge5":{"main":[[{"node":"LinkedIn","type":"main","index":0}]]},"Merge6":{"main":[[{"node":"X","type":"main","index":0}]]},"Notion":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"Add to History","type":"main","index":0}]]},"LinkedIn":{"main":[[{"node":"Merge","type":"main","index":3}]]},"Aggregate":{"main":[[{"node":"Edit Fields1","type":"main","index":0}]]},"Get Brief":{"main":[[{"node":"Idea creator","type":"main","index":0}]]},"Aggregate1":{"main":[[{"node":"Gmail","type":"main","index":0}]]},"Edit Fields":{"main":[[{"node":"AI Content creator","type":"main","index":0}]]},"Add Examples":{"main":[[]]},"Edit Fields4":{"main":[[{"node":"Merge3","type":"main","index":1}]]},"Edit Fields5":{"main":[[{"node":"Merge4","type":"main","index":1}]]},"Edit Fields6":{"main":[[{"node":"Merge5","type":"main","index":1}]]},"Edit Fields7":{"main":[[{"node":"Merge6","type":"main","index":1}]]},"HTTP Request":{"main":[[{"node":"Merge5","type":"main","index":1}]]},"Idea creator":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Facebook Post":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Google Sheets":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Content creator","type":"ai_memory","index":0}]]},"Add to History":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"Check Examples1":{"ai_tool":[[{"node":"AI Content creator","type":"ai_tool","index":0}]]},"Get_Brand_Brief":{"ai_tool":[[{"node":"AI Content creator","type":"ai_tool","index":0}]]},"Get_Brand_Brief1":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Get Brief","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Content creator","type":"ai_languageModel","index":0}]]},"X Image generator":{"main":[[{"node":"Post image Cloudianry X","type":"main","index":0}]]},"AI Content creator":{"main":[[{"node":"LinkedIn Image generator","type":"main","index":0},{"node":"IG Image generator","type":"main","index":0},{"node":"Edit Fields4","type":"main","index":0},{"node":"FB Image generator","type":"main","index":0},{"node":"Edit Fields5","type":"main","index":0},{"node":"X Image generator","type":"main","index":0},{"node":"Edit Fields7","type":"main","index":0},{"node":"Edit Fields6","type":"main","index":0},{"node":"Add Examples","type":"main","index":0}]]},"FB Image generator":{"main":[[{"node":"Post image Cloudianry FB","type":"main","index":0}]]},"IG Image generator":{"main":[[{"node":"Post image Cloudianry IG","type":"main","index":0}]]},"OpenAI Chat Model2":{"ai_languageModel":[[{"node":"Idea creator","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model3":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Publish Post on IG":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Social Media Content1":{"ai_outputParser":[[{"node":"AI Content creator","type":"ai_outputParser","index":0}]]},"Post image Cloudianry X":{"main":[[{"node":"Merge6","type":"main","index":0}]]},"LinkedIn Image generator":{"main":[[{"node":"Post image Cloudianry LIn","type":"main","index":0}]]},"Post image Cloudianry FB":{"main":[[{"node":"Merge4","type":"main","index":0}]]},"Post image Cloudianry IG":{"main":[[{"node":"Merge3","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Idea creator","type":"ai_outputParser","index":0}]]},"Post image Cloudianry LIn":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]},"Upload media to Instagram":{"main":[[{"node":"Publish Post on IG","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Notion","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Get Brief","type":"main","index":0}]]}}}


name: Competitor Price Monitoring with Web Scraping,Google Sheets & Telegram
author_name: Tony Paul
author_username: tonydatahut
categories: []
created_at: 2025-06-04T03:40:59.974Z
updated_at: 2025-06-04T03:40:59.974Z
url: https://n8n.io/workflows/4640
scraped_at: 2025-06-19 22:48:50
description:
  How it works

  ++Download the google sheet here++ and replace this with the googles sheet node: Google sheet , upload to google sheets and replace in the google sheets node.

  Scheduled trigger: Runs once a day at 8 AM (server time).

  Fetch product list: Reads your “master” sheet (product_url + last known price) from Google Sheets.

  Loop with delay: Iterates over each row (product) one at a time, inserting a short pause (20 s) between HTTP requests to avoid blocking.

  Scrape current price: Loads each product_url, extracts the current price via a simple CSS selector.

  Compare & normalize: Compares the newly scraped price against the “last_price” from your sheet, calculates percentage change, and tags items where price_changed == true.

  On price change:
  Send alert: Formats a Telegram message (“Price Drop” or “Price Hike”) and pushes it to your configured chat.

  Log history: Appends a new row to a separate “price_tracking” tab with timestamp, old price, new price, and % change.

  Update master sheet: After a 1 min pause, writes the updated current_price back to your “master” sheet so future runs use it as the new baseline.

  Set up step
  Google Sheets credentials (~5 min)
  Create a Google Sheets OAuth credential in n8n. 
  Copy your sheet’s ID and ensure you have two tabs: 
  product_data (columns: product_url, price) 
  price_tracking (columns: timestamp, product_url, last_price, current_price, price_diff_pct, price_changed) 
  Paste the sheet ID into both Google Sheets nodes (“Read” and “Append/Update”). 
  Telegram credentials (~5 min) 
  Create a Telegram Bot token via BotFather. 
  Copy your chat_id (for your target group or personal chat). 
  Add those credentials to n8n and drop them into the “Telegram” node.

  Workflow parameters (~5 min)

  Verify the schedule in the Schedule Trigger node is set to 08:00 (or adjust to your preferred run time).

  In the Loop Over Items node, confirm “Batch Size” is 1 (to process one URL at a time).
   
  Adjust the Delay to avoid Request Blocking node if your site requires a longer pause (default is 20 s).
   
  In the Parse Data From The HTML Page node, double-check the CSS selector matches how prices appear on your target site.
   
  Once credentials are in place and your sheet tabs match the expected column names, the flow should be ready to activate. Total setup time is under 15 minutes—detailed notes are embedded as sticky comments throughout the workflow to help you tweak selectors, change timeouts, or adjust sheet names without digging into code.

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

workflow_json:
  {"id":"QAneGL7LmmVuAy1G","meta":{"instanceId":"028ba340313b331f33c6b8294672985ed6da7581a7cf3e60fb843f4e8b653dae","templateCredsSetupCompleted":true},"name":"monitoring competitor prices - for free","tags":[{"id":"3ytagip6FSiGNhyx","name":"video","createdAt":"2025-05-31T12:22:41.809Z","updatedAt":"2025-05-31T12:22:41.809Z"},{"id":"AAeX8YOWlYNI5sCL","name":"production","createdAt":"2025-05-31T12:22:39.329Z","updatedAt":"2025-05-31T12:22:39.329Z"},{"id":"xoQDVZ3WQVEfZeAf","name":"final","createdAt":"2025-05-31T12:22:36.344Z","updatedAt":"2025-05-31T12:22:36.344Z"}],"nodes":[{"id":"780a213c-0e81-4d95-910e-a467f316ebf6","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-2460,160],"parameters":{"width":420,"height":100,"content":"**Fires every morning at 8:00 AM server time to kick off the price-check cycle). Then it Reads the “master” Google Sheet tab, pulling each row’s product_url + last_price for processing**"},"typeVersion":1},{"id":"9b9932ec-8cfd-4096-965b-592b13a1fb8e","name":"Daily 8 AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-2420,290],"parameters":{"rule":{"interval":[{"triggerAtHour":8}]}},"typeVersion":1.2},{"id":"6427045b-8b73-42f0-9dcc-768cbfac9c4a","name":"Fetch Product List from Sheet","type":"n8n-nodes-base.googleSheets","position":[-2200,290],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"Replace with your google sheet url by downloading the googlesheet in the description of this automation","cachedResultName":"product_data"},"documentId":{"__rl":true,"mode":"list","value":"18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4","cachedResultUrl":"https://docs.google.com/spreadsheets/d/18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4/edit?usp=drivesdk","cachedResultName":"competitor_price_drop_automation"}},"credentials":{"googleSheetsOAuth2Api":{"id":"qxXfj438qZiGMViE","name":"Tony@datahut sheet"}},"typeVersion":4.5},{"id":"0b4a1398-bb29-4f42-9475-eb08ab4dabfc","name":"Process Each Product in Batches of 1","type":"n8n-nodes-base.splitInBatches","position":[-1980,290],"parameters":{"options":{"reset":false}},"typeVersion":3},{"id":"ccf9f9ca-b380-457e-9fc2-c6ffe1636984","name":"Pause Between Requests","type":"n8n-nodes-base.wait","position":[-1760,40],"webhookId":"335e69ac-d8ce-4704-a9c6-5a087f2859f8","parameters":{"amount":20},"typeVersion":1.1},{"id":"aa49653b-cf9f-449b-953d-a9a19ac74187","name":"Load Product Page HTML","type":"n8n-nodes-base.httpRequest","position":[-1540,40],"parameters":{"url":"={{ $json.product_url }}","options":{},"jsonHeaders":"{\n  \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:119.0) Gecko/20100101 Firefox/119.0\",\n  \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n  \"Accept-Language\": \"en-IN,en;q=0.9\",\n  \"Accept-Encoding\": \"gzip, deflate, br\"\n}","sendHeaders":true,"specifyHeaders":"json"},"typeVersion":4.2},{"id":"5dbc3d45-96d6-4b71-8d3f-2513f960e265","name":"Extract Current Price from HTML","type":"n8n-nodes-base.html","position":[-1320,40],"parameters":{"options":{},"operation":"extractHtmlContent","extractionValues":{"values":[{"key":"current_price","cssSelector":".price__regular > span.price-item--regular"}]}},"typeVersion":1.2},{"id":"76ad9683-bae1-4f95-af09-44598d9448d1","name":"Normalize Price Values","type":"n8n-nodes-base.code","position":[-1100,40],"parameters":{"jsCode":"// HTML Extract result\nconst scraped = items[0].json;\n\n// Original data from Wait node\nconst original = $items(\"Pause Between Requests\")[0].json;\n\n// Clean and parse price\nconst priceNum = parseFloat((scraped.current_price || \"\").replace(/[^0-9.]+/g, \"\"));\n\n// Original price from Google Sheet\nconst lastPrice = parseFloat(original.price);\n\nreturn [{\n  json: {\n    product_url: original.product_url,\n    row_number: original.row_number,\n    last_price: lastPrice,\n    current_price: priceNum\n  }\n}];\n\n"},"typeVersion":2},{"id":"5feae925-0642-40d1-89be-c220a5a1c8a2","name":"Compute Price Change","type":"n8n-nodes-base.code","position":[-880,40],"parameters":{"jsCode":"// Get the incoming item\nconst item = items[0].json;\n\n// Compute whether the price changed\nconst priceChanged = item.last_price !== item.current_price;\n\n// Calculate percentage difference (will be NaN if last_price is null/0)\nlet priceDiffPct = null;\nif (item.last_price && item.last_price !== 0) {\n  priceDiffPct = (\n    ((item.current_price - item.last_price) / item.last_price) *\n    100\n  ).toFixed(2);\n}\n\n// Return everything, including product_url and last_price\nreturn [\n  {\n    json: {\n      product_url: item.product_url,\n      last_price: item.last_price,\n      current_price: item.current_price,\n      price_changed: priceChanged,\n      price_diff_pct: priceDiffPct !== null ? parseFloat(priceDiffPct) : null,\n      timestamp: new Date().toISOString(),\n    },\n  },\n];\n\n\n\n"},"typeVersion":2},{"id":"5dea2082-d5c5-4c13-8c71-ab7ac498632d","name":"Clean Up Parsed Fields","type":"n8n-nodes-base.code","position":[-660,40],"parameters":{"jsCode":"// Function node: 'items' is an array of incoming items\nif (!items.length) {\n  return [];\n}\n\nconst input = items[0].json;\nconst cleaned = {};\n\nfor (const key in input) {\n  const cleanKey = key.replace(/\\t/g, '').trim();\n  cleaned[cleanKey] = input[key];\n}\n\nreturn [\n  {\n    json: {\n      product_url: cleaned.product_url,\n      last_price: cleaned.last_price,\n      current_price: cleaned.current_price,\n      price_changed: cleaned.price_changed,\n      price_diff_pct: cleaned.price_diff_pct,\n      timestamp: cleaned.timestamp,\n    },\n  },\n];\n\n\n"},"typeVersion":2},{"id":"21c27cb9-c6bc-4cc3-9ad1-3d37fc6fbc3d","name":"Is Price Changed?","type":"n8n-nodes-base.if","position":[-440,40],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"5e285834-82ef-4c77-b96b-97661760f996","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.price_changed}}","rightValue":"true"}]}},"typeVersion":2.2},{"id":"50274daa-48c7-4c58-aaf5-264013582f97","name":"Build Telegram Alert Message","type":"n8n-nodes-base.code","position":[-220,140],"parameters":{"jsCode":"const itemsFormatted = [];\n\nfor (const item of items) {\n  const data = item.json;\n\n  // Determine alert type\n  const isDrop = data.price_diff_pct < 0;\n  const alertType = isDrop ? \"📉 *Price Drop Alert*\" : \"📈 *Price Hike Alert*\";\n\n  // Format timestamp to IST\n  const date = new Date(data.timestamp);\n  const istOffset = 5.5 * 60 * 60 * 1000;\n  const istDate = new Date(date.getTime() + istOffset);\n  const formattedDate = istDate.toLocaleString(\"en-IN\", {\n    day: \"2-digit\",\n    month: \"short\",\n    year: \"numeric\",\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n    hour12: true\n  });\n\n  // Build message\n  const message = `${alertType}\n\n🛍️ *Product:* (${data.product_url})\n💸 *Last Price:* $${data.last_price}\n💰 *Current Price:* $${data.current_price}\n📊 *Change:* ${data.price_diff_pct > 0 ? \"+\" : \"\"}${data.price_diff_pct}%\n🕒 *Time:* ${formattedDate}`;\n\n  itemsFormatted.push({ json: { message } });\n}\n\nreturn itemsFormatted;\n\n\n"},"typeVersion":2},{"id":"f62b1f32-fe79-43c3-ad17-0ff31fcdc489","name":"Log Price History to Sheet","type":"n8n-nodes-base.googleSheets","position":[-220,-60],"parameters":{"columns":{"value":{"last_price":"={{ $json.last_price }}","timestamp\t":"={{ new Date($json.timestamp).toLocaleString('en-IN', {\n  timeZone: 'Asia/Kolkata',\n  day: '2-digit',\n  month: 'short',\n  year: 'numeric',\n  hour: '2-digit',\n  minute: '2-digit',\n  hour12: true\n}) }}\n","product_url":"={{ $json.product_url }}","current_price":"={{ $json.current_price }}","price_diff_pct":"={{ $json.price_diff_pct}}","price_changed        ":"={{ $json.price_changed }}"},"schema":[{"id":"timestamp\t","type":"string","display":true,"required":false,"displayName":"timestamp\t","defaultMatch":false,"canBeUsedToMatch":true},{"id":"product_url","type":"string","display":true,"required":false,"displayName":"product_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"current_price","type":"string","display":true,"removed":false,"required":false,"displayName":"current_price","defaultMatch":false,"canBeUsedToMatch":true},{"id":"last_price","type":"string","display":true,"removed":false,"required":false,"displayName":"last_price","defaultMatch":false,"canBeUsedToMatch":true},{"id":"price_changed        ","type":"string","display":true,"removed":false,"required":false,"displayName":"price_changed        ","defaultMatch":false,"canBeUsedToMatch":true},{"id":"price_diff_pct","type":"string","display":true,"removed":false,"required":false,"displayName":"price_diff_pct","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{"useAppend":true},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":2110110902,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4/edit#gid=2110110902","cachedResultName":"price_tracking"},"documentId":{"__rl":true,"mode":"list","value":"18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4","cachedResultUrl":"https://docs.google.com/spreadsheets/d/18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4/edit?usp=drivesdk","cachedResultName":"competitor_price_drop_automation"}},"credentials":{"googleSheetsOAuth2Api":{"id":"qxXfj438qZiGMViE","name":"Tony@datahut sheet"}},"typeVersion":4.5},{"id":"d5555b69-d7ee-4ab0-a851-5288de0d39cf","name":"Pause Before Updating Sheet","type":"n8n-nodes-base.wait","position":[0,-60],"webhookId":"f8ba192a-211d-4b40-be9c-9994343eb162","parameters":{"unit":"minutes","amount":1},"typeVersion":1.1},{"id":"ade41bb7-fbe3-4e08-a7fa-6c85291dc9fa","name":"Update Last Price in Master Sheet","type":"n8n-nodes-base.googleSheets","position":[220,-60],"parameters":{"columns":{"value":{"price":"={{ $json.current_price }}","product_url":"={{ $json.product_url }}"},"schema":[{"id":"product_url","type":"string","display":true,"removed":false,"required":false,"displayName":"product_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"price","type":"string","display":true,"required":false,"displayName":"price","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":["product_url"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"Replace with your google sheet url by downloading the googlesheet in the description of this automation","cachedResultName":"product_data"},"documentId":{"__rl":true,"mode":"list","value":"18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4","cachedResultUrl":"https://docs.google.com/spreadsheets/d/18ZAjxmwanf6MS7JfrEX6ett6J-tOQi58B257hE6sOS4/edit?usp=drivesdk","cachedResultName":"competitor_price_drop_automation"}},"credentials":{"googleSheetsOAuth2Api":{"id":"qxXfj438qZiGMViE","name":"Tony@datahut sheet"}},"typeVersion":4.5},{"id":"9ebdbe49-fda1-42f5-99d9-a5e1e3ab800f","name":"Send Price Alert via Telegram","type":"n8n-nodes-base.telegram","position":[0,215],"webhookId":"39287ce3-3a7e-4c7e-b8ee-b11ebb83bfb8","parameters":{"text":"={{$json[\"message\"]}}","chatId":"7739958732","additionalFields":{}},"credentials":{"telegramApi":{"id":"aoNA5zsMeU9KNpGg","name":"Telegram Tab Jio"}},"typeVersion":1.2},{"id":"dcb4eff8-9d44-4016-a89a-787be943d0e9","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-2040,440],"parameters":{"height":100,"content":"**Iterates through all products in groups (e.g., 1 at a time) so we don’t overwhelm the target site with parallel requests.**"},"typeVersion":1},{"id":"1a306c68-e652-4d63-b11e-96366c4a59ed","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-1560,-60],"parameters":{"width":360,"height":80,"content":"**fires an HTTP GET for each product_url, then uses a CSS selector to pull the live price text from the returned HTML.**"},"typeVersion":1},{"id":"81f8701a-219f-43a3-aceb-78f2298273cc","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1120,180],"parameters":{"width":380,"height":100,"content":"**Strips currency symbols/commas to convert strings into numbers; compares last_price vs. current_price to calculate % change and set price_changed=true if different**"},"typeVersion":1},{"id":"7fd2108e-5fcb-4ba6-938b-6c940f8a305f","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-740,-100],"parameters":{"width":220,"height":120,"content":"\n**Removes stray whitespace or malformed keys (e.g., stray tabs) so downstream nodes can read fields consistently**"},"typeVersion":1},{"id":"7a525b63-e871-46b9-b0b0-4e25a6c7f2bb","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-540,180],"parameters":{"height":100,"content":"**Only products with price_changed=true proceed to alerting and logging; unchanged items exit here.**"},"typeVersion":1},{"id":"a6352172-9fa3-47b7-8bf0-c948fbe03701","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-180,420],"parameters":{"width":380,"height":80,"content":"\n**Formats a human‐readable message (product name/URL, old vs. new price, % change, timestamp) and pushes it to the configured Telegram chat**\n"},"typeVersion":1},{"id":"90b702f6-6e75-452d-9315-3f70c4157aab","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-200,-160],"parameters":{"width":520,"height":80,"content":"\n**Appends a row to Price_History with timestamp, % change, old vs. new price; then waits 1 minute before overwriting last_price in the master sheet with current_price.**\n"},"typeVersion":1},{"id":"3e3a4498-248d-408e-903b-916a035db039","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[-1300,-520],"parameters":{"width":580,"content":"## Detailed Explanations of this automation\n \nYou can see the detailed step-by-step instructions here:\n\n- [Free n8n Web Scraping Competitor Price Tracking](https://www.blog.datahut.co/post/free-n8n-web-scraping-competitor-price-tracking)\n- [YouTube Tutorial](https://www.youtube.com/watch?v=a9esT732mmE)\n\n\n\n\n\n\nIs this conversation helpful so far?\n\n\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"2c1bce5e-8208-42c3-8fe8-308b5855695c","connections":{"Is Price Changed?":{"main":[[{"node":"Build Telegram Alert Message","type":"main","index":0},{"node":"Log Price History to Sheet","type":"main","index":0}]]},"Daily 8 AM Trigger":{"main":[[{"node":"Fetch Product List from Sheet","type":"main","index":0}]]},"Compute Price Change":{"main":[[{"node":"Clean Up Parsed Fields","type":"main","index":0}]]},"Clean Up Parsed Fields":{"main":[[{"node":"Is Price Changed?","type":"main","index":0}]]},"Load Product Page HTML":{"main":[[{"node":"Extract Current Price from HTML","type":"main","index":0},{"node":"Process Each Product in Batches of 1","type":"main","index":0}]]},"Normalize Price Values":{"main":[[{"node":"Compute Price Change","type":"main","index":0}]]},"Pause Between Requests":{"main":[[{"node":"Load Product Page HTML","type":"main","index":0}]]},"Log Price History to Sheet":{"main":[[{"node":"Pause Before Updating Sheet","type":"main","index":0}]]},"Pause Before Updating Sheet":{"main":[[{"node":"Update Last Price in Master Sheet","type":"main","index":0}]]},"Build Telegram Alert Message":{"main":[[{"node":"Send Price Alert via Telegram","type":"main","index":0}]]},"Fetch Product List from Sheet":{"main":[[{"node":"Process Each Product in Batches of 1","type":"main","index":0}]]},"Send Price Alert via Telegram":{"main":[[{"node":"Process Each Product in Batches of 1","type":"main","index":0}]]},"Extract Current Price from HTML":{"main":[[{"node":"Normalize Price Values","type":"main","index":0}]]},"Process Each Product in Batches of 1":{"main":[[],[{"node":"Pause Between Requests","type":"main","index":0}]]}}}


name: Summarize Calls & Notify Teams via HubSpot, Slack, Email, WhatsApp
author_name: Encoresky
author_username: encoresky
categories: []
created_at: 2025-06-04T08:02:04.432Z
updated_at: 2025-06-04T08:02:04.432Z
url: https://n8n.io/workflows/4641
scraped_at: 2025-06-19 22:49:00
description:
  This workflow automates the process of handling conversation transcriptions and distributing key information across your organization. Here's what it does:

  Trigger: The workflow is initiated via a webhook that receives a transcription (e.g., from a call or meeting).

  Summarization & Extraction: Using AI, the transcription is summarized, and key information is extracted — such as action items, departments involved, and client details.

  Department Notifications: The relevant summarized information is automatically routed to specific departments via email based on content classification.

  CRM Sync: The summarized version is saved to the associated contact or deal in HubSpot for future reference and visibility.

  *Multi-Channel Alerts: *The summary is also sent via WhatsApp and Slack to keep internal teams instantly informed, regardless of platform.

  Use Case:
  Ideal for sales, customer service, or operations teams who manage client conversations and want to ensure seamless cross-departmental communication, documentation, and follow-up.

  Apps Used:

  Webhook (Trigger)

  OpenAI (or other AI/NLP for summarization)

  HubSpot

  Email

  Slack

  WhatsApp (via Twilio or third-party provider)

nodes_used:
  ["n8n-nodes-base.slack","n8n-nodes-base.hubspot","n8n-nodes-base.whatsApp","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.chainSummarization","@n8n/n8n-nodes-langchain.lmChatOpenAi"]

workflow_json:
  {"id":"Gn5M1FfXUAVy6h9l","meta":{"instanceId":"f70454a5d1bedfb04805f13a51a4a63e308e7fc8821155a97e93d697feaee047","templateCredsSetupCompleted":true},"tags":[],"nodes":[{"id":"3d621f41-b73a-406a-bfda-fac0d2ed1499","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[800,340],"parameters":{"color":4,"width":540,"height":560,"content":"## Router agent\nMakes decisions with the help of an LLM  \n- Analyzes the content\n- Decides which part of the transcript is relevant to the different departments\n- Sends the emails to the departments\n"},"typeVersion":1},{"id":"249c22aa-58ca-40df-9157-7a00fbfd3dff","name":"Router Agent","type":"@n8n/n8n-nodes-langchain.agent","notes":"Route the client feedback topics to the relevant department ","position":[960,540],"parameters":{"text":"={{ $('Webhook').item.json.body['Client Conversation'] }}","options":{"systemMessage":"=You are provided with some client-company conversation and should decide who has to be informed about the feedback. Always only inform one person. Those are your options: \n- It's about a product, send an email to {{ $('Define routing emails').item.json['Support Email'] }}\n- It's about an invoicing problem, send an email to {{ $('Define routing emails').item.json['Administrative Email'] }}\n- It's  related to a travelling/trip, send an email to {{ $('Define routing emails').item.json['Commercial Email'] }}\n\nAdd the email of the person (\"{{ $('Webhook').item.json.body['Client Email'] }}\") at the beginning of the text preceded by \"FROM CLIENT: \"\nUse the Mailjet tool to inform each of the most related department. Provide mailjet with a subject, an email, and the email body formated as html which is the client conversation itself."},"promptType":"define"},"notesInFlow":true,"typeVersion":1.8},{"id":"cffeafac-75e0-4a60-91d3-0a7d3bdb7371","name":"Summarization","type":"@n8n/n8n-nodes-langchain.chainSummarization","notes":"The transcript summarized here","position":[360,140],"parameters":{"options":{"summarizationMethodAndPrompts":{"values":{"prompt":"=Summarize the following Converstaion in 2-3 sentences:\n\n\"{{ $('Webhook').item.json.body['Client Conversation'] }}\"\n\nJust output the summarized conversation and nothing else. Use the same language as the input","summarizationMethod":"stuff"}}}},"notesInFlow":true,"typeVersion":2,"alwaysOutputData":false},{"id":"ac5a16de-efb5-4603-bb52-2d85b007bf86","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[460,420],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"7mydLbpOJgXQKswc","name":"OpenAi account"}},"typeVersion":1.2},{"id":"8644b46e-b64c-415b-acfc-103ef5c71903","name":"Gmail","type":"n8n-nodes-base.gmailTool","position":[1040,760],"webhookId":"be3ad85f-a576-44d6-9383-6a038edfb25a","parameters":{"sendTo":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}","message":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}","options":{"appendAttribution":false},"subject":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}"},"credentials":{"gmailOAuth2":{"id":"Eo7V1LrxcAy38kKf","name":"Harsh"}},"typeVersion":2.1},{"id":"b02e1dad-6f07-4215-a89b-fb0763232bcb","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-20,40],"parameters":{"color":4,"width":260,"height":260,"content":"## Set emails here\nFor each responsible person"},"typeVersion":1},{"id":"fec711e6-837a-4722-83b9-dc838770fcb3","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-300,40],"parameters":{"color":4,"width":260,"height":260,"content":"## Webhook \nTo be used to send the transcription."},"typeVersion":1},{"id":"2af225aa-95b9-4578-9c8c-0c49bb5e8510","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[800,40],"parameters":{"color":4,"width":540,"height":280,"content":"## Save transcription to Hubspot\n- Search for the client ID based on his email\n- Upload the summarized conversation as meeting notes"},"typeVersion":1},{"id":"fb226ebf-b62f-48ef-b291-17b4beb30ebc","name":"Slack","type":"n8n-nodes-base.slack","position":[880,-160],"webhookId":"ffba5d59-965e-4042-a5cd-d6d89c443e75","parameters":{"text":"=Below is the latest summary.\n\n{{ $json.response.text }}","select":"channel","channelId":{"__rl":true,"mode":"list","value":"C08VCE4AYNL","cachedResultName":"n8n"},"otherOptions":{},"authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"SbSspavlddGUo8F0","name":"Slack account"}},"typeVersion":2.3},{"id":"5622a2af-726d-468c-88b2-22d66a449128","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[800,-280],"parameters":{"color":4,"width":540,"height":300,"content":"## Send the summary to Slack and WhatsApp\n- Configure Slack Channel\n- Configure WhatsApp Recepient"},"typeVersion":1},{"id":"d8b2181f-1c52-417b-9fdd-776e64a920ab","name":"WhatsApp Business Cloud","type":"n8n-nodes-base.whatsApp","position":[1120,-160],"webhookId":"36dba7ba-f6f2-45a0-ad5d-cfd5c1622a49","parameters":{"template":"n8n_workflow_latest|en","components":{"component":[{"bodyParameters":{"parameter":[{"text":"={{ $('Webhook').item.json.body['Your Name'] }}"},{"text":"={{ $('Summarization').item.json.response.text }}"}]}}]},"phoneNumberId":"702894569566382","recipientPhoneNumber":"={{ $('Webhook').item.json.body['WhatsApp Contact Number'] }}"},"credentials":{"whatsAppApi":{"id":"bvkhSq7q9MuoWneA","name":"WhatsApp account"}},"typeVersion":1},{"id":"039c62d8-3a33-4436-9577-e2dc45f9e694","name":"Webhook","type":"n8n-nodes-base.webhook","position":[-220,140],"webhookId":"1ffeacc2-1dbd-4a9e-bf3f-6811ddd31642","parameters":{"path":"1ffeacc2-1dbd-4a9e-bf3f-6811ddd31642","options":{},"httpMethod":"POST"},"typeVersion":2},{"id":"941ea710-68a5-46c7-b622-bf88b96430a7","name":"Define routing emails","type":"n8n-nodes-base.set","position":[60,140],"parameters":{"options":{},"assignments":{"assignments":[{"id":"099d5326-3452-47b8-9dc0-acc0e6fd951e","name":"Support Email","type":"string","value":"info@encoresky.com"},{"id":"4ed84290-dbf7-47f7-8693-4f95e0c2fd7e","name":"Administrative Email","type":"string","value":"hr@encoresky.com"},{"id":"614d4a5c-c9f2-4d82-bfcb-cfdcc8a4b07d","name":"Commercial Email","type":"string","value":"sales@encoresky.com"}]}},"typeVersion":3.4},{"id":"8af03b9d-b647-4d4c-8903-dd32e4b6a434","name":"HubSpot Search Client","type":"n8n-nodes-base.hubspot","notes":"Search for the id","position":[880,160],"parameters":{"operation":"search","authentication":"oAuth2","filterGroupsUi":{"filterGroupsValues":[{"filtersUi":{"filterValues":[{"value":"={{ $('Webhook').item.json.body['Client Email'] }}","propertyName":"email|string"}]}}]},"additionalFields":{}},"credentials":{"hubspotOAuth2Api":{"id":"pQcxnwCMnLiFiQOJ","name":"HubSpot account"}},"notesInFlow":true,"typeVersion":2.1},{"id":"cb2bb828-ca8c-473a-a485-c8cde6116388","name":"HubSpot Save Notes","type":"n8n-nodes-base.hubspot","notes":"Add meeting notes in the contact form","position":[1120,160],"parameters":{"type":"meeting","metadata":{"body":"={{ $('Summarization').item.json.response.text }}","title":"New meeting"},"resource":"engagement","authentication":"oAuth2","additionalFields":{"associations":{"contactIds":"={{ $json.properties.hs_object_id }}"}}},"credentials":{"hubspotOAuth2Api":{"id":"pQcxnwCMnLiFiQOJ","name":"HubSpot account"}},"notesInFlow":true,"typeVersion":2.1}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"428e832a-7b0e-4e88-9695-6d793067deb8","connections":{"Gmail":{"ai_tool":[[{"node":"Router Agent","type":"ai_tool","index":0}]]},"Slack":{"main":[[{"node":"WhatsApp Business Cloud","type":"main","index":0}]]},"Webhook":{"main":[[{"node":"Define routing emails","type":"main","index":0}]]},"Router Agent":{"main":[[]]},"Summarization":{"main":[[{"node":"Router Agent","type":"main","index":0},{"node":"HubSpot Search Client","type":"main","index":0},{"node":"Slack","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Summarization","type":"ai_languageModel","index":0},{"node":"Router Agent","type":"ai_languageModel","index":0}]]},"Define routing emails":{"main":[[{"node":"Summarization","type":"main","index":0}]]},"HubSpot Search Client":{"main":[[{"node":"HubSpot Save Notes","type":"main","index":0}]]}}}


name: SSL Certificate Expiry Notifier (No Paid APIs)
author_name: Evoort Solutions
author_username: evoortsolutions
nodes_used: ["n8n-nodes-base.emailSend","n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-06-04T09:49:31.793Z
updated_at: 2025-06-04T09:49:31.793Z
url: https://n8n.io/workflows/4643
scraped_at: 2025-06-19 22:49:15
description:
  Great — here’s a complete Workflow Description for your n8n Creator submission based on the JSON you shared:

  🔒 SSL Expiry Notifier (No Paid APIs)

  🧩 How it Works

  This workflow automatically checks SSL certificate expiry dates for a list of websites and sends timely email alerts if any certificate is close to expiring. It’s ideal for DevOps, IT Operations, or Web Admin teams to stay ahead of certificate issues —
   without relying on any paid API services.

  Here's the high-level logic:

  Trigger: Runs daily at 8 AM using the Schedule Trigger node.
  Fetch URLs: Reads URLs to monitor from a Google Sheet.
  Check SSL: Calls the free ssl-checker.io API to retrieve SSL certificate details (valid from, valid till, days left).
  Conditional Check: Filters any certificates expiring in 7 days or less.
  Send Email: Sends a styled HTML email alert to predefined recipients.
  Update Sheet: Updates the same Google Sheet with the latest SSL info for each domain.

  ⚙️ Set Up Steps (Quick Overview)

  🕐 Estimated setup time: \~10–15 minutes

  Connect Google Sheets – OAuth2 credentials required. Sheet must include a column titled URL with domains to monitor.
  Set Up SMTP – Add your email credentials under the SMTP node to enable notifications.
  Optional – Customize the threshold days in the "Expiry Alert" IF node if you want alerts for a different timeframe.
  Deploy and Activate – That’s it. Once active, the flow runs automatically every day.

  💡 Detailed field mappings and logic notes are included inside the workflow as sticky notes.

  🚀 Ready to Get Started?

  Let’s start your journey on n8n by creating your free account here.  

workflow_json:
  {"id":"NTSkPEG2pcvG3qoH","meta":{"instanceId":"60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752","templateCredsSetupCompleted":true},"name":"SSL Expiry Notifier","tags":[{"id":"b2GfRjIENZV9WKpD","name":"IT Ops","createdAt":"2025-05-29T08:33:47.664Z","updatedAt":"2025-05-29T08:33:47.664Z"},{"id":"sfoRiNMRAXjQ31IO","name":"DevOps","createdAt":"2025-05-29T08:33:47.654Z","updatedAt":"2025-05-29T08:33:47.654Z"}],"nodes":[{"id":"b8c160c6-29a3-4b7d-ab78-e126206627b1","name":"URLs to Monitor","type":"n8n-nodes-base.googleSheets","position":[60,140],"parameters":{"columns":{"value":{"URL":"={{ $json.result.host }}","Days Left":"={{ $json.result.days_left }}","Valid From":"={{ $json.result.valid_from }}","Valid Till":"={{ $json.result.valid_till }}"},"schema":[{"id":"URL","type":"string","display":true,"removed":false,"required":false,"displayName":"URL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Valid From","type":"string","display":true,"required":false,"displayName":"Valid From","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Valid Till","type":"string","display":true,"required":false,"displayName":"Valid Till","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Days Left","type":"string","display":true,"required":false,"displayName":"Days Left","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":["URL"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"url","value":"https://docs.google.com/spreadsheets/d/1TakDfkHpgB8qQcvy98mgUfEsEZGnIVNlkwqnsWhGDwI/edit?gid=0#gid=0","__regex":"https:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/[0-9a-zA-Z\\-_]+.*\\#gid=([0-9]+)"},"documentId":{"__rl":true,"mode":"url","value":"https://docs.google.com/spreadsheets/d/1TakDfkHpgB8qQcvy98mgUfEsEZGnIVNlkwqnsWhGDwI/edit?gid=0#gid=0"}},"credentials":{"googleSheetsOAuth2Api":{"id":"kXiWCpzbScflZGmW","name":"Google Sheets account"}},"typeVersion":4.5,"alwaysOutputData":true},{"id":"21c4d282-5bb4-4d34-8cad-28e4e91843be","name":"Fetch URLs","type":"n8n-nodes-base.googleSheets","position":[-640,400],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"url","value":"https://docs.google.com/spreadsheets/d/1TakDfkHpgB8qQcvy98mgUfEsEZGnIVNlkwqnsWhGDwI/edit?gid=0#gid=0"},"documentId":{"__rl":true,"mode":"url","value":"https://docs.google.com/spreadsheets/d/1TakDfkHpgB8qQcvy98mgUfEsEZGnIVNlkwqnsWhGDwI/edit?gid=0#gid=0"}},"credentials":{"googleSheetsOAuth2Api":{"id":"kXiWCpzbScflZGmW","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"3d6ebf5c-a89d-4890-ab64-01c6db1d8486","name":"Check SSL","type":"n8n-nodes-base.httpRequest","position":[-380,400],"parameters":{"url":"=https://ssl-checker.io/api/v1/check/{{ $json[\"URL\"].replace(/^https?:\\/\\//, \"\").replace(/\\/$/, \"\") }}","options":{}},"typeVersion":4.2},{"id":"1b7427f1-41aa-4aea-8a98-dccb44e958e0","name":"Expiry Alert","type":"n8n-nodes-base.if","position":[60,620],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ee6e2ce8-569a-4f1f-91b5-2c55f605a16b","operator":{"type":"number","operation":"lte"},"leftValue":"={{ $json.result.days_left }}","rightValue":7}]}},"typeVersion":2.2},{"id":"8efd16a5-ff9e-4138-aa70-ebd087fb27ef","name":"Send Email","type":"n8n-nodes-base.emailSend","position":[360,400],"webhookId":"64bfb82b-e70f-4831-87b9-599d9187ec4a","parameters":{"html":"=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f9;\n            color: #333;\n            margin: 0;\n            padding: 0;\n        }\n        .container {\n            width: 100%;\n            max-width: 600px;\n            margin: 20px auto;\n            padding: 20px;\n            background-color: #ffffff;\n            border-radius: 8px;\n            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n        }\n        .header {\n            text-align: center;\n            color: #4CAF50;\n        }\n        .header h1 {\n            font-size: 24px;\n            margin: 0;\n        }\n        .message {\n            font-size: 16px;\n            margin: 20px 0;\n            padding: 10px;\n            background-color: #e3f2fd;\n            border-left: 5px solid #2196F3;\n        }\n        .highlight {\n            color: #d32f2f;\n            font-weight: bold;\n        }\n        .footer {\n            text-align: center;\n            font-size: 14px;\n            color: #888;\n            margin-top: 30px;\n        }\n        .footer a {\n            color: #2196F3;\n            text-decoration: none;\n        }\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <div class=\"header\">\n            <h1>SSL Certificate Expiry Notice</h1>\n        </div>\n        <div class=\"message\">\n            <p>Dear Team,</p>\n            <p>The SSL certificate for the website <strong>{{ $json.result.host }}</strong> is set to expire in <span class=\"highlight\">{{ $json.result.days_left }}</span> days.</p>\n            <p>Please take the necessary actions to renew the certificate and ensure uninterrupted service.</p>\n        </div>\n        <div class=\"footer\">\n            <p>Best regards,<br>The IT Operations Team</p>\n        </div>\n    </div>\n</body>\n</html>\n","options":{},"subject":"=SSL Expiry - {{ $json.result.days_left }} Days Left - {{ $json.result.host }}","toEmail":"=team1@gmail.com,team2@gmail.com","fromEmail":"admin@gmail.com"},"credentials":{"smtp":{"id":"H0f4Gja9ECFRA34L","name":"SMTP account 2"}},"typeVersion":2.1},{"id":"7ce561b1-1102-4fc1-972b-7dca1793e023","name":"Daily Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-900,400],"parameters":{"rule":{"interval":[{"triggerAtHour":8}]}},"typeVersion":1.2},{"id":"12d2c49f-9d56-4ace-bc06-82ea850df133","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1620,-380],"parameters":{"width":500,"height":1240,"content":"## 🔐 SSL Expiry Notifier (No Paid APIs)\n\n### 👤 Who is this for?\nThis workflow is designed for IT admins, DevOps engineers, and web professionals who need to **monitor SSL certificate expirations** across multiple domains — **without relying on paid APIs**.\n\n---\n\n### 🧩 What It Does\n1. **Daily Trigger** runs the workflow every morning.\n2. **Google Sheets Integration** fetches the list of website URLs to monitor.\n3. **Free SSL API Check** (`ssl-checker.io`) is used to retrieve certificate validity data.\n4. **Certificate Details** (valid from, valid till, days left) are updated back into the same Google Sheet.\n5. **If Condition** checks if the SSL certificate expires in ≤7 days.\n6. **Email Alert** is sent automatically for soon-to-expire certificates.\n\n---\n\n### ⚙️ Setup Instructions\n1. **Google Sheets**:  \n   - Clone the sample sheet or use your own.  \n   - Update the Sheet URL in the `Fetch URLs` and `Update Sheet` nodes.  \n   - Ensure it contains a `URL` column.\n\n2. **Credentials**:  \n   - Connect your **Google account** (for Sheets) and **SMTP credentials** (for email notifications).\n\n3. **Customize**:  \n   - Change the alert threshold in the **IF node** (currently set to 7 days).  \n   - Modify recipient list and message style in the **Send Email** node.\n\n---\n\n### 🧠 Notes\n- Uses **ssl-checker.io**, a **free public API** — no paid services needed.  \n- Flexible and self-hosted monitoring solution.  \n- Ideal for small teams managing multiple domains.\n"},"typeVersion":1},{"id":"68db9999-8a66-479f-8708-c2b9b6556a76","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1000,220],"parameters":{"height":320,"content":"### 🕒 Daily Trigger\nRuns the workflow every day at 8:00 AM.  \nAdjust the time or frequency as needed using cron or interval settings.\n"},"typeVersion":1},{"id":"b39cd547-196f-48ea-b7b5-8b09561032ce","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-700,220],"parameters":{"height":320,"content":"### 📄 Fetch URLs\nReads website URLs from a Google Sheet.  \nMake sure the sheet has a column named `URL` containing the domains you want to monitor.\n"},"typeVersion":1},{"id":"455e64c4-38da-4965-bfd6-b11a699243b1","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-420,220],"parameters":{"height":320,"content":"### 🔍 Check SSL\nQueries `ssl-checker.io` (free API) for SSL certificate data of each domain.  \nReturns valid_from, valid_till, days_left, and host info.\n"},"typeVersion":1},{"id":"51b3423d-ea6e-4878-9d2e-177e04222100","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[0,460],"parameters":{"height":300,"content":"### ⚠️ Expiry Alert\nChecks if `days_left` is less than or equal to 7.  \nOnly domains that meet this condition will trigger an email alert.\n"},"typeVersion":1},{"id":"17cfd4d8-cbfe-46f0-bdf1-3a89f557200b","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[300,220],"parameters":{"height":320,"content":"### 📧 Send Email\nSends an email to the specified recipients if a certificate is expiring soon.  \nThe message includes days left and the domain name in an HTML template.\n"},"typeVersion":1},{"id":"64c0883c-223f-4276-886b-d9996aa099dd","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[0,-60],"parameters":{"height":400,"content":"### 🔄 Update Sheet\nUpdates the original Google Sheet with new certificate data:\n- Valid From\n- Valid Till\n- Days Left  \nMatches by URL to ensure correct row is updated.\n"},"typeVersion":1}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"f02670ca-1476-4eb6-acac-205630fa2b1c","connections":{"Check SSL":{"main":[[{"node":"URLs to Monitor","type":"main","index":0},{"node":"Expiry Alert","type":"main","index":0}]]},"Fetch URLs":{"main":[[{"node":"Check SSL","type":"main","index":0}]]},"Send Email":{"main":[[]]},"Expiry Alert":{"main":[[{"node":"Send Email","type":"main","index":0}]]},"Daily Trigger":{"main":[[{"node":"Fetch URLs","type":"main","index":0}]]}}}


name: Create AI-Powered Website Chatbot with Langflow Backend and Custom Branding
author_name: Davide
author_username: n3witalia
nodes_used: ["n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-06-04T10:02:44.761Z
updated_at: 2025-06-04T10:02:44.761Z
url: https://n8n.io/workflows/4645
scraped_at: 2025-06-19 22:49:02
description:
  This workflow integrates a chatbot frontend with a backend powered by Langflow, a visual low-code AI development tool. The flow is triggered whenever a chat message is received via the n8n chatbot widget embedded on a website. It then sends the message to a Langflow flow for processing and returns the generated response to the user.

  How It Works  
  Chat Trigger: The workflow starts with a webhook trigger (When chat message received) that listens for incoming chat messages from the n8n Chat interface.  
  Langflow Integration: The chat input is sent to a Langflow instance via an HTTP request (Langflow node). The request includes the user's message and expects a response from the Langflow flow.  
  Response Processing: The output from Langflow is extracted and formatted using the Edit Fields node, ensuring the chatbot displays the response correctly.  
  Customization: Sticky notes provide instructions for embedding the n8n Chat widget on a website and customizing its appearance, including welcome messages, language settings, and branding.  

  Set Up Steps  
  Configure Langflow Connection:  
     Replace LANGFLOW_URL and FLOW_ID in the HTTP request node with your Langflow instance details.  
     Ensure the API headers (e.g., Content-Type: application/json) and authentication (if required) are correctly set.  

  Deploy n8n Chat:  
     Add the provided CDN script to your website, replacing YOUR_PRODUCTION_WEBHOOK_URL with the webhook URL generated by the When chat message received node.  
     Customize the chatbot’s UI (e.g., title, placeholder text, initial messages) using the JavaScript snippet in the sticky notes.  

  Activate Workflow:  
     Toggle the workflow to "Active" in n8n.  
     Test the chatbot by sending a message and verifying the Langflow response is processed and displayed correctly.  

  Advantages

  ✅ Seamless Langflow Integration
  It allows n8n to communicate directly with a Langflow flow via API, enabling AI responses using custom-designed Langflow logic.

  ✅ No-Code Chatbot Deployment
  With just a script snippet, the chatbot widget can be embedded into any website. Minimal coding is required to launch a fully functioning AI chatbot.

  ✅ Customizable UI/UX
  The included embed code offers full control over the chatbot's appearance, language, welcome message, input placeholder, and branding—ideal for white-label or customer-facing deployments.

  ✅ Modular and Extensible
  Because it's built in n8n, this chatbot can be easily extended with other services like CRMs, email alerts, or databases, without leaving the platform.

  ✅ Real-Time AI Interactions
  Thanks to Langflow's API and chat response support, users get immediate and dynamic AI-driven replies.

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

workflow_json:
  {"id":"jChHsZ0OR79bITzc","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462","templateCredsSetupCompleted":true},"name":"Import Langflow Flow in n8n Chatbot and Branded it","tags":[],"nodes":[{"id":"5d3d611f-72e9-43b4-98ee-d4e10cd7591d","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-720,0],"webhookId":"560cad1a-7d5c-43ae-818e-1ff432e4cae4","parameters":{"mode":"webhook","public":true,"options":{"allowedOrigins":"*"}},"typeVersion":1.1},{"id":"9bc309e9-0878-4140-8a2c-fadb51e3dd65","name":"Edit Fields","type":"n8n-nodes-base.set","position":[-280,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"6a50a699-9598-452a-bc38-a87e2be9084c","name":"output","type":"string","value":"={{ $json.outputs[0].outputs[0].results.message.data.text }}"}]}},"typeVersion":3.4},{"id":"fe301be1-4845-4e76-aee8-27c61bf894e1","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-740,-340],"parameters":{"color":6,"width":720,"height":220,"content":"### Enable n8n CDN on your website\n<link href=\"https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css\" rel=\"stylesheet\" />\n<script type=\"module\">\n\timport { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';\n\n\tcreateChat({\n\t\twebhookUrl: 'YOUR_PRODUCTION_WEBHOOK_URL'\n\t});\n</script>"},"typeVersion":1},{"id":"ca73efeb-bdbd-4824-9b3f-b6222d1db010","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-740,-960],"parameters":{"color":3,"width":720,"height":600,"content":"## Langflow\n\nLangflow is a low-code, visual development platform designed to help users build and deploy AI applications with minimal coding. It provides an intuitive drag-and-drop interface, allowing users to create complex AI workflows by connecting reusable components. Langflow supports integration with various APIs, language models, and databases, making it versatile for tasks such as chatbots, document Q&A systems, and content generation. Its Python-based architecture ensures compatibility with popular AI frameworks and tools, facilitating rapid prototyping and deployment of AI solutions.\n\n### Basic Langflow Flow:\n![image](https://n3wstorage.b-cdn.net/test/langflow_flow.png)"},"typeVersion":1},{"id":"edd68237-94c1-4b21-ac10-fac5512dc7e0","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[0,-960],"parameters":{"color":6,"width":800,"height":840,"content":"### Customize n8n Chatbot\n\n```js\ncreateChat({\n\twebhookUrl: '',\n\twebhookConfig: {\n\t\tmethod: 'POST',\n\t\theaders: {}\n\t},\n\ttarget: '#n8n-chat',\n\tmode: 'window',\n\tchatInputKey: 'chatInput',\n\tchatSessionKey: 'sessionId',\n\tmetadata: {},\n\tshowWelcomeScreen: false,\n\tdefaultLanguage: 'en',\n\tinitialMessages: [\n\t\t'Hi there! 👋',\n\t\t'My name is Nathan. How can I assist you today?'\n\t],\n\ti18n: {\n\t\ten: {\n\t\t\ttitle: 'Hi there! 👋',\n\t\t\tsubtitle: \"Start a chat. We're here to help you 24/7.\",\n\t\t\tfooter: '',\n\t\t\tgetStarted: 'New Conversation',\n\t\t\tinputPlaceholder: 'Type your question..',\n\t\t},\n\t},\n});\n```"},"typeVersion":1},{"id":"0fb9d211-07fd-4309-b91c-aa21e877a915","name":"Langflow","type":"n8n-nodes-base.httpRequest","position":[-500,0],"parameters":{"url":"https://LANGFLOW_URL/api/v1/run/FLOW_ID?stream=false","method":"POST","options":{},"jsonBody":"={\n  \"input_value\": \"{{ $json.chatInput }}\",\n  \"output_type\": \"chat\",\n  \"input_type\": \"chat\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"u4ZE9bSDfxZX3Ljj","name":"Langflow API"}},"typeVersion":4.2},{"id":"705ecc2a-b0af-4165-8ef3-c693e82cd1ce","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-560,-60],"parameters":{"height":220,"content":"Set LANGFLOW_URL and FLOW_ID"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"6fe12868-d03f-4c86-a472-3b5ce254d4ef","connections":{"Langflow":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"Langflow","type":"main","index":0}]]}}}


name: Create a Branded AI Chatbot for Websites with Flowise Multi-Agent Chatflows
author_name: Davide
author_username: n3witalia
nodes_used: ["n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-06-04T13:42:57.244Z
updated_at: 2025-06-04T13:42:57.244Z
url: https://n8n.io/workflows/4651
scraped_at: 2025-06-19 22:49:27
description:
  This workflow integrates Flowise Multi-Agent Chatflows into a custom-branded n8n chatbot, enabling real-time interaction between users and AI agents powered by large language models (LLMs).

  Key Advantages:

  ✅ Easy Integration with Flowise:

  Uses a low-code HTTP node to send user questions to Flowise's API (/api/v1/prediction/FLOWISE_ID) and receive intelligent responses.
  Supports multi-agent chatflows, allowing for complex, dynamic interactions.

  🎨 Customizable Chatbot UI:

  Includes pre-built JavaScript for embedding the n8n chatbot into any website.
  Provides customization options such as welcome messages, branding, placeholder text, chat modes (e.g., popup or embedded), and language support.

  🔐 Secure & Configurable:

  Authorization via Bearer token headers for Flowise API access.
  Clearly marked notes in the workflow for setting environment variables like FLOWISE_URL and FLOW_ID.

  How It Works  
  Chat Trigger: The workflow starts with the When chat message received node, which acts as a webhook to receive incoming chat messages from users.  
  HTTP Request to Flowise: The received message is forwarded to the Flowise node, which sends a POST request to a Flowise API endpoint (https://FLOWISEURL/api/v1/prediction/FLOWISE_ID). The request includes the user's input as a JSON payload ({"question": "{{ $json.chatInput }}"}) and uses HTTP header authentication (e.g., Authorization: Bearer FLOWSIE_API).  
  Response Handling: The response from Flowise is passed to the Edit Fields node, which maps the output ($json.text) for further processing or display.  

  Set Up Steps  
  Configure Flowise Integration:  
     Replace FLOWISEURL and FLOWISE_ID in the HTTP Request node with your Flowise instance URL and flow ID.  
     Ensure the Authorization header is set correctly in the credentials (e.g., Bearer FLOWSIE_API).  

  Embed n8n Chatbot:  
     Use the provided JavaScript snippet in the sticky notes to embed the n8n chatbot on your website. Replace YOUR_PRODUCTION_WEBHOOK_URL with the webhook URL generated by the When chat message received node.  
     Customize the chatbot's appearance and behavior (e.g., welcome messages, language, UI elements) using the createChat configuration options.  

  Optional Branding:  
     Adjust the sticky note examples to include branding details, such as custom messages, colors, or metadata for the chatbot.  

  Activate Workflow:  
     Toggle the workflow to "Active" in n8n and test the chat functionality end-to-end.  

  Ideal Use Cases:

  Embedding branded AI assistants into websites.
  Connecting Flowise-powered agents with customer support chatbots.
  Creating dynamic, smart conversational flows with LLMs via n8n automation.

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

workflow_json:
  {"id":"IlTvU5j9eLTYb06I","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462","templateCredsSetupCompleted":true},"name":"Import Flowise Multi-Agent Chatflows in n8n Chatbot and Branded it","tags":[],"nodes":[{"id":"4eebb2dd-0879-4ee3-aa07-f5bc180f3afd","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-720,0],"webhookId":"8465c3be-42ca-4489-8dde-815812206e61","parameters":{"mode":"webhook","public":true,"options":{"allowedOrigins":"*"}},"typeVersion":1.1},{"id":"cdd4781a-fb3a-492d-80a4-d75841dd458c","name":"Edit Fields","type":"n8n-nodes-base.set","position":[-280,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"6a50a699-9598-452a-bc38-a87e2be9084c","name":"output","type":"string","value":"={{ $json.text }}"}]}},"typeVersion":3.4},{"id":"f63fd39c-014b-428d-81a5-f7a675dbfeac","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[20,-960],"parameters":{"color":6,"width":800,"height":220,"content":"### Enable n8n CDN on your website\n<link href=\"https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css\" rel=\"stylesheet\" />\n<script type=\"module\">\n\timport { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';\n\n\tcreateChat({\n\t\twebhookUrl: 'YOUR_PRODUCTION_WEBHOOK_URL'\n\t});\n</script>"},"typeVersion":1},{"id":"209a551f-cb0e-42ae-a53d-78a1e2d96640","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-740,-960],"parameters":{"color":3,"width":720,"height":780,"content":"## Flowise\n\nFlowise is an open-source, low-code/no-code platform designed to simplify the creation of AI agents and applications powered by large language models (LLMs). It offers a visual interface that allows users to build complex AI workflows without extensive programming knowledge.\n\nFlowise supports integration with various LLM frameworks and tools, making it a versatile choice for building AI-driven applications across different domains.\n\n### Basic Flowise Multi-Agent Chatflows:\n![image](https://i.postimg.cc/ydPSYcMD/flowise.png)\n\nSet Header-Auth Name: Authorization and Value: Bearer FLOWSIE_API"},"typeVersion":1},{"id":"214da305-e6d2-4a1b-9ebf-572f122ba219","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[20,-720],"parameters":{"color":6,"width":800,"height":540,"content":"### Customize n8n Chatbot\n\n```js\ncreateChat({\n\twebhookUrl: '',\n\twebhookConfig: {\n\t\tmethod: 'POST',\n\t\theaders: {}\n\t},\n\ttarget: '#n8n-chat',\n\tmode: 'window',\n\tchatInputKey: 'chatInput',\n\tchatSessionKey: 'sessionId',\n\tmetadata: {},\n\tshowWelcomeScreen: false,\n\tdefaultLanguage: 'en',\n\tinitialMessages: [\n\t\t'Hi there! 👋',\n\t\t'My name is Nathan. How can I assist you today?'\n\t],\n\ti18n: {\n\t\ten: {\n\t\t\ttitle: 'Hi there! 👋',\n\t\t\tsubtitle: \"Start a chat. We're here to help you 24/7.\",\n\t\t\tfooter: '',\n\t\t\tgetStarted: 'New Conversation',\n\t\t\tinputPlaceholder: 'Type your question..',\n\t\t},\n\t},\n});\n```"},"typeVersion":1},{"id":"a31c4b87-43e4-4aa4-a5c3-8b84f7aab84f","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-560,-60],"parameters":{"height":220,"content":"Set FLOWISE_URL and FLOW_ID"},"typeVersion":1},{"id":"14e6f14f-c7a8-4969-bc08-152c8f2f4b63","name":"Flowise","type":"n8n-nodes-base.httpRequest","position":[-500,0],"parameters":{"url":"https://FLOWISEURL/api/v1/prediction/FLOWISE_ID","method":"POST","options":{},"jsonBody":"={\n  \"question\": \"{{ $json.chatInput }}\"\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"OzvOPMztvvv1Duex","name":"FLowise API"}},"typeVersion":4.2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"054d4347-07c9-4c18-87e6-83fc08adeee9","connections":{"Flowise":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"Flowise","type":"main","index":0}]]}}}


name: AI Agent Creates Content to Be Picked by ChatGPT, Gemini, Google
author_name: Kritika
author_username: kritika-dagur
categories: []
created_at: 2025-06-04T15:38:35.056Z
updated_at: 2025-06-04T15:38:35.056Z
url: https://n8n.io/workflows/4652
scraped_at: 2025-06-19 22:49:03
description:
  🧠 Who is this for?
  Marketing teams, content creators, solopreneurs, and agencies who want to generate emotionally-resonant, SEO-optimized content tailored to audience psychology and buyer journey stages — and get picked up by AI discovery engines like ChatGPT, Gemini, and Perplexity.

  How it works: 
  ✅ Decodes why people buy (using buyer psychology)
  ✅ Creates SEO + emotionally resonant content for 4 formats:
  → Blog Posts, Newsletters, Landing Pages, Social Media
  ✅ Structures the content to be picked up by ChatGPT, Gemini, Perplexity & Google
  ✅ Automatically routes it to Google Sheets, Gmail, or even WordPress

  This isn’t just about writing better content — it’s about getting seen by the tools that shape the internet.

  How long does it take to set-up: 30 Mins 

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.mailgun","n8n-nodes-base.wordpress","n8n-nodes-base.gmail","n8n-nodes-base.linkedIn","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.lmChatGoogleGemini","@n8n/n8n-nodes-langchain.textClassifier"]

workflow_json:
  {"id":"ceWLt9HQyWq1CZ6U","meta":{"instanceId":"5290d3c06bfcfd39bff2dd1da3399bb72d2288a9a42951dd783fdf4b38c8f0a8","templateCredsSetupCompleted":true},"name":"GEO/SEO content engine","tags":[],"nodes":[{"id":"bf91e77c-4450-4eee-b120-de4f3055df8b","name":"Google Sheets Trigger","type":"n8n-nodes-base.googleSheetsTrigger","position":[-600,-180],"parameters":{},"typeVersion":1},{"id":"9c013ed4-97ea-4bb7-b2f0-1dd676cc993b","name":"Remove Duplicates","type":"n8n-nodes-base.removeDuplicates","position":[-420,-180],"parameters":{},"typeVersion":2},{"id":"bdc60c5c-2c60-458b-9bb8-5a1addc81bd0","name":"Basic LLM Chain","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[-200,-180],"parameters":{},"typeVersion":1.6},{"id":"96159da2-2d46-43a2-912f-63f52f2c240d","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[-180,0],"parameters":{},"typeVersion":1},{"id":"bebbcf6d-1916-44cc-b3fa-23148a0b80f3","name":"Google Sheets","type":"n8n-nodes-base.googleSheets","position":[160,-180],"parameters":{},"typeVersion":4.5},{"id":"7744ea1a-79d3-4711-aed3-95793b8ce002","name":"Text Classifier","type":"@n8n/n8n-nodes-langchain.textClassifier","position":[380,-180],"parameters":{},"typeVersion":1},{"id":"2bc3a564-b61c-4b1c-8321-85512dcb784d","name":"Google Gemini Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[380,0],"parameters":{},"typeVersion":1},{"id":"0d266843-271e-4d69-9c3d-c14336df2d8f","name":"Gmail","type":"n8n-nodes-base.gmail","position":[880,-180],"webhookId":"d1419fca-1366-4aea-a3a1-36060d057c44","parameters":{},"typeVersion":2.1},{"id":"9c403484-1b26-44f8-9524-71b065e8289d","name":"Gmail1","type":"n8n-nodes-base.gmail","position":[780,-320],"webhookId":"d5cdafab-37d7-4c55-92e2-6d5c7de384da","parameters":{},"typeVersion":2.1},{"id":"95c1232b-9566-4d57-bcd4-3138de198106","name":"Gmail2","type":"n8n-nodes-base.gmail","position":[800,180],"webhookId":"9fb21528-4542-4a73-99a7-44fb08fc272f","parameters":{},"typeVersion":2.1},{"id":"f1e7338f-d1e6-4a87-97a7-d631b924cd5d","name":"Gmail3","type":"n8n-nodes-base.gmail","position":[840,0],"webhookId":"bc60a0cc-115f-4a40-8a73-1da1b48836dd","parameters":{},"typeVersion":2.1},{"id":"050e931a-3961-4cd3-8b02-ee1b05b86524","name":"LinkedIn","type":"n8n-nodes-base.linkedIn","position":[1100,-180],"parameters":{},"typeVersion":1},{"id":"622dac71-47f0-44e5-857c-19532da3200e","name":"Wordpress","type":"n8n-nodes-base.wordpress","position":[1000,-320],"parameters":{},"typeVersion":1},{"id":"7fbde12b-50cf-4138-bc7e-58e23a07259d","name":"Wordpress1","type":"n8n-nodes-base.wordpress","position":[1060,0],"parameters":{},"typeVersion":1},{"id":"471f91c5-eab5-4091-97c1-1367c1313f0a","name":"Mailgun","type":"n8n-nodes-base.mailgun","position":[1020,180],"parameters":{},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"2d6d03dc-cf68-4d2d-bb1f-bb8ff9d98a0e","connections":{"Gmail":{"main":[[{"node":"LinkedIn","type":"main","index":0}]]},"Gmail1":{"main":[[{"node":"Wordpress","type":"main","index":0}]]},"Gmail2":{"main":[[{"node":"Mailgun","type":"main","index":0}]]},"Gmail3":{"main":[[{"node":"Wordpress1","type":"main","index":0}]]},"Google Sheets":{"main":[[{"node":"Text Classifier","type":"main","index":0}]]},"Basic LLM Chain":{"main":[[{"node":"Google Sheets","type":"main","index":0}]]},"Text Classifier":{"main":[[{"node":"Gmail1","type":"main","index":0}],[{"node":"Gmail","type":"main","index":0}],[{"node":"Gmail2","type":"main","index":0}],[{"node":"Gmail3","type":"main","index":0}]]},"Remove Duplicates":{"main":[[{"node":"Basic LLM Chain","type":"main","index":0}]]},"Google Sheets Trigger":{"main":[[{"node":"Remove Duplicates","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"Basic LLM Chain","type":"ai_languageModel","index":0}]]},"Google Gemini Chat Model1":{"ai_languageModel":[[{"node":"Text Classifier","type":"ai_languageModel","index":0}]]}}}


name: LinkedIn Profile Extract and Build JSON Resume with Bright Data & Google Gemini
author_name: Ranjan Dailata
author_username: ranjancse
categories: []
created_at: 2025-06-04T16:01:06.726Z
updated_at: 2025-06-04T16:01:06.726Z
url: https://n8n.io/workflows/4653
scraped_at: 2025-06-19 22:48:55
description:
  Who this is for?

  The LinkedIn Profile Extract and JSON Resume Builder is a powerful workflow that scrapes professional profile data from LinkedIn using Bright Data's infrastructure, then transforms that data into a clean, structured JSON resume using Google Gemini. The workflow is ideal for automating resume parsing, candidate profiling, or integrating into recruiting platforms.

  This workflow is tailored for:

  HR professionals & recruiters automating resume screening

  Talent acquisition platforms enriching candidate profiles

  Developers & AI builders creating resume-parsing AI pipelines

  Data scientists working on labor market analytics

  Growth hackers profiling prospects via public data

  What problem is this workflow solving?

  Parsing resumes or LinkedIn profiles into machine-readable formats is often a manual, error-prone process. Most scraping tools either fail due to anti-bot protections or return unstructured HTML that's hard to work with.

  This workflow solves that by:

  Using Bright Data's Web Unlocker for reliable, CAPTCHA-free LinkedIn scraping

  Extracting clean text and structured profile data via Google Gemini LLM

  Automatically generating a standards-compliant JSON Resume and Skills

  Sending the resume to webhooks or storing it for downstream usage

  What this workflow does

  Accepts LinkedIn Profile URL and required metadata (Bright Data zone, webhook)

  Scrapes LinkedIn profile using Bright Data Web Unlocker

  Extracts clean content and skills using Google Gemini LLM

  Builds a JSON-formatted resume following the JSON resume schema

  Sends the JSON resume via Webhook Notification

  Persists the output by saving the file to disk

  Setup

  Sign up at Bright Data.
  Navigate to Proxies & Scraping and create a new Web Unlocker zone by selecting Web Unlocker API under Scraping Solutions.
  In n8n, configure the Header Auth account under Credentials (Generic Auth Type: Header Authentication).

  The Value field should be set with the
  Bearer XXXXXXXXXXXXXX. The XXXXXXXXXXXXXX should be replaced by the Web Unlocker Token.
  In n8n, configure the Google Gemini(PaLM) Api account with the Google Gemini API key (or access through Vertex AI or proxy).
  Update the Set URL and Bright Data Zone node with the LinkedIn profile, Bright Data Zone and the Webhook notification URL. For testing purposes, you can obtain a webhook url using https://webhook.site/

  How to customize this workflow to your needs

  Add Language Translation

  Insert a translation LLM node to support multilingual profiles.

  Generate PDF Resumes

  Convert JSON to formatted PDF resumes using an HTML-to-PDF module.

  Push to ATS or CRM

  Add integration nodes to pipe data into applicant tracking systems (ATS), CRMs, or databases.

  Use Alternative LLMs

  Swap Gemini with OpenAI or Anthropic Claude if preferred.

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.lmChatGoogleGemini","@n8n/n8n-nodes-langchain.informationExtractor"]

workflow_json:
  {"id":"V9lUeUsju5cwwmNc","meta":{"instanceId":"885b4fb4a6a9c2cb5621429a7b972df0d05bb724c20ac7dac7171b62f1c7ef40","templateCredsSetupCompleted":true},"name":"LinkedIn Profile Extract and Build JSON Resume with Bright Data & Google Gemini","tags":[{"id":"Kujft2FOjmOVQAmJ","name":"Engineering","createdAt":"2025-04-09T01:31:00.558Z","updatedAt":"2025-04-09T01:31:00.558Z"},{"id":"ZOwtAMLepQaGW76t","name":"Building Blocks","createdAt":"2025-04-13T15:23:40.462Z","updatedAt":"2025-04-13T15:23:40.462Z"},{"id":"ddPkw7Hg5dZhQu2w","name":"AI","createdAt":"2025-04-13T05:38:08.053Z","updatedAt":"2025-04-13T05:38:08.053Z"},{"id":"rKOa98eAi3IETrLu","name":"HR","createdAt":"2025-04-13T04:59:30.580Z","updatedAt":"2025-04-13T04:59:30.580Z"}],"nodes":[{"id":"0bac88f2-4912-4b1e-b511-aab2c3b34db9","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-580,-140],"parameters":{},"typeVersion":1},{"id":"df338f53-cb90-4529-befb-382735043ec2","name":"Set URL and Bright Data Zone","type":"n8n-nodes-base.set","position":[-360,-140],"parameters":{"options":{},"assignments":{"assignments":[{"id":"3aedba66-f447-4d7a-93c0-8158c5e795f9","name":"url","type":"string","value":"https://www.linkedin.com/in/ranjan-dailata"},{"id":"4e7ee31d-da89-422f-8079-2ff2d357a0ba","name":"zone","type":"string","value":"web_unlocker1"},{"id":"20518160-df56-49fe-9a42-05e9f9d743a5","name":"webhook_notification_url","type":"string","value":"https://webhook.site/c9118da2-1c54-460f-a83a-e5131b7098db"}]}},"typeVersion":3.4},{"id":"e3a859aa-b330-4ae5-b0fb-7cd621be6fb3","name":"Perform Bright Data Web Request","type":"n8n-nodes-base.httpRequest","position":[-140,-140],"parameters":{"url":"https://api.brightdata.com/request","method":"POST","options":{},"sendBody":true,"sendHeaders":true,"authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"zone","value":"={{ $json.zone }}"},{"name":"url","value":"={{ $json.url }}"},{"name":"format","value":"raw"},{"name":"data_format","value":"markdown"}]},"genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{}]}},"credentials":{"httpHeaderAuth":{"id":"kdbqXuxIR8qIxF7y","name":"Header Auth account"}},"typeVersion":4.2},{"id":"078d4a98-9c45-4370-a579-06450798f1a1","name":"Markdown to Textual Data Extractor","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[80,-140],"parameters":{"text":"=You need to analyze the below markdown and convert to textual data. Please do not output with your own thoughts. Make sure to output with textual data only with no links, scripts, css etc.\n\n{{ $json.data }}","messages":{"messageValues":[{"message":"You are a markdown expert"}]},"promptType":"define"},"retryOnFail":true,"typeVersion":1.6},{"id":"2ba19dce-4f9a-439d-b7ae-d701ddb03616","name":"Google Gemini Chat Model for Markdown to Textual","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[100,80],"parameters":{"options":{},"modelName":"models/gemini-2.0-flash-exp"},"credentials":{"googlePalmApi":{"id":"YeO7dHZnuGBVQKVZ","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"a45dbef9-58f3-4730-8e1b-83419e1efc85","name":"Skill Extractor","type":"@n8n/n8n-nodes-langchain.informationExtractor","position":[456,-440],"parameters":{"text":"=Perform Data Mining and extract the skills from the provided resume\n\n {{ $json.text }}","options":{},"schemaType":"manual","inputSchema":"{\n\t\"type\": \"array\",\n\t\"properties\": {\n\t\t\"skill\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n        \"desc\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"},"retryOnFail":true,"typeVersion":1},{"id":"955af989-3590-49ae-90be-df6424200e42","name":"Google Gemini Chat Model for Skill Extractor","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[544,-220],"parameters":{"options":{},"modelName":"models/gemini-2.0-flash-exp"},"credentials":{"googlePalmApi":{"id":"YeO7dHZnuGBVQKVZ","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"5c32bdeb-666b-4a0f-9722-0c62ec95ac9e","name":"Create a binary data for Structured Data Extract","type":"n8n-nodes-base.function","position":[1052,-40],"parameters":{"functionCode":"items[0].binary = {\n  data: {\n    data: new Buffer(JSON.stringify(items[0].json, null, 2)).toString('base64')\n  }\n};\nreturn items;"},"typeVersion":1},{"id":"b9e899f3-a1a4-4dce-af96-1814fb3c03b7","name":"Write the structured content to disk","type":"n8n-nodes-base.readWriteFile","position":[1280,-40],"parameters":{"options":{},"fileName":"=d:\\Json_Resume.json","operation":"write"},"typeVersion":1},{"id":"db74b347-713e-4ff6-9783-1d3f6b1895a6","name":"Initiate a Webhook Notification for Structured Data","type":"n8n-nodes-base.httpRequest","position":[1060,160],"parameters":{"url":"={{ $('Set URL and Bright Data Zone').item.json.webhook_notification_url }}","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"json_resume","value":"={{ $('JSON Resume Extractor').item.json.output.toJsonString() }}"}]}},"typeVersion":4.2},{"id":"29d27cef-c868-4552-ab41-08276f56e6f9","name":"Write the structured skills content to disk","type":"n8n-nodes-base.readWriteFile","position":[1060,-340],"parameters":{"options":{},"fileName":"=d:\\Resume_Skills.json","operation":"write"},"typeVersion":1},{"id":"c7a77bd9-955c-45ec-b6d7-e10717eda093","name":"Create a binary data for Structured Skill Extract","type":"n8n-nodes-base.function","position":[832,-340],"parameters":{"functionCode":"items[0].binary = {\n  data: {\n    data: new Buffer(JSON.stringify(items[0].json, null, 2)).toString('base64')\n  }\n};\nreturn items;"},"typeVersion":1},{"id":"46dc726e-c939-466b-b834-83f0aed2c95c","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-140,-420],"parameters":{"color":5,"width":440,"height":240,"content":"## LLM Usages\n\nGoogle Gemini LLM is being utilized for the structured data extraction handling."},"typeVersion":1},{"id":"a100ebc9-9253-4e80-93d9-60174a08e7d9","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-580,-780],"parameters":{"color":7,"width":400,"height":340,"content":"## Logo\n\n\n![logo](https://images.seeklogo.com/logo-png/43/1/brightdata-logo-png_seeklogo-439974.png)\n"},"typeVersion":1},{"id":"097e223c-61e2-4c01-ab8c-3eb2cc48b165","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-580,-420],"parameters":{"width":400,"height":240,"content":"## Note\n\nDeals with the LinkedIn profile data extraction by utilizing the Bright Data and Google Gemini LLM for transforming the profile into a structured JSON resume with the structured skill extraction.\n\n**Please make sure to set the input fields node with the LinkedIn profile URL, Bright Data zone name, Webhook notification URL**\n"},"typeVersion":1},{"id":"8260cf1a-bd5e-4c05-a898-e7f74ff1d268","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[360,-520],"parameters":{"color":7,"width":1100,"height":960,"content":"## Structured Data Extract using LLM"},"typeVersion":1},{"id":"e06fcc12-c264-439f-84f2-1988587e21c6","name":"JSON Resume Extractor","type":"@n8n/n8n-nodes-langchain.informationExtractor","position":[460,80],"parameters":{"text":"=Extract the resume in JSON format.\n {{ $json.text }}","options":{},"schemaType":"manual","inputSchema":"{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"JSON Resume\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"basics\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": { \"type\": \"string\" },\n        \"label\": { \"type\": \"string\" },\n        \"image\": { \"type\": \"string\", \"format\": \"uri\" },\n        \"email\": { \"type\": \"string\", \"format\": \"email\" },\n        \"phone\": { \"type\": \"string\" },\n        \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n        \"summary\": { \"type\": \"string\" },\n        \"location\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": { \"type\": \"string\" },\n            \"postalCode\": { \"type\": \"string\" },\n            \"city\": { \"type\": \"string\" },\n            \"countryCode\": { \"type\": \"string\" },\n            \"region\": { \"type\": \"string\" }\n          }\n        },\n        \"profiles\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"network\": { \"type\": \"string\" },\n              \"username\": { \"type\": \"string\" },\n              \"url\": { \"type\": \"string\", \"format\": \"uri\" }\n            }\n          }\n        }\n      }\n    },\n    \"work\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"position\": { \"type\": \"string\" },\n          \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n          \"startDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"endDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"summary\": { \"type\": \"string\" },\n          \"highlights\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          }\n        }\n      }\n    },\n    \"volunteer\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"organization\": { \"type\": \"string\" },\n          \"position\": { \"type\": \"string\" },\n          \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n          \"startDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"endDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"summary\": { \"type\": \"string\" },\n          \"highlights\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          }\n        }\n      }\n    },\n    \"education\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"institution\": { \"type\": \"string\" },\n          \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n          \"area\": { \"type\": \"string\" },\n          \"studyType\": { \"type\": \"string\" },\n          \"startDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"endDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"score\": { \"type\": \"string\" },\n          \"courses\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          }\n        }\n      }\n    },\n    \"awards\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"title\": { \"type\": \"string\" },\n          \"date\": { \"type\": \"string\", \"format\": \"date\" },\n          \"awarder\": { \"type\": \"string\" },\n          \"summary\": { \"type\": \"string\" }\n        }\n      }\n    },\n    \"certificates\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"date\": { \"type\": \"string\", \"format\": \"date\" },\n          \"issuer\": { \"type\": \"string\" },\n          \"url\": { \"type\": \"string\", \"format\": \"uri\" }\n        }\n      }\n    },\n    \"publications\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"publisher\": { \"type\": \"string\" },\n          \"releaseDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"url\": { \"type\": \"string\", \"format\": \"uri\" },\n          \"summary\": { \"type\": \"string\" }\n        }\n      }\n    },\n    \"skills\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"level\": { \"type\": \"string\" },\n          \"keywords\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          }\n        }\n      }\n    },\n    \"languages\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"language\": { \"type\": \"string\" },\n          \"fluency\": { \"type\": \"string\" }\n        }\n      }\n    },\n    \"interests\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"keywords\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          }\n        }\n      }\n    },\n    \"references\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"reference\": { \"type\": \"string\" }\n        }\n      }\n    },\n    \"projects\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"startDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"endDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"description\": { \"type\": \"string\" },\n          \"highlights\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" }\n          },\n          \"url\": { \"type\": \"string\", \"format\": \"uri\" }\n        }\n      }\n    }\n  },\n  \"required\": [\"basics\"]\n}\n"},"retryOnFail":true,"typeVersion":1},{"id":"14c17907-10bb-45a8-b835-39251b742cbe","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[580,260],"parameters":{"options":{},"modelName":"models/gemini-2.0-flash-exp"},"credentials":{"googlePalmApi":{"id":"YeO7dHZnuGBVQKVZ","name":"Google Gemini(PaLM) Api account"}},"typeVersion":1},{"id":"9ec7af7d-72e6-410d-b52e-9eda3e193e30","name":"Code","type":"n8n-nodes-base.code","position":[800,80],"parameters":{"jsCode":"return $input.first().json.output"},"typeVersion":2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"bcad3928-6913-44b0-b9e5-efc6e738769c","connections":{"Code":{"main":[[{"node":"Initiate a Webhook Notification for Structured Data","type":"main","index":0},{"node":"Create a binary data for Structured Data Extract","type":"main","index":0}]]},"Skill Extractor":{"main":[[{"node":"Create a binary data for Structured Skill Extract","type":"main","index":0}]]},"JSON Resume Extractor":{"main":[[{"node":"Code","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"JSON Resume Extractor","type":"ai_languageModel","index":0}]]},"Set URL and Bright Data Zone":{"main":[[{"node":"Perform Bright Data Web Request","type":"main","index":0}]]},"Perform Bright Data Web Request":{"main":[[{"node":"Markdown to Textual Data Extractor","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Set URL and Bright Data Zone","type":"main","index":0}]]},"Markdown to Textual Data Extractor":{"main":[[{"node":"Skill Extractor","type":"main","index":0},{"node":"JSON Resume Extractor","type":"main","index":0}]]},"Google Gemini Chat Model for Skill Extractor":{"ai_languageModel":[[{"node":"Skill Extractor","type":"ai_languageModel","index":0}]]},"Create a binary data for Structured Data Extract":{"main":[[{"node":"Write the structured content to disk","type":"main","index":0}]]},"Google Gemini Chat Model for Markdown to Textual":{"ai_languageModel":[[{"node":"Markdown to Textual Data Extractor","type":"ai_languageModel","index":0}]]},"Create a binary data for Structured Skill Extract":{"main":[[{"node":"Write the structured skills content to disk","type":"main","index":0}]]}}}


name: Automate Instagram Content Discovery & Repurposing w/ Apify, GPT-4o & Perplexity
author_name: Nick Saraev
author_username: nicksaraev
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","@n8n/n8n-nodes-langchain.openAi"]
categories: []
created_at: 2025-06-04T17:08:01.951Z
updated_at: 2025-06-04T17:08:01.951Z
url: https://n8n.io/workflows/4658
scraped_at: 2025-06-19 22:48:56
description:
  This workflow creates an end-to-end Instagram content pipeline that automatically discovers trending content from competitor channels, extracts valuable insights, and generates new high-quality scripts for your own content creation. The system helped scale an Instagram channel from 0 to 10,000 followers in just 15 days through intelligent content repurposing.

  Benefits:

  Complete Content Automation - Monitors competitor Instagram accounts, downloads new reels, and processes them without manual intervention
  AI-Powered Script Generation - Uses ChatGPT and Perplexity to analyze content, identify tools/technologies, and rewrite scripts with fresh angles
  Smart Duplicate Prevention - Automatically tracks processed content in a database to avoid redundant work
  Multi-Platform Intelligence - Combines Instagram scraping, AI transcription, web research, and content generation in one seamless flow
  Scalable Content Strategy - Process content from multiple niches and creators to fuel unlimited content ideas
  Revenue-Focused Approach - Specifically designed to identify monetizable tools and technologies for business-focused content

  How It Works:

  Instagram Content Discovery:
  Uses Apify's Instagram scraper to monitor specified creator accounts for new reels
  Automatically downloads video content and metadata from target accounts
  Filters content based on engagement metrics and relevance

  Intelligent Processing Pipeline:

  Transcribes video content using OpenAI Whisper for accurate text extraction
  Filters content using AI to identify tools, technologies, and automation opportunities
  Cross-references against existing database to prevent duplicate processing

  Enhanced Research & Analysis:

  Searches Perplexity AI for additional insights about discovered tools
  Generates step-by-step usage guides and implementation instructions
  Identifies unique angles and opportunities for content improvement

  Script Generation & Optimization:

  Creates new, original scripts optimized for your specific audience
  Maintains consistent brand voice while adding fresh perspectives
  Includes strategic call-to-action elements for audience engagement

  Required Google Sheets Database Setup:
  Before running this workflow, create a Google Sheets database with these exact column headers:
  Essential Columns:

  id - Unique Instagram post identifier (primary key for duplicate detection)
  timestamp - When the reel was posted
  caption - Original reel caption text
  hashtags - Hashtags used in the post
  videoUrl - Direct link to download the video file
  username - Account that posted the reel
  scrapedTranscript - Original transcript from video (added by workflow)
  newTranscript - AI-generated script for your content (added by workflow)

  Additional Tracking Columns:

  shortCode - Instagram's internal post code
  url - Public Instagram post URL
  commentsCount - Number of comments
  firstComment - Top comment on the post
  likesCount - Number of likes
  videoViewCount - View count metrics
  videoDuration - Length of video in seconds

  Setup Instructions:

  Create a new Google Sheet with these column headers in the first row
  Name the sheet "Reels"
  Connect your Google Sheets OAuth credentials in n8n
  Update the document ID in the workflow nodes

  The merge logic relies on the id column to prevent duplicate processing, so this structure is essential for the workflow to function correctly.


  Business Use Cases:

  Content Creators - Scale content production by 10x while maintaining quality and originality
  Marketing Agencies - Offer content research and ideation as a premium service
  Course Creators - Identify trending tools and technologies for educational content

  Revenue Potential:

  This exact system can be sold as a service for $3,000-$5,000 to growing channels or agencies. The automation saves 10+ hours weekly of manual research and content planning.

  Difficulty Level: Intermediate
  Estimated Build Time: 1-2 hours
  Monthly Operating Cost: ~$30 (API usage)

  Watch the Complete Build Process

  Want to see exactly how this system was built from scratch? Nick Saraev walks through the entire development process in this comprehensive tutorial, including all the debugging, dead ends, and problem-solving that goes into building real automation systems.

  🎥 Watch: "The N8N Instagram Parasite System (10K Followers In 15 Days)"


  This 1.5-hour deep-dive shows the actual build process - not a polished demo, but real system development with all the thinking and iteration included.

  Set Up Steps:

  Configure Apify Integration:

  Sign up for Apify account and obtain API key
  Replace the bearer token in the "Run Actor Synchronously" node
  Customize the username array with your target Instagram accounts

  Set Up AI Services:

  Add OpenAI API credentials for transcription and content generation
  Configure Perplexity API for enhanced research capabilities
  Set up appropriate rate limiting for cost control
  Database Configuration:

  Create Google Sheets database with provided column structure
  Connect Google Sheets OAuth credentials
  Configure the merge logic for duplicate detection

  Content Filtering Setup:

  Customize the AI prompts for your specific niche and requirements
  Adjust the filtering criteria for tool/technology detection
  Set up the script generation template to match your brand voice

  Automation Schedule:

  Configure the schedule trigger for daily content monitoring
  Set optimal timing based on your content creation workflow
  Test the complete flow with a small number of accounts first

  Advanced Customization:

  Add additional content sources beyond Instagram
  Integrate with your existing content management systems
  Scale up monitoring to dozens of competitor accounts

  More AI Automation Systems:*
  For more advanced automation tutorials and business systems, check out My YouTube Channel  where I share proven automation strategies that generate real revenue.

workflow_json:
  {"id":"fFfhgyxWDNWQCUtY","meta":{"instanceId":"d7661a849ead114a9aa6d9ceaf4160465aeb79532a35bde62160c840ffba9fc8"},"name":"Apify Scrape New Instagram Reels -> Transcribe -> Add to Sheet","tags":[{"id":"l8MPK4ZirgwFWMno","name":"N8N Course","createdAt":"2025-01-23T18:12:52.273Z","updatedAt":"2025-01-23T18:12:52.273Z"}],"nodes":[{"id":"sticky-note-1","type":"n8n-nodes-base.stickyNote","position":[180,-280],"parameters":{"width":350,"height":200,"content":"## 🎯 STEP 1: Instagram Content Discovery\n\nThis node uses Apify to scrape Instagram reels from competitor accounts. Replace <your-apify-api-key-here> with your actual API key.\n\n**Key Setup:**\n- Add your target Instagram usernames to the JSON body\n- Adjust resultsLimit (5 = latest 5 reels per account)\n- Monitor accounts in your niche for trending content"},"typeVersion":1},{"id":"sticky-note-2","type":"n8n-nodes-base.stickyNote","position":[600,-320],"parameters":{"width":380,"height":180,"content":"## 🔍 STEP 2: Smart Duplicate Prevention\n\nThis section prevents processing the same content twice:\n\n1. **Search for Entries**: Checks if reel ID already exists in database\n2. **Drop Duplicates**: Removes already-processed content using merge logic\n3. **Add Entries**: Only adds genuinely new content to Google Sheets\n\n**Critical**: The merge node compares IDs and keeps only non-matches (new content)"},"typeVersion":1},{"id":"sticky-note-3","type":"n8n-nodes-base.stickyNote","position":[1400,-320],"parameters":{"width":400,"height":200,"content":"## 🧠 STEP 3: AI-Powered Content Analysis\n\nThe AI pipeline processes each reel:\n\n1. **Transcribe Video**: Uses OpenAI Whisper to extract text from videos\n2. **Filter & Generate**: GPT-4o identifies tools/technologies and creates step-by-step guides\n3. **Search Perplexity**: Researches additional insights about discovered tools\n4. **Write New Script**: Generates original, optimized scripts for your audience\n\n**Result**: Transform competitor content into unique, valuable scripts for your channel"},"typeVersion":1},{"id":"sticky-note-4","type":"n8n-nodes-base.stickyNote","position":[2400,-280],"parameters":{"width":350,"height":160,"content":"## 📋 STEP 4: Database Updates\n\nFinal step saves everything back to Google Sheets:\n\n**Update Entries**: Adds the original transcript and newly generated script to your database for future reference and analysis.\n\n**Note**: This creates a complete content intelligence database where you can track:\n- Which content performed best\n- What tools were most popular\n- Script variations and improvements"},"typeVersion":1},{"id":"c55c87f0-868c-4d3a-a0ca-43cc7191cb32","name":"Run Actor Synchronously","type":"n8n-nodes-base.httpRequest","position":[220,0],"parameters":{"url":"https://api.apify.com/v2/acts/xMc5Ga1oCONPmWJIa/run-sync-get-dataset-items","method":"POST","options":{"redirect":{"redirect":{}}},"jsonBody":"{\n  \"resultsLimit\": 5,\n  \"username\": [\n    \"nick_saraev\",\n    \"juliangoldieseo\",\n    \"brand.nat\",\n    \"realrileybrown\",\n    \"hamza_automates\",\n    \"100xengineers\",\n    \"mattfarmerai\",\n    \"nathanhodgson.ai\",\n    \"theaisurfer\",\n    \"shedoesai\",\n    \"aitrendz.xyz\",\n    \"thevarunmayya\",\n    \"rohak_arya\",\n    \"digitalsamaritan\"\n  ]\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Accept","value":"application/json"},{"name":"Authorization","value":"Bearer yourapikeyhere"}]}},"typeVersion":4.2},{"id":"df030281-6513-45a2-9c72-b1e59ee4c4b6","name":"Limit","type":"n8n-nodes-base.limit","position":[440,0],"parameters":{"keep":"lastItems","maxItems":2},"typeVersion":1},{"id":"8a0ea140-f361-4208-be52-c1dcb91270a7","name":"Filter & Generate Suggestions","type":"@n8n/n8n-nodes-langchain.openAi","position":[1620,0],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"role":"system","content":"You are a helpful, intelligent admin assistant."},{"content":"I run an AI & automation Instagram channel. I'm looking through news archives to find mentions of tools that I can repurpose into content for my channel.\n\nYour task is to take as input a transcript of a news archive, and then determine if the transcription is about a tool, a technology, or AI.\n\nIf so, you'll identify the tools, then write a list of step-by-step instructions to use the tool easily (ideally for free or for low cost), and one suggestion on exactly how to make this content more palatable to an AI automation audience.\n\nReturn your output in JSON using this format:\n\n{\n  \"verdict\":\"true or false\",\n  \"tools\":[\"list\",\"of\",\"tools\",\"or\",\"resources\"],\n  \"stepByStep\":\"Detailed instructions on how to use the tool(s).\",\n  \"suggestion\":\"Comprehensive, in-depth suggestions on how to make this content more interesting and palatable to my audience (AI automation).\",\n  \"searchPrompt\":\"A short search prompt we'll use to look up the service. Write it like '{toolName}, the {typeOfTool}'\"\n}\n\nIf verdict is \"false\", leave the rest of the fields empty."},{"content":"={\"transcript\":\"{{ $json.text }}\"}"}]},"jsonOutput":true},"credentials":{"openAiApi":{"id":"kRhXLl2JwVGc05AE","name":"YouTube_Feb 4"}},"typeVersion":1.6},{"id":"8dbcc1b2-2bc7-4d4f-bc38-8f2b6384abcf","name":"Search for Entries","type":"n8n-nodes-base.googleSheets","position":[640,-160],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"={{ $json.id }}","lookupColumn":"id"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik/edit#gid=0","cachedResultName":"Reels"},"documentId":{"__rl":true,"mode":"list","value":"1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik/edit?usp=drivesdk","cachedResultName":"Instagram Reel Database"}},"credentials":{"googleSheetsOAuth2Api":{"id":"EOibXIc4U8wcXyRR","name":"YouTube"}},"typeVersion":4.5,"alwaysOutputData":false},{"id":"e2b81a84-6724-4757-8991-a62610943ea0","name":"Drop Duplicates","type":"n8n-nodes-base.merge","position":[820,0],"parameters":{"mode":"combine","options":{},"joinMode":"keepNonMatches","fieldsToMatchString":"id"},"typeVersion":3},{"id":"a2650df2-9375-40ec-9ede-115cd692c9ca","name":"Add Entries","type":"n8n-nodes-base.googleSheets","position":[1020,0],"parameters":{"columns":{"value":{"id":"={{ $json.id }}","url":"={{ $json.url }}","caption":"={{ $json.caption }}","hashtags":"={{ $json.hashtags }}","username":"={{ $json.ownerUsername }}","videoUrl":"={{ $json.videoUrl }}","shortCode":"={{ $json.shortCode }}","timestamp":"={{ $json.timestamp }}","displayUrl":"={{ $json.displayUrl }}","likesCount":"={{ $json.likesCount }}","firstComment":"={{ $json.firstComment }}","commentsCount":"={{ $json.commentsCount }}","videoDuration":"={{ $json.videoDuration }}","videoPlayCount":"={{ $json.videoPlayCount }}","videoViewCount":"={{ $json.videoViewCount }}"},"schema":[{"id":"timestamp","type":"string","display":true,"required":false,"displayName":"timestamp","defaultMatch":false,"canBeUsedToMatch":true},{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"shortCode","type":"string","display":true,"required":false,"displayName":"shortCode","defaultMatch":false,"canBeUsedToMatch":true},{"id":"caption","type":"string","display":true,"required":false,"displayName":"caption","defaultMatch":false,"canBeUsedToMatch":true},{"id":"hashtags","type":"string","display":true,"required":false,"displayName":"hashtags","defaultMatch":false,"canBeUsedToMatch":true},{"id":"url","type":"string","display":true,"required":false,"displayName":"url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"commentsCount","type":"string","display":true,"required":false,"displayName":"commentsCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"firstComment","type":"string","display":true,"required":false,"displayName":"firstComment","defaultMatch":false,"canBeUsedToMatch":true},{"id":"displayUrl","type":"string","display":true,"required":false,"displayName":"displayUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoUrl","type":"string","display":true,"required":false,"displayName":"videoUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"likesCount","type":"string","display":true,"required":false,"displayName":"likesCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoViewCount","type":"string","display":true,"required":false,"displayName":"videoViewCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoPlayCount","type":"string","display":true,"required":false,"displayName":"videoPlayCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"username","type":"string","display":true,"required":false,"displayName":"username","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoDuration","type":"string","display":true,"required":false,"displayName":"videoDuration","defaultMatch":false,"canBeUsedToMatch":true},{"id":"scrapedTranscript","type":"string","display":true,"removed":true,"required":false,"displayName":"scrapedTranscript","defaultMatch":false,"canBeUsedToMatch":true},{"id":"newTranscript","type":"string","display":true,"removed":true,"required":false,"displayName":"newTranscript","defaultMatch":false,"canBeUsedToMatch":true},{"id":"inputUrl","type":"string","display":true,"removed":true,"required":false,"displayName":"inputUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"type","type":"string","display":true,"removed":true,"required":false,"displayName":"type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"mentions","type":"string","display":true,"removed":true,"required":false,"displayName":"mentions","defaultMatch":false,"canBeUsedToMatch":true},{"id":"latestComments","type":"string","display":true,"removed":true,"required":false,"displayName":"latestComments","defaultMatch":false,"canBeUsedToMatch":true},{"id":"dimensionsHeight","type":"string","display":true,"removed":true,"required":false,"displayName":"dimensionsHeight","defaultMatch":false,"canBeUsedToMatch":true},{"id":"dimensionsWidth","type":"string","display":true,"removed":true,"required":false,"displayName":"dimensionsWidth","defaultMatch":false,"canBeUsedToMatch":true},{"id":"images","type":"string","display":true,"removed":true,"required":false,"displayName":"images","defaultMatch":false,"canBeUsedToMatch":true},{"id":"alt","type":"string","display":true,"removed":true,"required":false,"displayName":"alt","defaultMatch":false,"canBeUsedToMatch":true},{"id":"childPosts","type":"string","display":true,"removed":true,"required":false,"displayName":"childPosts","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ownerFullName","type":"string","display":true,"removed":true,"required":false,"displayName":"ownerFullName","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ownerUsername","type":"string","display":true,"removed":true,"required":false,"displayName":"ownerUsername","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ownerId","type":"string","display":true,"removed":true,"required":false,"displayName":"ownerId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"productType","type":"string","display":true,"removed":true,"required":false,"displayName":"productType","defaultMatch":false,"canBeUsedToMatch":true},{"id":"isSponsored","type":"string","display":true,"removed":true,"required":false,"displayName":"isSponsored","defaultMatch":false,"canBeUsedToMatch":true},{"id":"musicInfo","type":"string","display":true,"removed":true,"required":false,"displayName":"musicInfo","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"]},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik/edit#gid=0","cachedResultName":"Reels"},"documentId":{"__rl":true,"mode":"list","value":"1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik/edit?usp=drivesdk","cachedResultName":"Instagram Reel Database"}},"credentials":{"googleSheetsOAuth2Api":{"id":"EOibXIc4U8wcXyRR","name":"YouTube"}},"typeVersion":4.5},{"id":"d5f3e37e-af9f-4eee-b184-67104708539b","name":"Download Video","type":"n8n-nodes-base.httpRequest","position":[1240,0],"parameters":{"url":"={{ $json.videoUrl }}","options":{}},"typeVersion":4.2},{"id":"be8bc4fc-de39-41e4-bdda-fa6988b4db71","name":"Transcribe Video","type":"@n8n/n8n-nodes-langchain.openAi","position":[1440,0],"parameters":{"options":{},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"oLLACDYfGm4C4ouV","name":"YouTube "}},"typeVersion":1.6},{"id":"71217539-540a-447d-9890-76b2b6b32986","name":"Search Perplexity","type":"n8n-nodes-base.httpRequest","position":[1980,0],"parameters":{"url":"https://api.perplexity.ai/chat/completions","method":"POST","options":{"redirect":{"redirect":{}}},"jsonBody":"={\n  \"model\": \"sonar-pro\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"Be precise and concise.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Tell me three interesting (peculiar) things about {{ $json.message.content.searchPrompt }}\"\n    }\n  ]\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"accept","value":"application/json"},{"name":"Authorization","value":"Bearer <your-perplexity-api-key-here>"}]}},"typeVersion":4.2},{"id":"3c8706bb-6796-4b02-83a8-b8e39e6e91dd","name":"Write New Script","type":"@n8n/n8n-nodes-langchain.openAi","position":[2180,0],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{"temperature":0.7},"messages":{"values":[{"role":"system","content":"You are a helpful, intelligent writing assistant."},{"content":"I run an AI & automation Instagram channel.\n\nMy editors would like to make a new video. They've found an interesting tool or technology, compiled a step-by-step guide on how to use it, done some searching on the Internet to find some interesting things about it, wrote a rough draft about it, and we also had our chief editor write concrete suggestions for how to make the content better.\n\nYour task is to take as input all of these things, and then write a new, high quality script for us to feature.\n\nReturn your output in JSON using this format:\n\n{\n  \"script\":\"Your script goes here (~100 words).\n}\n\nRules:\n- Use a casual, spartan tone of voice. No frills. Be straightforward, and don't use poetic language.\n- End the script with a call to action like \"Want {thing}? Just comment {keyword} and I'll send it straight to your DMs\",\n- Add newlines as \\n between sentences."},{"content":"={\n  \"toolNames\":\"Speechma\",\n  \"roughDraftScript\":\"Hey there. So, I just wanted to let you know about a AI text-to-speech generator that has recently become available. It’s doesn’t cost anything at all.\\n\\nIt has a lot of voices! And the best part is you don’t need to sign up for an account in order to use it.\\n\\nThe process is really simple, too. You just go the site and type whatever you want converted into speech. There are lots of voices as well.\\n\\nIf this sounds interesting to you, I’d highly recommend giving it a try for yourself. Just leave a comment saying \"texttospeech,\" and I’ll make sure to send you the link so you can check it out firsthand.\",\n  \"perplexityOutput\": \"Here are three interesting things about Speechma, the AI text-to-speech tool:\\n\\n1. Speechma offers over 400 premium AI voices for text-to-speech conversion, allowing users to find the perfect voice for any project[1].\\n\\n2. The platform provides unlimited free usage with no restrictions on the number of conversions, which is unusual for a premium text-to-speech service[1].\\n\\n3. Speechma grants users commercial rights to use the generated audio for any purpose, including YouTube videos, TikTok content, and business presentations[1].\",\n  \"stepByStepGuide\":\"1. Visit the Speechma website.\\n2. Enter or paste your text into the provided text box.\\n3. Browse through the available 400+ voices and select one that fits your needs.\\n4. Choose the desired language from the 60 supported options.\\n5. Click the 'Generate' button to create your AI-generated speech.\\n6. Download or use your AI-generated speech as needed for projects like YouTube videos or TikToks.\",\n  \"suggestionsForImprovement\":\"Create a short tutorial video showing how to use Speechma, emphasizing its free nature and ease of use. Highlight its unlimited features and vast voice selection. Consider doing a voice comparison test using Speechma versus other popular tools. Discuss potential use cases such as content creation for social media, especially focusing on platforms like Instagram and TikTok, highlighting the benefit of rapid content creation using AI automation.\"\n}"},{"role":"assistant","content":"={\n  \"script\":\"Hey—there’s a completely new AI text to speech generator that’s just as good as ElevenLabs, but FREE.\\nIt allows you to choose from over 400 voices, it supports 60 languages, and it’s all completely unlimited with no signup required.\\nJust head over to this website\\nPaste your text\\nChoose one of the voices\\nAnd click generate\\nThat’s it! Your AI speech is now ready to use.\\nYou can use this voice for YouTube videos, TikToks, or whatever you like.\\nSo go try it yourself.\\nJust Comment \"speech\" and I’ll share the link with you.\"\n}"},{"content":"={\n  \"toolNames\":\"{{ $('Filter & Generate Suggestions').item.json.message.content.tools.join() }}\",\n  \"roughDraftScript\":\"{{ $('Transcribe Video').all().first().json.text }}\",\n  \"perplexityOutput\": \"{{ $json.choices[0].message.content }}\",\n  \"stepByStepGuide\":\"{{ $('Filter & Generate Suggestions').item.json.message.content.stepByStep }}\",\n  \"suggestionsForImprovement\":\"{{ $('Filter & Generate Suggestions').item.json.message.content.suggestion }}\"\n}"}]},"jsonOutput":true},"credentials":{"openAiApi":{"id":"kRhXLl2JwVGc05AE","name":"YouTube_Feb 4"}},"typeVersion":1.6},{"id":"c2e95c8b-cd40-45fd-9b4a-3c7a3c2c35c0","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[20,0],"parameters":{"rule":{"interval":[{"triggerAtHour":6}]}},"typeVersion":1.2},{"id":"c91557c0-1051-42bd-bdbb-484995bdda84","name":"Update Entries","type":"n8n-nodes-base.googleSheets","position":[2540,0],"parameters":{"columns":{"value":{"id":"={{ $('Add Entries').item.json.id }}","newTranscript":"={{ $json.message.content.script }}","scrapedTranscript":"={{ $('Transcribe Video').item.json.text }}"},"schema":[{"id":"timestamp","type":"string","display":true,"removed":true,"required":false,"displayName":"timestamp","defaultMatch":false,"canBeUsedToMatch":true},{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"shortCode","type":"string","display":true,"removed":true,"required":false,"displayName":"shortCode","defaultMatch":false,"canBeUsedToMatch":true},{"id":"caption","type":"string","display":true,"removed":true,"required":false,"displayName":"caption","defaultMatch":false,"canBeUsedToMatch":true},{"id":"hashtags","type":"string","display":true,"removed":true,"required":false,"displayName":"hashtags","defaultMatch":false,"canBeUsedToMatch":true},{"id":"url","type":"string","display":true,"removed":true,"required":false,"displayName":"url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"commentsCount","type":"string","display":true,"removed":true,"required":false,"displayName":"commentsCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"firstComment","type":"string","display":true,"removed":true,"required":false,"displayName":"firstComment","defaultMatch":false,"canBeUsedToMatch":true},{"id":"displayUrl","type":"string","display":true,"removed":true,"required":false,"displayName":"displayUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoUrl","type":"string","display":true,"removed":true,"required":false,"displayName":"videoUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"likesCount","type":"string","display":true,"removed":true,"required":false,"displayName":"likesCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoViewCount","type":"string","display":true,"removed":true,"required":false,"displayName":"videoViewCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoPlayCount","type":"string","display":true,"removed":true,"required":false,"displayName":"videoPlayCount","defaultMatch":false,"canBeUsedToMatch":true},{"id":"username","type":"string","display":true,"removed":true,"required":false,"displayName":"username","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoDuration","type":"string","display":true,"removed":true,"required":false,"displayName":"videoDuration","defaultMatch":false,"canBeUsedToMatch":true},{"id":"scrapedTranscript","type":"string","display":true,"removed":false,"required":false,"displayName":"scrapedTranscript","defaultMatch":false,"canBeUsedToMatch":true},{"id":"newTranscript","type":"string","display":true,"removed":false,"required":false,"displayName":"newTranscript","defaultMatch":false,"canBeUsedToMatch":true},{"id":"inputUrl","type":"string","display":true,"removed":true,"required":false,"displayName":"inputUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"type","type":"string","display":true,"removed":true,"required":false,"displayName":"type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"mentions","type":"string","display":true,"removed":true,"required":false,"displayName":"mentions","defaultMatch":false,"canBeUsedToMatch":true},{"id":"latestComments","type":"string","display":true,"removed":true,"required":false,"displayName":"latestComments","defaultMatch":false,"canBeUsedToMatch":true},{"id":"dimensionsHeight","type":"string","display":true,"removed":true,"required":false,"displayName":"dimensionsHeight","defaultMatch":false,"canBeUsedToMatch":true},{"id":"dimensionsWidth","type":"string","display":true,"removed":true,"required":false,"displayName":"dimensionsWidth","defaultMatch":false,"canBeUsedToMatch":true},{"id":"images","type":"string","display":true,"removed":true,"required":false,"displayName":"images","defaultMatch":false,"canBeUsedToMatch":true},{"id":"alt","type":"string","display":true,"removed":true,"required":false,"displayName":"alt","defaultMatch":false,"canBeUsedToMatch":true},{"id":"childPosts","type":"string","display":true,"removed":true,"required":false,"displayName":"childPosts","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ownerFullName","type":"string","display":true,"removed":true,"required":false,"displayName":"ownerFullName","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ownerUsername","type":"string","display":true,"removed":true,"required":false,"displayName":"ownerUsername","defaultMatch":false,"canBeUsedToMatch":true},{"id":"ownerId","type":"string","display":true,"removed":true,"required":false,"displayName":"ownerId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"productType","type":"string","display":true,"removed":true,"required":false,"displayName":"productType","defaultMatch":false,"canBeUsedToMatch":true},{"id":"isSponsored","type":"string","display":true,"removed":true,"required":false,"displayName":"isSponsored","defaultMatch":false,"canBeUsedToMatch":true},{"id":"musicInfo","type":"string","display":true,"removed":true,"required":false,"displayName":"musicInfo","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"]},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik/edit#gid=0","cachedResultName":"Reels"},"documentId":{"__rl":true,"mode":"list","value":"1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1e1yIubmEXzzUrSCurXdXM2H6ioN2GEb1aOX5UBNNyik/edit?usp=drivesdk","cachedResultName":"Instagram Reel Database"}},"credentials":{"googleSheetsOAuth2Api":{"id":"EOibXIc4U8wcXyRR","name":"YouTube"}},"typeVersion":4.5}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"e5bf6014-38f0-43a2-be34-025e4291f0b7","connections":{"Limit":{"main":[[{"node":"Search for Entries","type":"main","index":0},{"node":"Drop Duplicates","type":"main","index":1}]]},"Add Entries":{"main":[[{"node":"Download Video","type":"main","index":0}]]},"Download Video":{"main":[[{"node":"Transcribe Video","type":"main","index":0}]]},"Drop Duplicates":{"main":[[{"node":"Add Entries","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Run Actor Synchronously","type":"main","index":0}]]},"Transcribe Video":{"main":[[{"node":"Filter & Generate Suggestions","type":"main","index":0}]]},"Write New Script":{"main":[[{"node":"Update Entries","type":"main","index":0}]]},"Search Perplexity":{"main":[[{"node":"Write New Script","type":"main","index":0}]]},"Search for Entries":{"main":[[{"node":"Drop Duplicates","type":"main","index":0}]]},"Run Actor Synchronously":{"main":[[{"node":"Limit","type":"main","index":0}]]},"Filter & Generate Suggestions":{"main":[[{"node":"Search Perplexity","type":"main","index":0}]]}}}


name: Forex News & Sentiment Telegram Alerts
author_name: Malik Hashir
author_username: malikx
categories: []
created_at: 2025-06-04T17:29:02.034Z
updated_at: 2025-06-04T17:29:02.034Z
url: https://n8n.io/workflows/4659
scraped_at: 2025-06-19 22:49:13
description:
  Purpose & Audience

  This n8n workflow template is designed for Forex traders, analysts, and enthusiasts who want to automate the process of staying updated on the latest news and sentiment for any currency pair. By leveraging advanced news aggregation and sentiment analysis, the workflow delivers concise, actionable updates directly to your Telegram—helping you make more informed trading decisions without manual research on news for broader market sentiment.

  What It Does?
  Aggregates the latest news from major Forex platforms for your chosen currency pair.
  Analyzes the news to extract market sentiment (bullish, bearish, or neutral) using an LLM.
  Summarizes key headlines, technical levels (support/resistance), and highlights high-impact economic events.
  Sends a neatly formatted update to your selected Telegram chat or group at your preferred schedule.

  Who Is It For?
  Forex traders seeking a competitive edge by staying ahead of market sentiment shifts.
  Analysts who want automated, unbiased news curation and sentiment summaries.
  Anyone looking for a hands-off, plug-and-play solution to monitor any currency pair.

  Setup once, and you can use this workflow for a lifetime. Simply duplicate the workflow for as many currency pairs as you want—customize the inputs, and you’re set! No recurring fees, no coding required, and you control the update frequency and destinations.

  How to Set Up?
  Choose your currency pair and set your preferred update schedule.
  Connect your LLM and Telegram credentials (simple, guided steps included).
  Specify where you want to receive the updates.
  That’s it—receive real-time, actionable Forex news and sentiment updates automatically.

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

workflow_json:
  {"meta":{"instanceId":"d04643ba872bb0fb252ed2c8197858d58cc47dd3c15ff6d08b19addd679e927b","templateCredsSetupCompleted":true},"nodes":[{"id":"89e47470-32c3-41f3-a204-e462353c1b2f","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-2740,1480],"parameters":{"content":""},"typeVersion":1},{"id":"70f22f05-6852-42ce-9067-14b2f6737654","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-560,1980],"parameters":{"content":""},"typeVersion":1},{"id":"0b262b17-e4a3-48b3-bbaa-e248403633ba","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1880,660],"parameters":{"content":""},"typeVersion":1},{"id":"167f32c5-534d-4921-8b7e-cb13ba0793d8","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-500,1420],"parameters":{"content":""},"typeVersion":1},{"id":"c8d90c8e-6aaf-45f9-87d5-5812d36b48d7","name":"Merge","type":"n8n-nodes-base.merge","position":[-1140,1600],"parameters":{},"typeVersion":3.1},{"id":"c8d3df3b-a8a5-4138-975c-90c8dae1477f","name":"RSS Read - GOOGLE","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1080],"parameters":{},"typeVersion":1.1},{"id":"94460646-64fb-47ad-b2a5-a67d7a3f1737","name":"RSS Read - FXSTREET","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1360],"parameters":{},"typeVersion":1.1},{"id":"9e987f83-b062-49c3-9c84-c23335fc3d3a","name":"RSS Read -  fxstreet news","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1220],"parameters":{},"typeVersion":1.1},{"id":"32cc633a-29f8-453e-9911-99316be8e1ef","name":"RSS Read - DAILYFX technical","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1500],"parameters":{},"typeVersion":1.1},{"id":"65d2e386-2c68-4785-902e-a1822bd3ed31","name":"RSS Read - DAILYFX fundamental","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1660],"parameters":{},"typeVersion":1.1},{"id":"677b8362-4482-4fe4-a84e-46f69e1658fe","name":"RSS Read - DAILYFX forexnews","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1820],"parameters":{},"typeVersion":1.1},{"id":"953908e0-357d-44be-b002-85d19575049f","name":"RSS Read - DAILYFX forex articles","type":"n8n-nodes-base.rssFeedRead","position":[-1660,1980],"parameters":{},"typeVersion":1.1},{"id":"b65d6a84-2f45-4284-b7bf-e2176aa18451","name":"RSS Read - FOREX LIVE technicals","type":"n8n-nodes-base.rssFeedRead","position":[-1660,2160],"parameters":{},"typeVersion":1.1},{"id":"fa91f6b5-c7c4-40de-86c0-e62da507d058","name":"RSS Read - FOREX LIVE central banks","type":"n8n-nodes-base.rssFeedRead","position":[-1660,2320],"parameters":{},"typeVersion":1.1},{"id":"ede5263d-6cb1-4f4a-adcd-e67f8e1640b9","name":"RSS Read - FOREX LIVE forexorders","type":"n8n-nodes-base.rssFeedRead","position":[-1660,2480],"parameters":{},"typeVersion":1.1},{"id":"e5e6521a-4838-4bd5-a3f4-667cc6ff36ec","name":"Filter","type":"n8n-nodes-base.filter","position":[-880,1740],"parameters":{},"typeVersion":2.2},{"id":"7c973bba-fb06-44ae-b13b-0f7d5f0231a7","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[-480,2040],"parameters":{},"typeVersion":1},{"id":"d37f99d5-bbec-4b76-ba96-28325f19f81c","name":"Code","type":"n8n-nodes-base.code","position":[-640,1740],"parameters":{},"typeVersion":2},{"id":"7e42a4b6-37eb-48ad-acea-7a41f1eb1c64","name":"Telegram","type":"n8n-nodes-base.telegram","position":[200,1720],"webhookId":"b655c643-9912-43a8-9d01-cf136ff37262","parameters":{},"typeVersion":1.2},{"id":"5d9ce7ea-69b6-4c58-876e-ee9b910f1a1b","name":"EURUSD News and Sentiment Analyst","type":"@n8n/n8n-nodes-langchain.agent","position":[-400,1740],"parameters":{},"typeVersion":1.8},{"id":"c267daf2-72a8-45d0-9145-20aabebeb6d9","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-2660,1640],"parameters":{},"typeVersion":1.2},{"id":"c6c12ad2-228a-4cd0-bd20-fc4d46dd7c32","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-940,1580],"parameters":{"content":""},"typeVersion":1}],"pinData":{"Schedule Trigger":[{"Hour":"00","Year":"2025","Month":"June","Minute":"00","Second":"22","Timezone":"Europe/London (UTC+01:00)","timestamp":"2025-06-04T00:00:22.006+01:00","Day of week":"Wednesday","Day of month":"04","Readable date":"June 4th 2025, 12:00:22 am","Readable time":"12:00:22 am"}]},"connections":{"Code":{"main":[[{"node":"EURUSD News and Sentiment Analyst","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Filter":{"main":[[{"node":"Code","type":"main","index":0}]]},"Telegram":{"main":[[]]},"Schedule Trigger":{"main":[[{"node":"RSS Read - GOOGLE","type":"main","index":0},{"node":"RSS Read -  fxstreet news","type":"main","index":0},{"node":"RSS Read - FXSTREET","type":"main","index":0},{"node":"RSS Read - DAILYFX technical","type":"main","index":0},{"node":"RSS Read - DAILYFX fundamental","type":"main","index":0},{"node":"RSS Read - DAILYFX forexnews","type":"main","index":0},{"node":"RSS Read - DAILYFX forex articles","type":"main","index":0},{"node":"RSS Read - FOREX LIVE technicals","type":"main","index":0},{"node":"RSS Read - FOREX LIVE central banks","type":"main","index":0},{"node":"RSS Read - FOREX LIVE forexorders","type":"main","index":0}]]},"RSS Read - GOOGLE":{"main":[[{"node":"Merge","type":"main","index":0}]]},"RSS Read - FXSTREET":{"main":[[{"node":"Merge","type":"main","index":2}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"EURUSD News and Sentiment Analyst","type":"ai_languageModel","index":0}]]},"RSS Read -  fxstreet news":{"main":[[{"node":"Merge","type":"main","index":1}]]},"RSS Read - DAILYFX forexnews":{"main":[[{"node":"Merge","type":"main","index":5}]]},"RSS Read - DAILYFX technical":{"main":[[{"node":"Merge","type":"main","index":3}]]},"RSS Read - DAILYFX fundamental":{"main":[[{"node":"Merge","type":"main","index":4}]]},"RSS Read - FOREX LIVE technicals":{"main":[[{"node":"Merge","type":"main","index":7}]]},"EURUSD News and Sentiment Analyst":{"main":[[{"node":"Telegram","type":"main","index":0}]]},"RSS Read - DAILYFX forex articles":{"main":[[{"node":"Merge","type":"main","index":6}]]},"RSS Read - FOREX LIVE forexorders":{"main":[[{"node":"Merge","type":"main","index":9}]]},"RSS Read - FOREX LIVE central banks":{"main":[[{"node":"Merge","type":"main","index":8}]]}}}


name: Automate Service Ticket Triage with GPT-4o & Taiga
author_name: Eric Mooney
author_username: emooney
categories: []
created_at: 2025-06-04T21:19:13.071Z
updated_at: 2025-06-04T21:19:13.071Z
url: https://n8n.io/workflows/4665
scraped_at: 2025-06-19 22:50:33
description:
  Usecase: When a new service ticket is created in Taiga, it's often unclear whether it contains sufficient details to begin work. This workflow automates the triage process by:

  Using an AI model to extract key information from the ticket description.
  Automatically assigning values for:
     Type (Bug, Enhancement, Onboarding, Question)
     Severity (Wishlist, Minor, Normal, Important, Critical)
     Priority (Low, Normal, High)
     Status (New, Needs More Info, etc.)
  Detecting missing critical data and blocking the ticket if incomplete.

  Setup instructions here:
  https://github.com/emooney/Service_Ticket_Triage_Helper

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

workflow_json:
  {"id":"YMlKRgPrCs1HCvXm","meta":{"instanceId":"c1cc2e18d32a91e26eb78bbc6373615a06451476e56efe94394fc82c93d00305","templateCredsSetupCompleted":true},"name":"Service Ticket Triage Helper","tags":[],"nodes":[{"id":"588eb65e-0053-432f-a11e-2bb690674a35","name":"Service Ticket Created","type":"n8n-nodes-base.taigaTrigger","position":[-880,780],"webhookId":"b6256ab6-982d-4e60-942d-d6b3c1303752","parameters":{"projectId":1694047,"resources":["issue"],"operations":["create"]},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"b16043dc-50b9-4645-85c9-ca5ee0570c13","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-920,360],"parameters":{"width":680,"height":340,"content":"## Service Ticket Triage Helper\nUsecase: When a service ticket comes in, it's possible that it may not have enough information to act on. So we use AI to help classify the information to determine if there's enough information. \n \nNeed to determine the following fields from the initial ticket:\n\n1. Can the 'Type' be determined?\n2. Can the 'Priority' be determined?\n3. Can the 'Recipient' be determined?\n4. Can the 'Status' be determined?\n5. 'Missing' will have what is missing in the ticket. \n\nIf all of these can be determined, then we can set the status accordingly. If not, then we set the status to \"Needs More Info\" and populate the \"Missing\" parameter with the issue. The ticket also is set to 'Blocker' so it cannot move forward until the issue is resolved. "},"typeVersion":1},{"id":"b938cc45-66d8-4ddf-9e47-a9859d4de23f","name":"More Info Needed?","type":"n8n-nodes-base.if","position":[1036,780],"parameters":{"options":{"ignoreCase":"={{ true }}"},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":false,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"d5dcb6ce-fc47-4519-9403-cbc1e581cf4f","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Status }}","rightValue":"=Needs More Info"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"d770d99b-aa29-4730-873f-e1a0f89f1d8b","name":"Set Type to Question","type":"n8n-nodes-base.taiga","position":[-64,480],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"type":5097140}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"f1819ad7-3c53-4791-b419-f42264a65214","name":"Define Type","type":"n8n-nodes-base.switch","position":[-284,759],"parameters":{"rules":{"values":[{"outputKey":"Question","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"c7b02551-5aa0-41e4-a99a-ca58987e0ccb","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.output.Type }}","rightValue":"Question"}]},"renameOutput":true},{"outputKey":"Enhancement","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"28b9e2a1-ccc3-45c3-81e3-96fa08340f63","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.output.Type }}","rightValue":"Enhancement"}]},"renameOutput":true},{"outputKey":"Bug","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"974e3244-80b3-481d-9ae2-bf01e337b3a6","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.output.Type }}","rightValue":"Bug"}]},"renameOutput":true},{"outputKey":"Onboarding","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4321a8f3-ecc4-483f-b598-bc13d094a95a","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.output.Type }}","rightValue":"Onboarding"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"ff5cb1d2-b375-4446-b0ea-93765aef6873","name":"Set Type to Enhancement","type":"n8n-nodes-base.taiga","position":[-64,680],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"type":5097141}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"b192a22d-05ed-4f32-bb38-fa116e5fb964","name":"Set Type to Bug","type":"n8n-nodes-base.taiga","position":[-64,880],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"type":5097139}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"9a8f5eb9-90b6-499a-86a3-1fb49a08e198","name":"Set to Needs Info & Block","type":"n8n-nodes-base.taiga","position":[1260,760],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"status":11860979,"is_blocked":true,"description":"=We need more information to forward this ticket: \n{{ $('AI Agent').item.json.output.Missing }}\n\nExisting information: \n{{ $('Service Ticket Created').item.json.data.description }}"}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"68929c1a-a3eb-42d3-9ce5-e4c925fa12a6","name":"Set Type to Onboarding","type":"n8n-nodes-base.taiga","position":[-64,1080],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"type":5099270}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"9ab8069b-c4c1-41cf-a44d-876283374fa7","name":"Define Severity","type":"n8n-nodes-base.switch","position":[156,738],"parameters":{"rules":{"values":[{"outputKey":"Wishlist","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4321a8f3-ecc4-483f-b598-bc13d094a95a","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Severity }}","rightValue":"Wishlist"}]},"renameOutput":true},{"outputKey":"Minor","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"c7b02551-5aa0-41e4-a99a-ca58987e0ccb","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Severity }}","rightValue":"Minor"}]},"renameOutput":true},{"outputKey":"Normal","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"28b9e2a1-ccc3-45c3-81e3-96fa08340f63","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Severity }}","rightValue":"Normal"}]},"renameOutput":true},{"outputKey":"Critical","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"974e3244-80b3-481d-9ae2-bf01e337b3a6","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Severity }}","rightValue":"Critical"}]},"renameOutput":true},{"outputKey":"Important","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ffa060f2-d701-4ee3-8ebf-9cd43070cb26","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Severity }}","rightValue":"Important"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"28960c04-ec26-4815-b046-ff40a278b91c","name":"Set Severity to Wishlist","type":"n8n-nodes-base.taiga","position":[376,380],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"severity":8467039}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"6645c07e-269a-490a-a734-225ea344831b","name":"Set Severity to Minor","type":"n8n-nodes-base.taiga","position":[376,580],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"severity":8467040}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"05ec7c2a-4390-464c-b3c2-4ba792018e87","name":"Set Severity to Normal","type":"n8n-nodes-base.taiga","position":[376,780],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"severity":8467041}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"b3710431-d5d2-47d2-8c04-764370aceb74","name":"Set Severity to Critical","type":"n8n-nodes-base.taiga","position":[376,980],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"severity":8467043}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"f5b69f61-b6cb-4698-840e-85ee66a953ac","name":"Set Severity to Important","type":"n8n-nodes-base.taiga","position":[376,1180],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"severity":8467042}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"d1fe2173-51d0-4d37-bcaf-0b556c0966cc","name":"Define Priority","type":"n8n-nodes-base.switch","position":[596,780],"parameters":{"rules":{"values":[{"outputKey":"Low","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4321a8f3-ecc4-483f-b598-bc13d094a95a","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Priority }}","rightValue":"Low"}]},"renameOutput":true},{"outputKey":"Normal","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"c7b02551-5aa0-41e4-a99a-ca58987e0ccb","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Priority }}","rightValue":"Normal"}]},"renameOutput":true},{"outputKey":"High","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"28b9e2a1-ccc3-45c3-81e3-96fa08340f63","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('AI Agent').item.json.output.Priority }}","rightValue":"High"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"04621fab-ad8c-4ac1-a34b-7b0ffdd8f0ed","name":"Set Priority To Low","type":"n8n-nodes-base.taiga","position":[816,580],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"priority":5086090}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"9d44c422-7ddc-4c03-93bd-78ba0f0d6cc0","name":"Set Priority To High","type":"n8n-nodes-base.taiga","position":[816,980],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"priority":5086092}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"67ae7694-b345-4a96-8749-7f036d071f8b","name":"Set Priority To Normal","type":"n8n-nodes-base.taiga","position":[816,780],"parameters":{"issueId":"={{ $('Service Ticket Created').item.json.data.id }}","operation":"update","projectId":"={{ $('Service Ticket Created').item.json.data.project.id }}","updateFields":{"priority":5086091}},"credentials":{"taigaApi":{"id":"YlBnqAiNyP5fKz1v","name":"Taiga account"}},"typeVersion":1},{"id":"5728f70b-7787-41b7-8271-6b89ae17a142","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-660,780],"parameters":{"text":"={{ $json.data.subject }}","options":{"systemMessage":"You are a helpful AI assistant designed to analyze Taiga service ticket descriptions and extract these 4 fields and their values from the description:\n\nType: [Bug, Question, Enhancement, Onboarding]\nSeverity: [Wishlist, Minor, Normal, Important, Critical]\nPriority: [Low, Normal, High]\nStatus: [New, Rejected, Needs More Info]\nMissing: Blank if all the info is in the ticket\n\nEach parameter will return one of these options each. \nIf the status is \"Needs More Info\" then, it should say what's missing in the 'Missing' Parameter. "},"promptType":"define","hasOutputParser":true},"typeVersion":1.9},{"id":"0c281d01-dfab-4d91-8838-23446d269f67","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[-512,1000],"parameters":{"jsonSchemaExample":"{\n  \"Type\": \"Bug\",\n  \"Severity\": \"Important\",\n  \"Priority\": \"Medium\",\n  \"Status\": \"New\",\n  \"Missing\": \"Need more information about the fix. Where is it and what's the problem that is happening?\" \n  \n}"},"typeVersion":1.2},{"id":"c00a96ca-4c20-44c0-91d3-2b9586008368","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-632,1000],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"DZaBabO9u605tAtZ","name":"OpenAi account"}},"typeVersion":1.2}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"db6d4091-3c3f-4ba8-8e86-bd130ff06b74","connections":{"AI Agent":{"main":[[{"node":"Define Type","type":"main","index":0}]]},"Define Type":{"main":[[{"node":"Set Type to Question","type":"main","index":0}],[{"node":"Set Type to Enhancement","type":"main","index":0}],[{"node":"Set Type to Bug","type":"main","index":0}],[{"node":"Set Type to Onboarding","type":"main","index":0}]]},"Define Priority":{"main":[[{"node":"Set Priority To Low","type":"main","index":0}],[{"node":"Set Priority To Normal","type":"main","index":0}],[{"node":"Set Priority To High","type":"main","index":0}]]},"Define Severity":{"main":[[{"node":"Set Severity to Wishlist","type":"main","index":0}],[{"node":"Set Severity to Minor","type":"main","index":0}],[{"node":"Set Severity to Normal","type":"main","index":0}],[{"node":"Set Severity to Critical","type":"main","index":0}],[{"node":"Set Severity to Important","type":"main","index":0}]]},"Set Type to Bug":{"main":[[{"node":"Define Severity","type":"main","index":0}]]},"More Info Needed?":{"main":[[{"node":"Set to Needs Info & Block","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Set Priority To Low":{"main":[[{"node":"More Info Needed?","type":"main","index":0}]]},"Set Priority To High":{"main":[[{"node":"More Info Needed?","type":"main","index":0}]]},"Set Type to Question":{"main":[[{"node":"Define Severity","type":"main","index":0}]]},"Set Severity to Minor":{"main":[[{"node":"Define Priority","type":"main","index":0}]]},"Service Ticket Created":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Set Priority To Normal":{"main":[[{"node":"More Info Needed?","type":"main","index":0}]]},"Set Severity to Normal":{"main":[[{"node":"Define Priority","type":"main","index":0}]]},"Set Type to Onboarding":{"main":[[{"node":"Define Severity","type":"main","index":0}]]},"Set Type to Enhancement":{"main":[[{"node":"Define Severity","type":"main","index":0}]]},"Set Severity to Critical":{"main":[[{"node":"Define Priority","type":"main","index":0}]]},"Set Severity to Wishlist":{"main":[[{"node":"Define Priority","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"AI Agent","type":"ai_outputParser","index":0}]]},"Set Severity to Important":{"main":[[{"node":"Define Priority","type":"main","index":0}]]}}}


name: Extract Website URLs from Sitemap.XML for SEO Analysis
author_name: Le Thua Phu
author_username: lethuaphu
nodes_used: ["n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-06-05T03:47:49.851Z
updated_at: 2025-06-05T03:47:49.851Z
url: https://n8n.io/workflows/4671
scraped_at: 2025-06-19 22:48:53
description:
  Overview
  This n8n workflow automates the process of crawling a website's sitemap to extract URLs, which is particularly useful for SEO analysis, website auditing, or content monitoring. By leveraging n8n's nodes, the workflow fetches the sitemap from a specified URL, processes the XML data, and extracts individual URLs, which can then be converted into a downloadable file or integrated with tools like Google Sheets.

  How It Works
  The workflow operates in a sequential manner, utilizing a series of nodes to fetch, parse, and process sitemap data:
  Trigger: Initiates when the user clicks "Test workflow" (Manual Trigger node).
  Set URL: Defines the base domain (e.g., https://phu.io.vn/) for the sitemap (Set URL node).
  Crawl Sitemap: Fetches the main sitemap file (sitemap.xml) from the specified domain using an HTTP request (Crawl sitemap node).
  Parse XML: Converts the sitemap XML into a JSON format for easier processing (XML node).
  Split Sitemap: Extracts individual sitemap entries (e.g., &lt;sitemap&gt; tags) from the parsed data (Split Out node).
  Crawl Sub-Sitemap: Fetches each sub-sitemap URL listed in the main sitemap (Crawl sitemap 2 node).
  Parse Sub-Sitemap XML: Converts the sub-sitemap XML into JSON (XML 2 node).
  Split URLs: Extracts individual URLs (e.g., &lt;url&gt; tags) from the sub-sitemap (Split Out 2 node).
  Convert to File: Saves the extracted URLs into a file for download or further use (Convert to File node).

  This workflow supports both single sitemap files and sitemap indexes that reference multiple sub-sitemaps, ensuring comprehensive URL extraction.

  How to Use
  To implement this workflow in n8n, follow these steps:
  Set Up n8n: Ensure you have an active n8n instance (Cloud, npm, or self-hosted). Refer to the n8n documentation for setup instructions.
  Import Workflow: Copy the JSON from the provided Extract Website URLs from Sitemap.XML for SEO Analysis.json file and import it into your n8n instance via the workflow editor.
  Configure the Domain:
     In the Set URL node, update the Domain parameter with the target website's base URL (e.g., https://example.com/).
     Alternatively, in the Crawl sitemap node, directly paste the full sitemap URL if known (e.g., https://example.com/sitemap.xml).
  Test the Workflow:
     Click "Test workflow" to execute the Manual Trigger node.
     Verify that the workflow fetches the sitemap and processes the URLs correctly.
  Download or Integrate:
     The Convert to File node generates a file containing the extracted URLs.
     Optionally, replace this node with a Google Sheets node to append URLs to a spreadsheet. Refer to the Google Sheets node documentation for setup.
  Save and Activate: Save the workflow and activate it for production use if needed, using a trigger like a schedule or webhook (see Trigger Node).

  Requirements
  n8n Instance**: An active n8n instance (version 1.0 or later recommended) on n8n Cloud, npm, or self-hosted (Docker). See Choose your n8n for details.
  Technical Knowledge**: Basic understanding of n8n's editor UI and node configuration. Familiarity with XML sitemaps is helpful but not mandatory.
  Permissions**: For self-hosted setups, ensure the n8n process has network access to fetch the sitemap URL. For Docker deployments, verify permissions as outlined in the n8n v1.0 migration guide.
  Optional**: If integrating with Google Sheets, valid Google Sheets credentials are required (see Credentials).
  Timeout Configuration**: The HTTP Request nodes (Crawl sitemap and Crawl sitemap 2) have a 10-second timeout. Adjust the timeout parameter in the node settings if dealing with slow-responding servers.

  FAQ
  Q: What happens if the sitemap is large or contains many sub-sitemaps?  
  A: The workflow handles sitemap indexes by splitting and processing each sub-sitemap individually. For very large sitemaps, ensure your n8n instance has sufficient resources (memory and CPU) to avoid performance issues. See Scaling n8n for optimization tips.

  Q: Can I use this workflow with a specific sitemap URL instead of a domain?  
  A: Yes, in the Crawl sitemap node, replace the url parameter ({{ $json.Domain }}sitemap.xml) with the direct sitemap URL (e.g., https://example.com/sitemap.xml). Update the node’s notes for clarity.

  Q: Why am I getting a timeout error?  
  A: The HTTP Request nodes have a default timeout of 10 seconds. If the target server is slow, increase the timeout value in the options parameter of the Crawl sitemap or Crawl sitemap 2 nodes.

  Q: How can I save the URLs to Google Sheets instead of a file?  
  A: Replace the Convert to File node with a Google Sheets node. Configure it with your Google Sheets credentials and map the loc field from the Split Out 2 node to the desired spreadsheet column. Refer to the Google Sheets node documentation.

  Q: Is this workflow compatible with older n8n versions?  
  A: The workflow uses nodes compatible with n8n version 1.0 and later. For older versions, check for deprecated features (e.g., MySQL support) in the n8n v1.0 migration guide.

  Q: Can I automate this workflow to run periodically?  
  A: Yes, replace the Manual Trigger node with a Schedule Trigger node to run the workflow at set intervals. See Trigger Nodes for configuration details.

  For further assistance, consult the n8n Community Forum or submit an issue on the n8n GitHub repository.

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

workflow_json:
  {"id":"n2iZmshLmcXubEpo","meta":{"instanceId":"e704ee1a5300eff6019042bec66778b3a26c1aec8f3e21c554a16dd7216a94ee","templateCredsSetupCompleted":true},"name":"Extract Website URLs from Sitemap.XML for SEO Analysis","tags":[{"id":"MePRktFsL1ttwWdT","name":"website","createdAt":"2025-05-12T18:47:34.764Z","updatedAt":"2025-05-12T18:47:34.764Z"},{"id":"xutdortHHmV1yNZB","name":"SEO","createdAt":"2025-03-24T16:18:45.828Z","updatedAt":"2025-03-24T16:18:45.828Z"}],"nodes":[{"id":"6d91a84e-bf2b-4118-9e35-5baecda1b14b","name":"XML","type":"n8n-nodes-base.xml","position":[340,-40],"parameters":{"options":{}},"typeVersion":1},{"id":"65f12b51-d34c-4e87-b581-e29370eb0554","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-320,-40],"parameters":{},"typeVersion":1},{"id":"b82a0bce-0dd4-4a64-b60a-64ea4021bee5","name":"Split Out","type":"n8n-nodes-base.splitOut","position":[560,-40],"parameters":{"options":{},"fieldToSplitOut":"sitemapindex.sitemap"},"typeVersion":1},{"id":"0e97abde-ba13-4889-979d-0f0e5b085dcb","name":"Set URL","type":"n8n-nodes-base.set","notes":"Set full URL - not domain","position":[-100,-40],"parameters":{"options":{},"assignments":{"assignments":[{"id":"fa078c97-4c7c-4c08-a011-5527661997c6","name":"Domain","type":"string","value":"https://phu.io.vn/"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"146a5e34-d64a-450b-8354-770c90547325","name":"Convert to File","type":"n8n-nodes-base.convertToFile","position":[1440,-40],"parameters":{"options":{},"binaryPropertyName":"={{ $json.loc }}"},"typeVersion":1.1},{"id":"0c1f8d18-ca4b-4996-9928-abbc6d45b227","name":"Crawl sitemap","type":"n8n-nodes-base.httpRequest","notes":"or past sitemap URL at here","position":[120,-40],"parameters":{"url":"={{ $json.Domain }}sitemap.xml","options":{"timeout":10000},"responseFormat":"string"},"notesInFlow":true,"typeVersion":1},{"id":"eaa43363-d059-4c66-8851-7e85d4fb5bd3","name":"Crawl sitemap 2","type":"n8n-nodes-base.httpRequest","position":[780,-40],"parameters":{"url":"={{ $json.loc }}","options":{"timeout":10000},"responseFormat":"string"},"typeVersion":1},{"id":"692efb13-a6ce-4667-842b-614cf9ee8315","name":"XML 2","type":"n8n-nodes-base.xml","position":[1000,-40],"parameters":{"options":{}},"typeVersion":1},{"id":"88a15568-352f-4997-ae2b-522a2713843d","name":"Split Out 2","type":"n8n-nodes-base.splitOut","position":[1220,-40],"parameters":{"options":{},"fieldToSplitOut":"urlset.url"},"typeVersion":1},{"id":"e0e0fb12-1dc5-4665-9530-6b53ed7dc593","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-160,-240],"parameters":{"width":440,"height":360,"content":"## Set website URL at node 1 (or paste sitemap URL at node 2)"},"typeVersion":1},{"id":"fc9d88ce-4ec0-4581-b1ff-7c007bdf5f0b","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1340,-200],"parameters":{"color":4,"width":300,"height":320,"content":"## Download file at here\n(or replace this node = Gooogle sheet node)\n"},"typeVersion":1},{"id":"39f13360-e94d-4b33-b258-5e8837daab4f","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-980,-460],"parameters":{"color":6,"width":600,"height":940,"content":"# FAQ\n## Q: What happens if the sitemap is large or contains many sub-sitemaps?\n\nA: The workflow handles sitemap indexes by splitting and processing each sub-sitemap individually. For very large sitemaps, ensure your n8n instance has sufficient resources (memory and CPU) to avoid performance issues. See Scaling n8n for optimization tips.\n\n## Q: Can I use this workflow with a specific sitemap URL instead of a domain?\n\nA: Yes, in the Crawl sitemap node, replace the url parameter ({{ $json.Domain }}sitemap.xml) with the direct sitemap URL (e.g., https://example.com/sitemap.xml). Update the node’s notes for clarity.\n\n## Q: Why am I getting a timeout error?\n\nA: The HTTP Request nodes have a default timeout of 10 seconds. If the target server is slow, increase the timeout value in the options parameter of the Crawl sitemap or Crawl sitemap 2 nodes.\n\n## Q: How can I save the URLs to Google Sheets instead of a file?\n\nA: Replace the Convert to File node with a Google Sheets node. Configure it with your Google Sheets credentials and map the loc field from the Split Out 2 node to the desired spreadsheet column. Refer to the Google Sheets node documentation.\n\n## Q: Is this workflow compatible with older n8n versions?\n\nA: The workflow uses nodes compatible with n8n version 1.0 and later. For older versions, check for deprecated features (e.g., MySQL support) in the n8n v1.0 migration guide."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"d2ef17d5-a482-4b0d-b48a-83d5bd146b9f","connections":{"XML":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"XML 2":{"main":[[{"node":"Split Out 2","type":"main","index":0}]]},"Set URL":{"main":[[{"node":"Crawl sitemap","type":"main","index":0}]]},"Split Out":{"main":[[{"node":"Crawl sitemap 2","type":"main","index":0}]]},"Split Out 2":{"main":[[{"node":"Convert to File","type":"main","index":0}]]},"Crawl sitemap":{"main":[[{"node":"XML","type":"main","index":0}]]},"Convert to File":{"main":[[]]},"Crawl sitemap 2":{"main":[[{"node":"XML 2","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Set URL","type":"main","index":0}]]}}}


name: Voice Creation, TTS, Sound Effects, Voicechanger & more! 🎧 Elevenlabs MCP Server
author_name: David Ashby
author_username: cfomodz
nodes_used: []
categories: []
created_at: 2025-06-05T04:18:44.626Z
updated_at: 2025-06-05T04:18:44.626Z
url: https://n8n.io/workflows/4672
scraped_at: 2025-06-19 22:49:10
description:
  This workflow provides a complete set of tools for interacting with the ElevenLabs voice API, enabling AI-powered text-to-speech, voice management, and audio processing capabilities.

  Features 🚀

  Text-to-Speech Operations
  Convert text to speech with customizable voice settings
  Generate speech with timestamps for precise audio control
  Stream text-to-speech in real-time
  Stream text-to-speech with timestamps for live applications

  Voice Management 🗣️
  List all available voices
  Get detailed information about specific voices
  Delete custom voices
  Edit voice properties (name and description)
  Find similar voices based on voice ID

  Audio Processing 🎧
  Create transcripts from audio
  Apply voice changing effects
  Generate sound effects
  Isolate audio components
  Design and preview new voices
  Save voice previews as new voices

  Requirements ⚙️
  An ElevenLabs API key
  n8n instance with HTTP Request Tool node
  MCP Server Trigger node for AI integration

  Setup 🔧
  Import the workflow into your n8n instance
  Configure your ElevenLabs API key in the workflow settings
  The workflow uses AI expressions for voice IDs with a fallback value of Z9hrfEHGU3dykHntWvIY

  Usage 📝
  All nodes are connected to the MCP Server Trigger for AI-powered interactions

  Example Use Cases 💡
  Generate natural-sounding speech from text
  Create and manage custom voices
  Process and transform audio files
  Build voice-based applications
  Integrate ElevenLabs capabilities into existing workflows

  Technical Details 🔍
  All endpoints use proper error handling
  Voice ID parameters use AI expressions with fallback values
  Nodes are organized in logical groups for better workflow management
  Includes comprehensive parameter validation
  Supports streaming and real-time processing

  Support 🤝
  For issues or questions, please refer to:
  ElevenLabs API Documentation
  n8n Documentation
  n8n Community 

workflow_json:
  {"meta":{"instanceId":"cd59eaaeb7b34d06e24511380db94cdb7fbce6037cc4de22e539c5158ab9cdfc"},"nodes":[{"id":"text-to-speech","name":"Text to Speech","type":"n8n-nodes-base.httpRequestTool","position":[920,-20],"parameters":{},"typeVersion":4.2},{"id":"text-to-speech-with-timestamps","name":"Text to Speech with Timestamps","type":"n8n-nodes-base.httpRequestTool","position":[980,140],"parameters":{},"typeVersion":4.2},{"id":"stream-text-to-speech","name":"Stream Text to Speech","type":"n8n-nodes-base.httpRequestTool","position":[1020,360],"parameters":{},"typeVersion":4.2},{"id":"stream-text-to-speech-with-timestamps","name":"Stream Text to Speech with Timestamps","type":"n8n-nodes-base.httpRequestTool","position":[820,340],"parameters":{},"typeVersion":4.2},{"id":"create-transcript","name":"Create Transcript","type":"n8n-nodes-base.httpRequestTool","position":[540,-20],"parameters":{},"typeVersion":4.2},{"id":"voice-changer","name":"Voice Changer","type":"n8n-nodes-base.httpRequestTool","position":[1200,120],"parameters":{},"typeVersion":4.2},{"id":"create-sound-effect","name":"Create Sound Effect","type":"n8n-nodes-base.httpRequestTool","position":[520,140],"parameters":{},"typeVersion":4.2},{"id":"audio-isolation","name":"Audio Isolation","type":"n8n-nodes-base.httpRequestTool","position":[1360,200],"parameters":{},"typeVersion":4.2},{"id":"voice-design","name":"Voice Design","type":"n8n-nodes-base.httpRequestTool","position":[120,-220],"parameters":{},"typeVersion":4.2},{"id":"save-voice-preview","name":"Save Voice Preview","type":"n8n-nodes-base.httpRequestTool","position":[300,-220],"parameters":{},"typeVersion":4.2},{"id":"list-voices","name":"List Voices","type":"n8n-nodes-base.httpRequestTool","position":[1280,-260],"parameters":{},"typeVersion":4.2},{"id":"get-voice","name":"Get Voice","type":"n8n-nodes-base.httpRequestTool","position":[1440,-260],"parameters":{},"typeVersion":4.2},{"id":"delete-voice","name":"Delete Voice","type":"n8n-nodes-base.httpRequestTool","position":[300,-40],"parameters":{},"typeVersion":4.2},{"id":"edit-voice","name":"Edit Voice","type":"n8n-nodes-base.httpRequestTool","position":[120,-40],"parameters":{},"typeVersion":4.2},{"id":"list-similar-voices","name":"List Similar Voices","type":"n8n-nodes-base.httpRequestTool","position":[1380,-120],"parameters":{},"typeVersion":4.2},{"id":"da2c02c3-6417-46fe-a17c-ab1a6b378d1f","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[820,-80],"parameters":{"content":""},"typeVersion":1},{"id":"7bd1688c-8046-4102-8be4-047543384489","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[800,320],"parameters":{"content":""},"typeVersion":1},{"id":"9092d868-6fa5-454b-bfd2-04f97753004c","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1120,80],"parameters":{"content":""},"typeVersion":1},{"id":"2fd902e5-f3d0-401d-ae47-ff1abce964c6","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[60,-280],"parameters":{"content":""},"typeVersion":1},{"id":"898601d4-e685-4d7f-9b6c-2e56fd0a8e8c","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[440,-60],"parameters":{"content":""},"typeVersion":1},{"id":"f9909e0c-07aa-4877-b98b-90724a124d49","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[1220,-340],"parameters":{"content":""},"typeVersion":1},{"id":"d6813f92-5722-4d97-bb9e-0c573ba32202","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[920,140],"parameters":{"content":""},"typeVersion":1},{"id":"mcp-trigger","name":"Elevenlabs API MCP Server","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[752,-240],"webhookId":"1ee78466-25ce-4645-ad7b-0de19ddbbb99","parameters":{},"typeVersion":1},{"id":"f34f0616-7234-49ff-a23e-8980610d7bc3","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[540,-400],"parameters":{"content":""},"typeVersion":1}],"pinData":{},"connections":{"Get Voice":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Edit Voice":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"List Voices":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Delete Voice":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Voice Design":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Voice Changer":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Text to Speech":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Audio Isolation":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Create Transcript":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Save Voice Preview":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Create Sound Effect":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"List Similar Voices":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Stream Text to Speech":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Elevenlabs API MCP Server":{"ai_tool":[[]]},"Text to Speech with Timestamps":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]},"Stream Text to Speech with Timestamps":{"ai_tool":[[{"node":"Elevenlabs API MCP Server","type":"ai_tool","index":0}]]}}}


name: Generate AI-Powered LinkedIn Posts with Ollama, Image Creation, and Gmail Delivery
author_name: Aashit Sharma
author_username: aashitsharma
categories: []
created_at: 2025-06-05T05:05:57.769Z
updated_at: 2025-06-05T05:05:57.769Z
url: https://n8n.io/workflows/4674
scraped_at: 2025-06-19 22:48:41
description:
  This automation flow is designed to generate professional, research-backed LinkedIn posts based on a user-submitted topic and audience, enhance it with a visually aligned image prompt, and then automatically send the post and image via Gmail and/or publish it to LinkedIn.
  ⚙️ How It Works (Step-by-Step):
  📝 Form Submission (Input Trigger)

      A user fills out a form with:

          Email

          Topic of the Post

          Target Audience

      This form submission acts as the entry point of the workflow (Form Trigger node).

  🤖 LinkedIn Post Generation Agent

      An AI agent is triggered that:

          Uses Tavily API to fetch real-time web search content related to the topic.

          Processes the topic and audience data using an Ollama Chat Model.

          Generates a well-structured LinkedIn post that includes:

              Hook

              Educational insight

              Professional tone

              Source citations

              Hashtags and call to action

  🎨 Image Prompt Agent

      The generated post is passed to a second agent that:

          Extracts the core message.

          Converts it into a graphic prompt using a different Ollama LLM.

          The prompt is written to be used by an image-generation model like DALL·E or Gemma/GPT-based image tools.

  🖼️ Image Generation

      The image prompt is passed to a local image generation endpoint (localhost:8098) or OpenAI (api.openai.com) to generate a visual asset.

      The base64 image is converted into a file.

  📩 Email Dispatch

      The post text and the generated image are then sent to the user’s email address via the Gmail node.

      The email includes:

          The full LinkedIn post

          The auto-generated image as an attachment

  🔗 LinkedIn Publishing (Optional)

      If OAuth is enabled, the post can also be published directly to LinkedIn using the LinkedIn node.

  🛠️ Tools Used:

      n8n: Orchestration platform

      OpenRouter & Ollama: Local/hosted LLMs for post and prompt generation

      Tavily API: Real-time web search

      OpenAI or Local Endpoint: Image generation from text

      SMTP (Gmail): For sending emails

      LinkedIn API: For automated posting

  📦 Key Features:

      End-to-end automation from form to email/post

      Uses real-time research for accuracy

      Creative visual generation with professional branding intent

      Works locally or with cloud APIs

      Modular: Can switch tools or endpoints (OpenAI ↔ Localhost, Ollama ↔ OpenRouter)

  🚀 Ideal Use Cases:

      Marketing teams needing fast content turnaround

      Personal branding assistants

      Founders, freelancers, and executives sharing thought leadership

      University or organization-wide communication systems

nodes_used:
  ["n8n-nodes-base.emailSend","n8n-nodes-base.httpRequest","n8n-nodes-base.linkedIn","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOllama","@n8n/n8n-nodes-langchain.toolHttpRequest"]

workflow_json:
  {"id":"Bh88SWMuqHN92zEA","meta":{"instanceId":"473ff4054f1a6c3ed6f17a2b4a2e55676fe5b921cceb87b2256e6c416c158559","templateCredsSetupCompleted":true},"name":"Auto-post generation","tags":[],"nodes":[{"id":"590b9032-e9bf-431f-b506-9f3d01d2da00","name":"LinkedIn Post Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1300,-140],"parameters":{},"typeVersion":1.9},{"id":"496f60a7-4d0b-43e9-a7f6-e535c4dd7ff6","name":"Image Prompt Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1740,-140],"parameters":{},"typeVersion":1.9},{"id":"80f421bf-bb49-413b-820b-cbadbe62f6d9","name":"On form submission","type":"n8n-nodes-base.formTrigger","position":[1020,-140],"webhookId":"359fa996-5531-40ae-be37-4a6e136952e2","parameters":{},"typeVersion":2.2},{"id":"ee27bf52-811a-46ee-9eb2-7c2d350b57d7","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1240,-240],"parameters":{"content":""},"typeVersion":1},{"id":"d79ef703-2aee-4273-a7e6-63aaa83a0888","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[2100,-240],"parameters":{"content":""},"typeVersion":1},{"id":"7045e571-590a-4a1e-b37a-49e258e4b319","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2580,-240],"parameters":{"content":""},"typeVersion":1},{"id":"6b10e9be-9bba-4869-b0c6-27177bb12a78","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1640,-240],"parameters":{"content":""},"typeVersion":1},{"id":"52869b63-cba1-49e1-a2d9-b80c4d2d7609","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[940,-240],"parameters":{"content":""},"typeVersion":1},{"id":"6f2305a9-9644-45e6-b49c-81d2a9d10acf","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1240,40],"parameters":{"content":""},"typeVersion":1},{"id":"5fa51108-32bb-45bf-9780-d628443190e1","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[200,-240],"parameters":{"content":""},"typeVersion":1},{"id":"22f7dbdd-cebb-404e-b8ad-93a5026d17c6","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[1040,500],"parameters":{},"typeVersion":1},{"id":"f39bf200-9bf0-44f6-b4a1-e1b17411ba52","name":"Convert to File","type":"n8n-nodes-base.convertToFile","position":[1480,500],"parameters":{},"typeVersion":1.1},{"id":"f918e7c3-9132-4fb2-98c5-e3207e150bda","name":"Generate Image1","type":"n8n-nodes-base.httpRequest","position":[1260,500],"parameters":{},"typeVersion":4.2},{"id":"b58177e4-0e2d-41eb-a84e-8ae50f43bfd4","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[940,360],"parameters":{"content":""},"typeVersion":1},{"id":"42e54350-0f18-4ea9-a97c-f6250392c8e4","name":"Tavily","type":"@n8n/n8n-nodes-langchain.toolHttpRequest","position":[1460,140],"parameters":{},"typeVersion":1.1},{"id":"413ee3a8-2592-4170-805c-78ea9bcf8d20","name":"Ollama Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOllama","position":[1300,140],"parameters":{},"typeVersion":1},{"id":"05fa8332-48ca-412d-aac5-cf4b1be56ee3","name":"Ollama Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOllama","position":[1780,160],"parameters":{},"typeVersion":1},{"id":"ae39b076-3801-436a-ba34-5b0bc209165e","name":"Generate Image2","type":"n8n-nodes-base.httpRequest","position":[2180,-160],"parameters":{},"typeVersion":4.2},{"id":"e4e1ba34-5678-4098-b168-c2fd6949364d","name":"Download Image","type":"n8n-nodes-base.httpRequest","position":[2380,-160],"parameters":{},"typeVersion":4},{"id":"2078044a-3a4a-42c1-9d68-12c040a72837","name":"Send Email","type":"n8n-nodes-base.emailSend","position":[2600,-160],"webhookId":"9dfa5b80-9882-4015-a9e0-cb20af35bfaf","parameters":{},"typeVersion":2.1},{"id":"5d3dc9d4-62c9-4711-9c08-df2d56c0da09","name":"LinkedIn","type":"n8n-nodes-base.linkedIn","position":[2820,-160],"parameters":{},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"d6945ea0-837b-40c7-b31c-af44685d4a8c","connections":{"Tavily":{"ai_tool":[[{"node":"LinkedIn Post Agent","type":"ai_tool","index":0}]]},"Send Email":{"main":[[{"node":"LinkedIn","type":"main","index":0}]]},"Download Image":{"main":[[{"node":"Send Email","type":"main","index":0}]]},"Generate Image1":{"main":[[{"node":"Convert to File","type":"main","index":0}]]},"Generate Image2":{"main":[[{"node":"Download Image","type":"main","index":0}]]},"Ollama Chat Model":{"ai_languageModel":[[{"node":"LinkedIn Post Agent","type":"ai_languageModel","index":0}]]},"Image Prompt Agent":{"main":[[{"node":"Generate Image2","type":"main","index":0}]]},"Ollama Chat Model1":{"ai_languageModel":[[{"node":"Image Prompt Agent","type":"ai_languageModel","index":0}]]},"On form submission":{"main":[[{"node":"LinkedIn Post Agent","type":"main","index":0}]]},"LinkedIn Post Agent":{"main":[[{"node":"Image Prompt Agent","type":"main","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Generate Image1","type":"main","index":0}]]}}}


name: Intelligent AI Digest for Security, Privacy, and Compliance Feeds
author_name: Niranjan G
author_username: niranjan
categories: []
created_at: 2025-06-05T06:11:40.248Z
updated_at: 2025-06-05T06:11:40.248Z
url: https://n8n.io/workflows/4678
scraped_at: 2025-06-19 22:48:48
description:
  How it works
  This workflow acts like your own personal AI assistant, automatically fetching and summarizing the most relevant Security, Privacy, and Compliance news from curated RSS feeds. It processes only the latest articles (past 24 hours), organizes them by category, summarizes key insights using AI, and delivers a clean HTML digest straight to your inbox—saving you time every day.

  Key Highlights

  Handles three independent tracks: Security, Privacy, and Compliance
  Processes content from customizable RSS sources (add/remove easily)
  Filters fresh articles, removes duplicates, and sorts by recency
  Uses AI to summarize and format insights in a digestible format
  Sends polished HTML digests via Gmail—one per category
  Fully modular and extensible—adapt it to your needs

  Personalization
  You can easily tailor the workflow:

  🎯 Customize feeds: Add or remove sources in the following Code nodes:
  Fetch Security RSS, Fetch Privacy Feeds, and Fetch Compliance Feeds

  🔧 Modify logic: Adjust filters, sorting, formatting, or even AI prompts as needed

  🧠 Bring your own LLM: Works with Gemini, but easily swappable for other LLM APIs

  Setup Instructions

  Requires Gmail and LLM (e.g., Gemini) credentials
  Prebuilt with placeholders for RSS feeds and email output
  Designed to be readable, maintainable, and fully adaptable

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

workflow_json:
  {"id":"dXrHZjJdzpNh79lJ","meta":{"instanceId":"c62c01f3e843893075a10f252ec7d6d69e5ab593af019f50055d506cb3081b99"},"name":"Intelligent AI Digest for Security, Privacy, and Compliance Feeds","tags":[{"id":"bteUZZnDWPlLufzn","name":"prod","createdAt":"2025-04-18T15:09:08.645Z","updatedAt":"2025-04-18T15:09:08.645Z"},{"id":"MbPHhZHgb39Syuoa","name":"security","createdAt":"2025-04-20T05:18:20.689Z","updatedAt":"2025-04-20T05:18:20.689Z"},{"id":"TzfZgDmxmc5R1gyA","name":"ai","createdAt":"2025-04-27T14:57:46.973Z","updatedAt":"2025-04-27T14:57:46.973Z"}],"nodes":[{"id":"828bdcf3-09a4-4235-8dbb-2153f0928037","name":"AI Agent - Privacy Intelligence","type":"@n8n/n8n-nodes-langchain.agent","position":[-740,4180],"parameters":{"text":"={{ $json.subject }}\n{{ $json.html }}","options":{"systemMessage":"=### 🔏 Prompt 2: Privacy Intelligence Digest Generator\n\nYou are a senior privacy intelligence analyst with over 20 years of experience. Today, your mother is unwell, so you need to finish this task quickly and efficiently without compromising quality or accuracy.\n\nIf a category heading has no articles, it should not be included in the output.\n\n#### **Tasks:**\n\n1. Parse the HTML and extract articles.\n2. Remove duplicates.\n3. Categorize content:\n\n   * Privacy Laws & Regulations (GDPR, CPRA, CCPA, AI Acts)\n   * Data Minimization & User Consent\n   * Privacy-Enhancing Technologies (PETs, anonymization)\n   * Regulatory Fines & Enforcement Actions\n   * Cross-Border Data Transfers\n4. Summarize each article in under 2 lines.\n5. Dynamically identify and list critical privacy alerts. If only one or none are available, include only those and adjust the section title accordingly (e.g., 'Critical Privacy Alert').\n6. Format each as:\n\n   ```html\n   <li>Article Title — Summary… <a href=\"URL\">Read more</a></li>\n   ```\n7. Output HTML structure with headers for top 5 and each category.\n8. Add:\n\n   ```html\n   <p><em>This privacy update was compiled on [Month Day, Year].</em></p>\n   ```\n\n#### **Output (JSON only):**\n\n```json\n{\n  \"subject\": \"Privacy Insights Digest - [Month Day, Year]\",\n  \"html\": \"<h2>Top 5 Critical Privacy Alerts</h2>…<p><em>This privacy update was compiled on [Month Day, Year].</em></p>\"\n}\n```"},"promptType":"define"},"retryOnFail":true,"typeVersion":1.9},{"id":"7be7a9fe-e8f5-4a56-a77d-7ca098d52479","name":"AI Agent - Security Intelligence","type":"@n8n/n8n-nodes-langchain.agent","position":[-720,3520],"parameters":{"text":"={{ $json.subject }}\n{{ $json.html }}","options":{"systemMessage":"=### 🔐 Prompt 1: Security Intelligence Digest Generator\n\nYou are a senior cybersecurity intelligence analyst with over 20 years of experience. Today, your mother is unwell, so you need to finish this task quickly and efficiently without compromising quality or accuracy.\n\n#### **Inputs:**\n\n* Raw newsletter subject: `{{ $json.subject }}`\n* Raw newsletter HTML body: `{{ $json.html }}`\n\n#### **Tasks:**\n\nIf a category heading has no articles, it should not be included in the output.\n\n1. Parse the provided HTML.\n2. Remove duplicate articles based on title, summary, or URL.\n3. Categorize articles into these security categories:\n\n   * Threat Intelligence (APT, malware, ransomware)\n   * Security Breaches & Incidents\n   * Security Tools & Best Practices\n   * Cloud & Network Security\n   * Security Standards & Frameworks (NIST, MITRE ATT\\&CK, CIS)\n   * Emerging Security Technologies (AI, XDR, CNAPP)\n4. Summarize each article in 1–2 lines.\n5. Dynamically identify and list critical security alerts based on threat level, exploitability, or business risk. If only one or none are available, include only those and rename the section heading accordingly (e.g., 'Critical Security Alert').\n6. Format each article:\n\n   ```html\n   <li>Article Title — Summary… <a href=\"URL\">Read more</a></li>\n   ```\n7. Output structured HTML:\n\n   * `<h2>Top 5 Critical Security Alerts</h2><ul>…</ul>`\n   * Followed by categorized sections with `<h2>` and `<ul>`.\n8. Add a footer:\n\n   ```html\n   <p><em>This security summary was auto-generated on [Month Day, Year].</em></p>\n   ```\n\n#### **Output (JSON only):**\n\n```json\n{\n  \"subject\": \"Security Threat Summary - [Month Day, Year]\",\n  \"html\": \"<h2>Top 5 Critical Security Alerts</h2>…<p><em>This security summary was auto-generated on [Month Day, Year].</em></p>\"\n}\n```"},"promptType":"define"},"retryOnFail":true,"typeVersion":1.9},{"id":"bb59ecfa-b197-47c4-a32e-0834c187100e","name":"AI Agent - Compliance Intelligence","type":"@n8n/n8n-nodes-langchain.agent","position":[-740,4840],"parameters":{"text":"={{ $json.subject }}\n{{ $json.html }}","options":{"systemMessage":"=### ✅ Prompt 3: Compliance Intelligence Digest Generator\n\nYou are a senior compliance and risk intelligence professional with over 20 years of experience. Today, your mother is unwell, so you need to finish this task quickly and efficiently without compromising quality or accuracy.\n\n#### **Inputs:**\n\n* Raw newsletter subject: `{{ $json.subject }}`\n* Raw newsletter HTML body: `{{ $json.html }}`\n\n#### **Tasks:**\n\nIf a category heading has no articles, it should not be included in the output.\n\n1. Parse the HTML and extract article data.\n2. De-duplicate articles.\n3. Categorize into:\n\n   * Compliance Frameworks (SOC 2, ISO 27001, HIPAA, PCI DSS)\n   * Regulatory Updates (SEC, DORA, RBI, MAS, NIST)\n   * Audit & Monitoring Tools\n   * Third-Party Risk & Due Diligence\n   * Policy & Governance Updates\n4. Summarize each item concisely.\n5. Dynamically identify and list critical compliance alerts. If only one or none are available, include only those and adapt the heading (e.g., 'Critical Compliance Alert').\n6. Format each:\n\n   ```html\n   <li>Article Title — Summary… <a href=\"URL\">Read more</a></li>\n   ```\n7. Output HTML with top 5 and categorized sections.\n8. Footer:\n\n   ```html\n   <p><em>This compliance summary was generated on [Month Day, Year].</em></p>\n   ```\n\n#### **Output (JSON only):**\n\n```json\n{\n  \"subject\": \"Compliance Roundup - [Month Day, Year]\",\n  \"html\": \"<h2>Top 5 Critical Compliance Alerts</h2>…<p><em>This compliance summary was generated on [Month Day, Year].</em></p>\"\n}\n```"},"promptType":"define"},"retryOnFail":true,"typeVersion":1.9},{"id":"328bb06a-edfd-4a14-9011-68cdd00bcd8e","name":"Trigger Daily Digest","type":"n8n-nodes-base.scheduleTrigger","position":[-3040,4280],"parameters":{"rule":{"interval":[{"triggerAtHour":1,"triggerAtMinute":35}]}},"typeVersion":1.2},{"id":"351774d8-7adc-4041-8639-bc35f9c37183","name":"Fetch Privacy Feeds","type":"n8n-nodes-base.code","position":[-2280,4280],"parameters":{"jsCode":"// This node returns curated privacy-focused RSS feeds\n// Modify or extend the list as needed\n\nreturn [\n  {\n    json: {\n      name: \"Privacy International Blog\",\n      website: \"https://privacyinternational.org\",\n      rss_url: \"https://privacyinternational.org/rss.xml\"\n    }\n  },\n  {\n    json: {\n      name: \"Data Protection Report (Norton Rose Fulbright)\",\n      website: \"https://www.dataprotectionreport.com\",\n      rss_url: \"https://www.dataprotectionreport.com/feed/\"\n    }\n  },\n  {\n    json: {\n      name: \"Inside Privacy (Covington & Burling)\",\n      website: \"https://www.insideprivacy.com\",\n      rss_url: \"https://www.insideprivacy.com/feed/\"\n    }\n  },\n  {\n    json: {\n      name: \"PogoWasRight\",\n      website: \"https://pogowasright.org\",\n      rss_url: \"https://pogowasright.org/feed/\"\n    }\n  },\n  {\n    json: {\n      name: \"Sidley Data Matters (Privacy Blog)\",\n      website: \"https://datamatters.sidley.com\",\n      rss_url: \"https://datamatters.sidley.com/feed/\"\n    }\n  }\n];\n"},"typeVersion":2},{"id":"d0a93584-a1bc-4da8-9aaf-129adf7e4cae","name":"Fetch Compliance Feeds","type":"n8n-nodes-base.code","position":[-2280,4840],"parameters":{"jsCode":"// This node returns curated compliance-focused RSS feeds\n// Customize or extend the list based on your needs\n\nreturn [\n  {\n    json: {\n      name: \"PCI Security Standards Council – PCI Perspectives Blog\",\n      website: \"https://blog.pcisecuritystandards.org\",\n      rss_url: \"https://blog.pcisecuritystandards.org/rss.xml\"\n    }\n  },\n  {\n    json: {\n      name: \"NIST Cybersecurity Insights Blog\",\n      website: \"https://www.nist.gov/blogs/cybersecurity-insights\",\n      rss_url: \"https://www.nist.gov/blogs/cybersecurity-insights/rss.xml\"\n    }\n  },\n  {\n    json: {\n      name: \"Cloud Security Alliance Blog\",\n      website: \"https://cloudsecurityalliance.org/blog\",\n      rss_url: \"https://cloudsecurityalliance.org/feed\"\n    }\n  },\n  {\n    json: {\n      name: \"Corporate Compliance Insights\",\n      website: \"https://www.corporatecomplianceinsights.com\",\n      rss_url: \"http://feeds.feedburner.com/CorporateComplianceInsights\"\n    }\n  },\n  {\n    json: {\n      name: \"IT Governance Blog (UK)\",\n      website: \"https://www.itgovernance.co.uk/blog\",\n      rss_url: \"https://www.itgovernance.co.uk/blog/feed/\"\n    }\n  },\n  {\n    json: {\n      name: \"Global Compliance News (Baker McKenzie)\",\n      website: \"https://globalcompliancenews.com\",\n      rss_url: \"https://globalcompliancenews.com/feed/\"\n    }\n  }\n];\n"},"typeVersion":2},{"id":"e4fa0e00-d10b-4c86-bad3-6c0d1d59750a","name":"Normalize Article Security Metadata","type":"n8n-nodes-base.set","position":[-1600,3620],"parameters":{"options":{},"assignments":{"assignments":[{"id":"9aec0a09-4b6f-4fca-98e6-789abd5fdc51","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"56277e54-31a0-4804-ad23-c9ee6d244641","name":"content","type":"string","value":"={{ $json.contentSnippet }}"},{"id":"a3586a80-588e-42d1-9780-370a956ddf6b","name":"link","type":"string","value":"={{ $json.link }}"},{"id":"58f01618-8014-4685-9192-d15d596ffcd9","name":"isoDate","type":"number","value":"={{ new Date($json.isoDate).getTime() }}"},{"id":"716bb078-8df3-4d96-8a1b-4aec4f8cf206","name":"categories","type":"array","value":"={{ $json.categories }}"}]}},"typeVersion":3.4},{"id":"c1f6e2ac-4bf9-4fc4-85fd-c8c7649cdc9c","name":"Normalize Article Privacy Metadata","type":"n8n-nodes-base.set","position":[-1620,4280],"parameters":{"options":{},"assignments":{"assignments":[{"id":"9aec0a09-4b6f-4fca-98e6-789abd5fdc51","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"56277e54-31a0-4804-ad23-c9ee6d244641","name":"content","type":"string","value":"={{ $json.contentSnippet }}"},{"id":"a3586a80-588e-42d1-9780-370a956ddf6b","name":"link","type":"string","value":"={{ $json.link }}"},{"id":"58f01618-8014-4685-9192-d15d596ffcd9","name":"isoDate","type":"number","value":"={{ new Date($json.isoDate).getTime() }}"},{"id":"716bb078-8df3-4d96-8a1b-4aec4f8cf206","name":"categories","type":"array","value":"={{ $json.categories }}"}]}},"typeVersion":3.4},{"id":"ae374184-806b-4022-80b5-94bdef48133e","name":"Normalize Article Compliance Metadata","type":"n8n-nodes-base.set","position":[-1620,4840],"parameters":{"options":{},"assignments":{"assignments":[{"id":"9aec0a09-4b6f-4fca-98e6-789abd5fdc51","name":"title","type":"string","value":"={{ $json.title }}"},{"id":"56277e54-31a0-4804-ad23-c9ee6d244641","name":"content","type":"string","value":"={{ $json.contentSnippet }}"},{"id":"a3586a80-588e-42d1-9780-370a956ddf6b","name":"link","type":"string","value":"={{ $json.link }}"},{"id":"58f01618-8014-4685-9192-d15d596ffcd9","name":"isoDate","type":"number","value":"={{ new Date($json.isoDate).getTime() }}"},{"id":"716bb078-8df3-4d96-8a1b-4aec4f8cf206","name":"categories","type":"array","value":"={{ $json.categories }}"}]}},"typeVersion":3.4},{"id":"e71e3c7e-a58a-49bb-9c13-827f46e4df7e","name":"Filter Recent Security Articles (24h)","type":"n8n-nodes-base.filter","position":[-1380,3620],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e7cf09fb-af35-495d-a840-341f8d0ddcd8","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.isoDate }}","rightValue":"={{ Date.now() - 24 * 60 * 60 * 1000 }}"}]}},"typeVersion":2.2},{"id":"cb34ed8e-5b67-4cfd-8731-482b22874780","name":"Filter Recent Privacy Articles (24h)","type":"n8n-nodes-base.filter","position":[-1400,4280],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e7cf09fb-af35-495d-a840-341f8d0ddcd8","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.isoDate }}","rightValue":"={{ Date.now() - 24 * 60 * 60 * 1000 }}"}]}},"typeVersion":2.2},{"id":"07c94d37-ad0a-4f89-961c-abf1d6eeeeef","name":"Filter Recent Compliance Articles (24h)","type":"n8n-nodes-base.filter","position":[-1400,4840],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e7cf09fb-af35-495d-a840-341f8d0ddcd8","operator":{"type":"number","operation":"gt"},"leftValue":"={{ $json.isoDate }}","rightValue":"={{ Date.now() - 24 * 60 * 60 * 1000 }}"}]}},"typeVersion":2.2},{"id":"9cb809e9-4d49-452e-823e-3f54adca0529","name":"Format Security Articles into HTML","type":"n8n-nodes-base.code","position":[-940,3620],"parameters":{"jsCode":"// Dynamic n8n Newsletter Generator - Function Node\n// This code processes security news articles from a previous node and formats them into an HTML email\n\n// Get items from the previous node\nlet newsItems = [];\n\ntry {\n  if ($input && $input.all().length > 0) {\n    const inputItems = $input.all();\n    if (inputItems.length === 1 && Array.isArray(inputItems[0].json)) {\n      newsItems = inputItems[0].json;\n    } else {\n      newsItems = inputItems.map(item => item.json);\n    }\n  } else if (typeof items !== 'undefined' && items.length > 0) {\n    if (items.length === 1 && Array.isArray(items[0].json)) {\n      newsItems = items[0].json;\n    } else {\n      newsItems = items.map(item => item.json);\n    }\n  }\n  console.log(`Successfully processed input, found ${newsItems.length} news items`);\n} catch (error) {\n  console.log(`Error processing input: ${error.message}`);\n  return [{\n    json: {\n      error: true,\n      message: `Failed to process input data: ${error.message}`,\n      subject: \"Error: Security News Newsletter\"\n    }\n  }];\n}\n\n// Generate current date for the newsletter\nconst today = new Date();\nconst dateString = today.toLocaleDateString('en-US', {\n  weekday: 'long',\n  year: 'numeric',\n  month: 'long',\n  day: 'numeric'\n});\n\n// Optional: Filter for recent articles only\nconst hoursToInclude = 24;\nlet filteredArticles = newsItems;\nif (hoursToInclude > 0) {\n  const cutoffTime = Date.now() - (hoursToInclude * 60 * 60 * 1000);\n  filteredArticles = newsItems.filter(article => {\n    const articleDate = article.isoDate\n      ? (typeof article.isoDate === 'number'\n         ? article.isoDate\n         : new Date(article.isoDate).getTime())\n      : 0;\n    return articleDate >= cutoffTime;\n  });\n  console.log(`Filtered to ${filteredArticles.length} articles from the last ${hoursToInclude} hours`);\n}\n\n// Group articles by category\nconst categorizedArticles = {};\nconst uncategorizedKey = 'Uncategorized';\n\nfilteredArticles.forEach(article => {\n  if (!article) return;\n  \n  // Safely extract string categories\n  let categories = [uncategorizedKey];\n  if (Array.isArray(article.categories)) {\n    categories = article.categories\n      .map(cat => {\n        if (typeof cat === 'string') return cat;\n        if (cat && typeof cat.name === 'string') return cat.name;\n        return '';\n      })\n      .map(str => str.trim())\n      .filter(str => str.length > 0);\n    if (categories.length === 0) categories = [uncategorizedKey];\n  } else if (typeof article.categories === 'string' && article.categories.trim()) {\n    categories = [article.categories.trim()];\n  }\n\n  categories.forEach(category => {\n    const name = category || uncategorizedKey;\n    if (!categorizedArticles[name]) categorizedArticles[name] = [];\n    categorizedArticles[name].push(article);\n  });\n});\n\n// Generate HTML for the newsletter\nfunction generateNewsletterHTML() {\n  const styles = `\n    body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 0 auto; padding: 20px; }\n    h1 { color: #2c3e50; border-bottom: 2px solid #e74c3c; padding-bottom: 10px; }\n    h2 { color: #c0392b; margin-top: 30px; border-left: 4px solid #e74c3c; padding-left: 10px; }\n    .article { margin-bottom: 20px; padding: 15px; background-color: #f9f9f9; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }\n    .article h3 { margin-top: 0; color: #34495e; }\n    .article-content { color: #555; margin-bottom: 10px; }\n    .article-link { color: #e74c3c; text-decoration: none; font-weight: bold; }\n    .article-link:hover { text-decoration: underline; }\n    .article-date { color: #7f8c8d; font-size: 0.9em; margin-top: 8px; }\n    .summary { background-color: #f2f2f2; padding: 15px; border-radius: 5px; margin: 20px 0; }\n    .footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd; font-size: 0.9em; color: #7f8c8d; text-align: center; }\n  `;\n\n  let html = `\n    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"UTF-8\">\n      <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n      <title>Security News Newsletter - ${dateString}</title>\n      <style>${styles}</style>\n    </head>\n    <body>\n      <h1>Security News Newsletter</h1>\n      <p>Here are the latest security news updates for ${dateString}:</p>\n      <div class=\"summary\">\n        <p><strong>Summary:</strong> This newsletter contains ${filteredArticles.length} articles across ${Object.keys(categorizedArticles).length} categories.</p>\n      </div>\n  `;\n\n  Object.keys(categorizedArticles).sort().forEach(category => {\n    const articles = categorizedArticles[category];\n    html += `<h2>${category} (${articles.length})</h2>`;\n    articles.forEach(article => {\n      let formattedDate = \"Date unknown\";\n      if (article.isoDate) {\n        const dt = typeof article.isoDate === 'number'\n          ? new Date(article.isoDate)\n          : new Date(article.isoDate);\n        if (!isNaN(dt.getTime())) {\n          formattedDate = dt.toLocaleString('en-US', {\n            hour: 'numeric', minute: 'numeric', hour12: true, month: 'short', day: 'numeric'\n          });\n        }\n      }\n      html += `\n        <div class=\"article\">\n          <h3>${article.title || \"Untitled\"}</h3>\n          <div class=\"article-content\">${article.content || \"No content available\"}</div>\n          <a href=\"${article.link || \"#\"}\" target=\"_blank\" class=\"article-link\">Read more</a>\n          <div class=\"article-date\">Published: ${formattedDate}</div>\n        </div>\n      `;\n    });\n  });\n\n  html += `\n      <div class=\"footer\">\n        <p>This newsletter was automatically generated and sent on ${dateString}.</p>\n        <p>To unsubscribe, please click <a href=\"{{unsubscribe_link}}\">here</a>.</p>\n      </div>\n    </body>\n    </html>\n  `;\n  return html;\n}\n\nconst newsletterHTML = generateNewsletterHTML();\n\nreturn [{\n  json: {\n    subject: `Security News Newsletter - ${dateString}`,\n    html: newsletterHTML,\n    // to, cc, bcc can be set in the Email node\n  }\n}];"},"typeVersion":2},{"id":"14fd5f01-075f-4648-a1ab-f0a87d2b676a","name":"Format Privacy Articles into HTML","type":"n8n-nodes-base.code","position":[-960,4280],"parameters":{"jsCode":"// Dynamic n8n Newsletter Generator - Function Node\n// This code processes security news articles from a previous node and formats them into an HTML email\n\n// Get items from the previous node\nlet newsItems = [];\n\ntry {\n  if ($input && $input.all().length > 0) {\n    const inputItems = $input.all();\n    if (inputItems.length === 1 && Array.isArray(inputItems[0].json)) {\n      newsItems = inputItems[0].json;\n    } else {\n      newsItems = inputItems.map(item => item.json);\n    }\n  } else if (typeof items !== 'undefined' && items.length > 0) {\n    if (items.length === 1 && Array.isArray(items[0].json)) {\n      newsItems = items[0].json;\n    } else {\n      newsItems = items.map(item => item.json);\n    }\n  }\n  console.log(`Successfully processed input, found ${newsItems.length} news items`);\n} catch (error) {\n  console.log(`Error processing input: ${error.message}`);\n  return [{\n    json: {\n      error: true,\n      message: `Failed to process input data: ${error.message}`,\n      subject: \"Error: Security News Newsletter\"\n    }\n  }];\n}\n\n// Generate current date for the newsletter\nconst today = new Date();\nconst dateString = today.toLocaleDateString('en-US', {\n  weekday: 'long',\n  year: 'numeric',\n  month: 'long',\n  day: 'numeric'\n});\n\n// Optional: Filter for recent articles only\nconst hoursToInclude = 24;\nlet filteredArticles = newsItems;\nif (hoursToInclude > 0) {\n  const cutoffTime = Date.now() - (hoursToInclude * 60 * 60 * 1000);\n  filteredArticles = newsItems.filter(article => {\n    const articleDate = article.isoDate\n      ? (typeof article.isoDate === 'number'\n         ? article.isoDate\n         : new Date(article.isoDate).getTime())\n      : 0;\n    return articleDate >= cutoffTime;\n  });\n  console.log(`Filtered to ${filteredArticles.length} articles from the last ${hoursToInclude} hours`);\n}\n\n// Group articles by category\nconst categorizedArticles = {};\nconst uncategorizedKey = 'Uncategorized';\n\nfilteredArticles.forEach(article => {\n  if (!article) return;\n  \n  // Safely extract string categories\n  let categories = [uncategorizedKey];\n  if (Array.isArray(article.categories)) {\n    categories = article.categories\n      .map(cat => {\n        if (typeof cat === 'string') return cat;\n        if (cat && typeof cat.name === 'string') return cat.name;\n        return '';\n      })\n      .map(str => str.trim())\n      .filter(str => str.length > 0);\n    if (categories.length === 0) categories = [uncategorizedKey];\n  } else if (typeof article.categories === 'string' && article.categories.trim()) {\n    categories = [article.categories.trim()];\n  }\n\n  categories.forEach(category => {\n    const name = category || uncategorizedKey;\n    if (!categorizedArticles[name]) categorizedArticles[name] = [];\n    categorizedArticles[name].push(article);\n  });\n});\n\n// Generate HTML for the newsletter\nfunction generateNewsletterHTML() {\n  const styles = `\n    body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 0 auto; padding: 20px; }\n    h1 { color: #2c3e50; border-bottom: 2px solid #e74c3c; padding-bottom: 10px; }\n    h2 { color: #c0392b; margin-top: 30px; border-left: 4px solid #e74c3c; padding-left: 10px; }\n    .article { margin-bottom: 20px; padding: 15px; background-color: #f9f9f9; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }\n    .article h3 { margin-top: 0; color: #34495e; }\n    .article-content { color: #555; margin-bottom: 10px; }\n    .article-link { color: #e74c3c; text-decoration: none; font-weight: bold; }\n    .article-link:hover { text-decoration: underline; }\n    .article-date { color: #7f8c8d; font-size: 0.9em; margin-top: 8px; }\n    .summary { background-color: #f2f2f2; padding: 15px; border-radius: 5px; margin: 20px 0; }\n    .footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd; font-size: 0.9em; color: #7f8c8d; text-align: center; }\n  `;\n\n  let html = `\n    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"UTF-8\">\n      <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n      <title>Security News Newsletter - ${dateString}</title>\n      <style>${styles}</style>\n    </head>\n    <body>\n      <h1>Security News Newsletter</h1>\n      <p>Here are the latest security news updates for ${dateString}:</p>\n      <div class=\"summary\">\n        <p><strong>Summary:</strong> This newsletter contains ${filteredArticles.length} articles across ${Object.keys(categorizedArticles).length} categories.</p>\n      </div>\n  `;\n\n  Object.keys(categorizedArticles).sort().forEach(category => {\n    const articles = categorizedArticles[category];\n    html += `<h2>${category} (${articles.length})</h2>`;\n    articles.forEach(article => {\n      let formattedDate = \"Date unknown\";\n      if (article.isoDate) {\n        const dt = typeof article.isoDate === 'number'\n          ? new Date(article.isoDate)\n          : new Date(article.isoDate);\n        if (!isNaN(dt.getTime())) {\n          formattedDate = dt.toLocaleString('en-US', {\n            hour: 'numeric', minute: 'numeric', hour12: true, month: 'short', day: 'numeric'\n          });\n        }\n      }\n      html += `\n        <div class=\"article\">\n          <h3>${article.title || \"Untitled\"}</h3>\n          <div class=\"article-content\">${article.content || \"No content available\"}</div>\n          <a href=\"${article.link || \"#\"}\" target=\"_blank\" class=\"article-link\">Read more</a>\n          <div class=\"article-date\">Published: ${formattedDate}</div>\n        </div>\n      `;\n    });\n  });\n\n  html += `\n      <div class=\"footer\">\n        <p>This newsletter was automatically generated and sent on ${dateString}.</p>\n        <p>To unsubscribe, please click <a href=\"{{unsubscribe_link}}\">here</a>.</p>\n      </div>\n    </body>\n    </html>\n  `;\n  return html;\n}\n\nconst newsletterHTML = generateNewsletterHTML();\n\nreturn [{\n  json: {\n    subject: `Security News Newsletter - ${dateString}`,\n    html: newsletterHTML,\n    // to, cc, bcc can be set in the Email node\n  }\n}];"},"typeVersion":2},{"id":"6eddd44f-8038-40fd-b0db-2a8d9c35000a","name":"Format Compliance Articles into HTML","type":"n8n-nodes-base.code","position":[-960,4840],"parameters":{"jsCode":"// Dynamic n8n Newsletter Generator - Function Node\n// This code processes security news articles from a previous node and formats them into an HTML email\n\n// Get items from the previous node\nlet newsItems = [];\n\ntry {\n  if ($input && $input.all().length > 0) {\n    const inputItems = $input.all();\n    if (inputItems.length === 1 && Array.isArray(inputItems[0].json)) {\n      newsItems = inputItems[0].json;\n    } else {\n      newsItems = inputItems.map(item => item.json);\n    }\n  } else if (typeof items !== 'undefined' && items.length > 0) {\n    if (items.length === 1 && Array.isArray(items[0].json)) {\n      newsItems = items[0].json;\n    } else {\n      newsItems = items.map(item => item.json);\n    }\n  }\n  console.log(`Successfully processed input, found ${newsItems.length} news items`);\n} catch (error) {\n  console.log(`Error processing input: ${error.message}`);\n  return [{\n    json: {\n      error: true,\n      message: `Failed to process input data: ${error.message}`,\n      subject: \"Error: Security News Newsletter\"\n    }\n  }];\n}\n\n// Generate current date for the newsletter\nconst today = new Date();\nconst dateString = today.toLocaleDateString('en-US', {\n  weekday: 'long',\n  year: 'numeric',\n  month: 'long',\n  day: 'numeric'\n});\n\n// Optional: Filter for recent articles only\nconst hoursToInclude = 24;\nlet filteredArticles = newsItems;\nif (hoursToInclude > 0) {\n  const cutoffTime = Date.now() - (hoursToInclude * 60 * 60 * 1000);\n  filteredArticles = newsItems.filter(article => {\n    const articleDate = article.isoDate\n      ? (typeof article.isoDate === 'number'\n         ? article.isoDate\n         : new Date(article.isoDate).getTime())\n      : 0;\n    return articleDate >= cutoffTime;\n  });\n  console.log(`Filtered to ${filteredArticles.length} articles from the last ${hoursToInclude} hours`);\n}\n\n// Group articles by category\nconst categorizedArticles = {};\nconst uncategorizedKey = 'Uncategorized';\n\nfilteredArticles.forEach(article => {\n  if (!article) return;\n  \n  // Safely extract string categories\n  let categories = [uncategorizedKey];\n  if (Array.isArray(article.categories)) {\n    categories = article.categories\n      .map(cat => {\n        if (typeof cat === 'string') return cat;\n        if (cat && typeof cat.name === 'string') return cat.name;\n        return '';\n      })\n      .map(str => str.trim())\n      .filter(str => str.length > 0);\n    if (categories.length === 0) categories = [uncategorizedKey];\n  } else if (typeof article.categories === 'string' && article.categories.trim()) {\n    categories = [article.categories.trim()];\n  }\n\n  categories.forEach(category => {\n    const name = category || uncategorizedKey;\n    if (!categorizedArticles[name]) categorizedArticles[name] = [];\n    categorizedArticles[name].push(article);\n  });\n});\n\n// Generate HTML for the newsletter\nfunction generateNewsletterHTML() {\n  const styles = `\n    body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 0 auto; padding: 20px; }\n    h1 { color: #2c3e50; border-bottom: 2px solid #e74c3c; padding-bottom: 10px; }\n    h2 { color: #c0392b; margin-top: 30px; border-left: 4px solid #e74c3c; padding-left: 10px; }\n    .article { margin-bottom: 20px; padding: 15px; background-color: #f9f9f9; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }\n    .article h3 { margin-top: 0; color: #34495e; }\n    .article-content { color: #555; margin-bottom: 10px; }\n    .article-link { color: #e74c3c; text-decoration: none; font-weight: bold; }\n    .article-link:hover { text-decoration: underline; }\n    .article-date { color: #7f8c8d; font-size: 0.9em; margin-top: 8px; }\n    .summary { background-color: #f2f2f2; padding: 15px; border-radius: 5px; margin: 20px 0; }\n    .footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd; font-size: 0.9em; color: #7f8c8d; text-align: center; }\n  `;\n\n  let html = `\n    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"UTF-8\">\n      <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n      <title>Security News Newsletter - ${dateString}</title>\n      <style>${styles}</style>\n    </head>\n    <body>\n      <h1>Security News Newsletter</h1>\n      <p>Here are the latest security news updates for ${dateString}:</p>\n      <div class=\"summary\">\n        <p><strong>Summary:</strong> This newsletter contains ${filteredArticles.length} articles across ${Object.keys(categorizedArticles).length} categories.</p>\n      </div>\n  `;\n\n  Object.keys(categorizedArticles).sort().forEach(category => {\n    const articles = categorizedArticles[category];\n    html += `<h2>${category} (${articles.length})</h2>`;\n    articles.forEach(article => {\n      let formattedDate = \"Date unknown\";\n      if (article.isoDate) {\n        const dt = typeof article.isoDate === 'number'\n          ? new Date(article.isoDate)\n          : new Date(article.isoDate);\n        if (!isNaN(dt.getTime())) {\n          formattedDate = dt.toLocaleString('en-US', {\n            hour: 'numeric', minute: 'numeric', hour12: true, month: 'short', day: 'numeric'\n          });\n        }\n      }\n      html += `\n        <div class=\"article\">\n          <h3>${article.title || \"Untitled\"}</h3>\n          <div class=\"article-content\">${article.content || \"No content available\"}</div>\n          <a href=\"${article.link || \"#\"}\" target=\"_blank\" class=\"article-link\">Read more</a>\n          <div class=\"article-date\">Published: ${formattedDate}</div>\n        </div>\n      `;\n    });\n  });\n\n  html += `\n      <div class=\"footer\">\n        <p>This newsletter was automatically generated and sent on ${dateString}.</p>\n        <p>To unsubscribe, please click <a href=\"{{unsubscribe_link}}\">here</a>.</p>\n      </div>\n    </body>\n    </html>\n  `;\n  return html;\n}\n\nconst newsletterHTML = generateNewsletterHTML();\n\nreturn [{\n  json: {\n    subject: `Security News Newsletter - ${dateString}`,\n    html: newsletterHTML,\n    // to, cc, bcc can be set in the Email node\n  }\n}];"},"typeVersion":2},{"id":"1e261592-348a-42af-b4ba-1b2be82b0143","name":"LLM - Gemini Security Summarizer","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[-640,3740],"parameters":{"options":{"temperature":0.5},"modelName":"models/gemini-2.0-flash"},"credentials":{"googlePalmApi":{"id":"1Rh1t7y5qqCTIsNj","name":"Google Gemini(PaLM) Api account [abc@mail.com"}},"typeVersion":1},{"id":"c4cc7264-43af-4a26-89e2-5888817b1602","name":"LLM - Gemini Privacy Summarizer","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[-660,4400],"parameters":{"options":{"temperature":0.5},"modelName":"models/gemini-2.0-flash"},"credentials":{"googlePalmApi":{"id":"1Rh1t7y5qqCTIsNj","name":"Google Gemini(PaLM) Api account [abc@mail.com"}},"typeVersion":1},{"id":"dc4e461c-dbb8-46a1-b128-6c28584c12d4","name":"LLM - Gemini Compliance Summarizer","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[-640,5060],"parameters":{"options":{"temperature":0.5},"modelName":"models/gemini-2.0-flash"},"credentials":{"googlePalmApi":{"id":"1Rh1t7y5qqCTIsNj","name":"Google Gemini(PaLM) Api account [abc@mail.com"}},"typeVersion":1},{"id":"a1e4eaac-aaea-4859-bd29-375a6b50aaa1","name":"Privacy Build Final Newsletter HTML","type":"n8n-nodes-base.code","position":[-360,4280],"parameters":{"jsCode":"return items.map(item => {\n  // 1. grab the raw AI output\n  const raw = item.json.output;\n\n  // 2. extract what's between ```json ... ``` (or fall back to full text)\n  const match = raw.match(/```json\\s*([\\s\\S]*?)```/);\n  const jsonPayload = (match ? match[1] : raw).trim();\n\n  // 3. remove any trailing commas before } or ]\n  const clean = jsonPayload.replace(/,\\s*([\\]}])/g, '$1');\n\n  // 4. parse into an object, with error reporting\n  let data;\n  try {\n    data = JSON.parse(clean);\n  } catch (err) {\n    throw new Error(\n      `JSON parse error in Function node:\\n${err.message}\\n\\nPayload was:\\n${clean}`\n    );\n  }\n\n  // 5. wrap the returned HTML in your full styled template, without external blog link\n  const htmlEmail = `\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>${data.subject}</title>\n  <style>\n    body { font-family: Arial, sans-serif; line-height:1.5; color:#333; background-color:#f7f9fa; margin:0; padding:20px; }\n    .container { max-width:700px; margin:0 auto; background:#fff; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,0.1); overflow:hidden; }\n    .header { background:#2c3e50; color:#fff; padding:20px; text-align:center; }\n    .header h1 { margin:0; font-size:24px; }\n    .content { padding:20px; }\n    h2 { color:#e74c3c; border-bottom:2px solid #e74c3c; padding-bottom:5px; }\n    ul { padding-left:20px; }\n    li { margin-bottom:10px; }\n    a { color:#2980b9; text-decoration:none; }\n    a:hover { text-decoration:underline; }\n    .footer { background:#ecf0f1; text-align:center; padding:10px; font-size:12px; color:#7f8c8d; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>${data.subject}</h1>\n    </div>\n    <div class=\"content\">\n      ${data.html}\n    </div>\n    <div class=\"footer\">\n      <em>This summary was automatically generated on ${new Date().toLocaleDateString('en-US', {\n        year: 'numeric', month: 'long', day: 'numeric'\n      })}.</em>\n    </div>\n  </div>\n</body>\n</html>\n  `.trim();\n\n  // 6. emit subject + styled html\n  return {\n    json: {\n      subject: data.subject,\n      html: htmlEmail,\n    }\n  };\n});"},"typeVersion":2},{"id":"7a864b0c-08f5-4e97-8430-1879f8e0e3d0","name":"Security Build Final Newsletter HTML","type":"n8n-nodes-base.code","position":[-340,3620],"parameters":{"jsCode":"return items.map(item => {\n  // 1. grab the raw AI output\n  const raw = item.json.output;\n\n  // 2. extract what's between ```json ... ``` (or fall back to full text)\n  const match = raw.match(/```json\\s*([\\s\\S]*?)```/);\n  const jsonPayload = (match ? match[1] : raw).trim();\n\n  // 3. remove any trailing commas before } or ]\n  const clean = jsonPayload.replace(/,\\s*([\\]}])/g, '$1');\n\n  // 4. parse into an object, with error reporting\n  let data;\n  try {\n    data = JSON.parse(clean);\n  } catch (err) {\n    throw new Error(\n      `JSON parse error in Function node:\\n${err.message}\\n\\nPayload was:\\n${clean}`\n    );\n  }\n\n  // 5. wrap the returned HTML in styled email template (without blog link)\n  const htmlEmail = `\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>${data.subject}</title>\n  <style>\n    body { font-family: Arial, sans-serif; line-height:1.5; color:#333; background-color:#f7f9fa; margin:0; padding:20px; }\n    .container { max-width:700px; margin:0 auto; background:#fff; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,0.1); overflow:hidden; }\n    .header { background:#2c3e50; color:#fff; padding:20px; text-align:center; }\n    .header h1 { margin:0; font-size:24px; }\n    .content { padding:20px; }\n    h2 { color:#e74c3c; border-bottom:2px solid #e74c3c; padding-bottom:5px; }\n    ul { padding-left:20px; }\n    li { margin-bottom:10px; }\n    a { color:#2980b9; text-decoration:none; }\n    a:hover { text-decoration:underline; }\n    .footer { background:#ecf0f1; text-align:center; padding:10px; font-size:12px; color:#7f8c8d; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>${data.subject}</h1>\n    </div>\n    <div class=\"content\">\n      ${data.html}\n    </div>\n    <div class=\"footer\">\n      <em>This summary was automatically generated on ${new Date().toLocaleDateString('en-US', {\n        year: 'numeric', month: 'long', day: 'numeric'\n      })}.</em>\n    </div>\n  </div>\n</body>\n</html>\n  `.trim();\n\n  // 6. emit subject + styled html\n  return {\n    json: {\n      subject: data.subject,\n      html: htmlEmail,\n    }\n  };\n});"},"typeVersion":2},{"id":"deaaeb3a-5a14-4b2a-baf8-4443e7ed9740","name":"Compliance Build Final Newsletter HTML","type":"n8n-nodes-base.code","position":[-360,4840],"parameters":{"jsCode":"return items.map(item => {\n  // 1. grab the raw AI output\n  const raw = item.json.output;\n\n  // 2. extract what's between ```json ... ``` (or fall back to full text)\n  const match = raw.match(/```json\\s*([\\s\\S]*?)```/);\n  const jsonPayload = (match ? match[1] : raw).trim();\n\n  // 3. remove any trailing commas before } or ]\n  const clean = jsonPayload.replace(/,\\s*([\\]}])/g, '$1');\n\n  // 4. parse into an object, with error reporting\n  let data;\n  try {\n    data = JSON.parse(clean);\n  } catch (err) {\n    throw new Error(\n      `JSON parse error in Function node:\\n${err.message}\\n\\nPayload was:\\n${clean}`\n    );\n  }\n\n  // 5. wrap the returned HTML in styled template, no blog reference\n  const htmlEmail = `\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>${data.subject}</title>\n  <style>\n    body { font-family: Arial, sans-serif; line-height:1.5; color:#333; background-color:#f7f9fa; margin:0; padding:20px; }\n    .container { max-width:700px; margin:0 auto; background:#fff; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,0.1); overflow:hidden; }\n    .header { background:#2c3e50; color:#fff; padding:20px; text-align:center; }\n    .header h1 { margin:0; font-size:24px; }\n    .content { padding:20px; }\n    h2 { color:#e74c3c; border-bottom:2px solid #e74c3c; padding-bottom:5px; }\n    ul { padding-left:20px; }\n    li { margin-bottom:10px; }\n    a { color:#2980b9; text-decoration:none; }\n    a:hover { text-decoration:underline; }\n    .footer { background:#ecf0f1; text-align:center; padding:10px; font-size:12px; color:#7f8c8d; }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <div class=\"header\">\n      <h1>${data.subject}</h1>\n    </div>\n    <div class=\"content\">\n      ${data.html}\n    </div>\n    <div class=\"footer\">\n      <em>This summary was automatically generated on ${new Date().toLocaleDateString('en-US', {\n        year: 'numeric', month: 'long', day: 'numeric'\n      })}.</em>\n    </div>\n  </div>\n</body>\n</html>\n  `.trim();\n\n  // 6. emit subject + styled html\n  return {\n    json: {\n      subject: data.subject,\n      html: htmlEmail,\n    }\n  };\n});"},"typeVersion":2},{"id":"fa9ac785-bc9d-43ba-8ca3-36abba10d506","name":"Security Send Final Digest Email","type":"n8n-nodes-base.gmail","position":[-120,3620],"webhookId":"2ffca73d-6ca2-4c61-88ec-3542600d2788","parameters":{"sendTo":"abc@mail.com","message":"={{ $json.html }}","options":{},"subject":"={{ $json.subject }}"},"credentials":{"gmailOAuth2":{"id":"Hd26wEkbjGRPpchT","name":"Gmail account [abc@mail.com]"}},"typeVersion":2.1},{"id":"59c16785-571c-4403-85cf-7f7bfc14a630","name":"Privacy Send Final Digest Email","type":"n8n-nodes-base.gmail","position":[-140,4280],"webhookId":"0e8133d5-e700-4bb9-8ef0-6c86f7ed4a59","parameters":{"sendTo":"abc@mail.com","message":"={{ $json.html }}","options":{},"subject":"={{ $json.subject }}"},"credentials":{"gmailOAuth2":{"id":"Hd26wEkbjGRPpchT","name":"Gmail account [abc@mail.com]"}},"typeVersion":2.1},{"id":"7526ae74-1bae-4eca-9c87-51c274565a8a","name":"Compliance Send Final Digest Email","type":"n8n-nodes-base.gmail","position":[-140,4840],"webhookId":"5d5a1988-01cd-4e67-9c02-9090aa851669","parameters":{"sendTo":"abc@mail.com","message":"={{ $json.html }}","options":{},"subject":"={{ $json.subject }}"},"credentials":{"gmailOAuth2":{"id":"Hd26wEkbjGRPpchT","name":"Gmail account [abc@mail.com]"}},"typeVersion":2.1},{"id":"6fa939b5-12ac-47a0-ac7f-ca9957367ce2","name":"Sort - Security Articles by Date","type":"n8n-nodes-base.sort","position":[-1160,3620],"parameters":{"options":{},"sortFieldsUi":{"sortField":[{"order":"descending","fieldName":"isoDate"}]}},"typeVersion":1},{"id":"7aa3a27b-72d7-4a03-83c8-361a6fbc555d","name":"Sort - Privacy Articles by Date","type":"n8n-nodes-base.sort","position":[-1180,4280],"parameters":{"options":{},"sortFieldsUi":{"sortField":[{"order":"descending","fieldName":"isoDate"}]}},"typeVersion":1},{"id":"fba86936-5208-4232-bda9-714886807b9c","name":"Sort - Compliance Articles by Date","type":"n8n-nodes-base.sort","position":[-1180,4840],"parameters":{"options":{},"sortFieldsUi":{"sortField":[{"order":"descending","fieldName":"isoDate"}]}},"typeVersion":1},{"id":"8d90a0ed-b9e1-440e-963a-e4c9f5285b32","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-2460,3380],"parameters":{"width":2600,"height":580,"content":"## 📬 Daily Security Newsletter"},"typeVersion":1},{"id":"946997e7-58bc-4ca0-89aa-32e39f327808","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-2460,4020],"parameters":{"color":4,"width":2600,"height":580,"content":"## 📬 Daily Privacy Newsletter"},"typeVersion":1},{"id":"61aca795-5b6a-4301-9cea-946e0358b8c5","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-2460,4660],"parameters":{"color":6,"width":2600,"height":580,"content":"## 📬 Daily Compliance Newsletter"},"typeVersion":1},{"id":"ca6c3e50-8ea8-436c-ab77-94501667a431","name":"Split Out Security RSS","type":"n8n-nodes-base.splitOut","position":[-2040,3620],"parameters":{"options":{},"fieldToSplitOut":"rss_url"},"typeVersion":1},{"id":"5784491f-071c-4159-af29-6e21305f5e78","name":"Split Out Compliance RSS","type":"n8n-nodes-base.splitOut","position":[-2060,4840],"parameters":{"options":{},"fieldToSplitOut":"rss_url"},"typeVersion":1},{"id":"edbd5da4-f18c-4d08-8023-df4ef7ec11fa","name":"Security RSS Read","type":"n8n-nodes-base.rssFeedRead","position":[-1820,3620],"parameters":{"url":"={{ $json.rss_url }}","options":{}},"retryOnFail":true,"typeVersion":1.1},{"id":"76d973a7-832e-4049-80ea-c0d28b72b345","name":"Privacy RSS Read","type":"n8n-nodes-base.rssFeedRead","position":[-1840,4280],"parameters":{"url":"={{ $json.rss_url }}","options":{}},"retryOnFail":true,"typeVersion":1.1},{"id":"5503fe77-8ae3-4d41-97d3-6520cb60067e","name":"Compliance RSS Read","type":"n8n-nodes-base.rssFeedRead","position":[-1840,4840],"parameters":{"url":"={{ $json.rss_url }}","options":{}},"retryOnFail":true,"typeVersion":1.1},{"id":"c2538e17-1584-45a5-8a6e-1b220ed512a5","name":"Split Out Privacy RSS","type":"n8n-nodes-base.splitOut","position":[-2060,4280],"parameters":{"options":{},"fieldToSplitOut":"rss_url"},"typeVersion":1},{"id":"d1ae80d8-8094-4f84-aa9e-d4533a99a70d","name":"Fetch Security RSS","type":"n8n-nodes-base.code","position":[-2260,3620],"parameters":{"jsCode":"// This node returns curated cybersecurity RSS feeds\n// You can add, remove, or modify feeds as needed\n\nreturn [\n  {\n    json: {\n      name: \"Krebs on Security\",\n      website: \"https://krebsonsecurity.com\",\n      rss_url: \"https://krebsonsecurity.com/feed/\"\n    }\n  },\n  {\n    json: {\n      name: \"The Hacker News\",\n      website: \"https://thehackernews.com\",\n      rss_url: \"https://feeds.feedburner.com/TheHackersNews\"\n    }\n  },\n  {\n    json: {\n      name: \"Dark Reading\",\n      website: \"https://www.darkreading.com\",\n      rss_url: \"https://www.darkreading.com/rss.xml\"\n    }\n  },\n  {\n    json: {\n      name: \"SANS Internet Storm Center\",\n      website: \"https://isc.sans.edu\",\n      rss_url: \"https://isc.sans.edu/rssfeed_full.xml\"\n    }\n  },\n  {\n    json: {\n      name: \"Cisco Talos Intelligence Blog\",\n      website: \"https://blog.talosintelligence.com\",\n      rss_url: \"https://blog.talosintelligence.com/rss/\"\n    }\n  },\n  {\n    json: {\n      name: \"WeLiveSecurity (ESET)\",\n      website: \"https://www.welivesecurity.com\",\n      rss_url: \"https://feeds.feedburner.com/eset/blog\"\n    }\n  },\n  {\n    json: {\n      name: \"Graham Cluley Security Blog\",\n      website: \"https://grahamcluley.com\",\n      rss_url: \"https://grahamcluley.com/feed/\"\n    }\n  }\n];\n"},"typeVersion":2},{"id":"fbec32fd-2ca9-4f1f-84f9-e581bc6a37e5","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-120,3480],"parameters":{"color":7,"height":100,"content":"### Update your email address or distribution list (DL) below\n⬇️"},"typeVersion":1},{"id":"4479495e-3e87-4a75-9fcc-36b230895854","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-140,4160],"parameters":{"color":7,"height":100,"content":"### Update your email address or distribution list (DL) below\n⬇️"},"typeVersion":1},{"id":"18971219-b68d-4423-adbc-2f25174ae8a9","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-140,4720],"parameters":{"color":7,"height":100,"content":"### Update your email address or distribution list (DL) below\n⬇️"},"typeVersion":1},{"id":"349ec0eb-9b5f-4bea-9b83-35d6cb63c1fa","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-2320,3520],"parameters":{"color":7,"height":80,"content":"### Update the RSS feed URL as needed to fetch content from your preferred source."},"typeVersion":1},{"id":"4f3b0da6-4db7-41e9-aa0a-9bd084fce819","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-2340,4180],"parameters":{"color":7,"height":80,"content":"### Update the RSS feed URL as needed to fetch content from your preferred source."},"typeVersion":1},{"id":"9c48eaa6-c602-44a3-871c-33ffd9dfa476","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-2340,4740],"parameters":{"color":7,"height":80,"content":"### Update the RSS feed URL as needed to fetch content from your preferred source."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"0dc52173-7378-4951-8ebc-e44443c39540","connections":{"Privacy RSS Read":{"main":[[{"node":"Normalize Article Privacy Metadata","type":"main","index":0}]]},"Security RSS Read":{"main":[[{"node":"Normalize Article Security Metadata","type":"main","index":0}]]},"Fetch Security RSS":{"main":[[{"node":"Split Out Security RSS","type":"main","index":0}]]},"Compliance RSS Read":{"main":[[{"node":"Normalize Article Compliance Metadata","type":"main","index":0}]]},"Fetch Privacy Feeds":{"main":[[{"node":"Split Out Privacy RSS","type":"main","index":0}]]},"Trigger Daily Digest":{"main":[[{"node":"Fetch Security RSS","type":"main","index":0},{"node":"Fetch Compliance Feeds","type":"main","index":0},{"node":"Fetch Privacy Feeds","type":"main","index":0}]]},"Split Out Privacy RSS":{"main":[[{"node":"Privacy RSS Read","type":"main","index":0}]]},"Fetch Compliance Feeds":{"main":[[{"node":"Split Out Compliance RSS","type":"main","index":0}]]},"Split Out Security RSS":{"main":[[{"node":"Security RSS Read","type":"main","index":0}]]},"Split Out Compliance RSS":{"main":[[{"node":"Compliance RSS Read","type":"main","index":0}]]},"AI Agent - Privacy Intelligence":{"main":[[{"node":"Privacy Build Final Newsletter HTML","type":"main","index":0}]]},"LLM - Gemini Privacy Summarizer":{"ai_languageModel":[[{"node":"AI Agent - Privacy Intelligence","type":"ai_languageModel","index":0}]]},"Sort - Privacy Articles by Date":{"main":[[{"node":"Format Privacy Articles into HTML","type":"main","index":0}]]},"AI Agent - Security Intelligence":{"main":[[{"node":"Security Build Final Newsletter HTML","type":"main","index":0}]]},"LLM - Gemini Security Summarizer":{"ai_languageModel":[[{"node":"AI Agent - Security Intelligence","type":"ai_languageModel","index":0}]]},"Sort - Security Articles by Date":{"main":[[{"node":"Format Security Articles into HTML","type":"main","index":0}]]},"Format Privacy Articles into HTML":{"main":[[{"node":"AI Agent - Privacy Intelligence","type":"main","index":0}]]},"AI Agent - Compliance Intelligence":{"main":[[{"node":"Compliance Build Final Newsletter HTML","type":"main","index":0}]]},"Format Security Articles into HTML":{"main":[[{"node":"AI Agent - Security Intelligence","type":"main","index":0}]]},"LLM - Gemini Compliance Summarizer":{"ai_languageModel":[[{"node":"AI Agent - Compliance Intelligence","type":"ai_languageModel","index":0}]]},"Normalize Article Privacy Metadata":{"main":[[{"node":"Filter Recent Privacy Articles (24h)","type":"main","index":0}]]},"Sort - Compliance Articles by Date":{"main":[[{"node":"Format Compliance Articles into HTML","type":"main","index":0}]]},"Normalize Article Security Metadata":{"main":[[{"node":"Filter Recent Security Articles (24h)","type":"main","index":0}]]},"Privacy Build Final Newsletter HTML":{"main":[[{"node":"Privacy Send Final Digest Email","type":"main","index":0}]]},"Filter Recent Privacy Articles (24h)":{"main":[[{"node":"Sort - Privacy Articles by Date","type":"main","index":0}]]},"Format Compliance Articles into HTML":{"main":[[{"node":"AI Agent - Compliance Intelligence","type":"main","index":0}]]},"Security Build Final Newsletter HTML":{"main":[[{"node":"Security Send Final Digest Email","type":"main","index":0}]]},"Filter Recent Security Articles (24h)":{"main":[[{"node":"Sort - Security Articles by Date","type":"main","index":0}]]},"Normalize Article Compliance Metadata":{"main":[[{"node":"Filter Recent Compliance Articles (24h)","type":"main","index":0}]]},"Compliance Build Final Newsletter HTML":{"main":[[{"node":"Compliance Send Final Digest Email","type":"main","index":0}]]},"Filter Recent Compliance Articles (24h)":{"main":[[{"node":"Sort - Compliance Articles by Date","type":"main","index":0}]]}}}


