Twitter数据抓取 - n8n Creator
这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 39 个节点。主要使用 Set, Code, Wait, Merge, SplitOut 等节点。 使用Gemini 2.5 Pro自动生成Twitter情报摘要并推送到WhatsApp群组
- •可能需要目标 API 的认证凭证
使用的节点 (39)
{
"id": "XG1lhAb5fa3zXdoG",
"meta": {
"instanceId": "e5475e3f5ea4317f0b981b80d6948e4bd2ba92e8c8af9ecbbaf8d90708882234",
"templateCredsSetupCompleted": true
},
"name": "Twitter 数据抓取 - n8n Creator",
"tags": [
{
"id": "feOWREMBfPD45Duf",
"name": "Daniel Lianes",
"createdAt": "2025-08-25T17:33:50.739Z",
"updatedAt": "2025-08-25T17:33:50.739Z"
}
],
"nodes": [
{
"id": "2b96db52-cb4c-466e-80cd-6d13ae3f2b3f",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
1584,
3584
],
"parameters": {
"numberInputs": 8
},
"typeVersion": 3.2
},
{
"id": "01768919-36b7-4acc-b2fd-be319cad47dd",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1840,
2624
],
"parameters": {
"color": 6,
"width": 1184,
"height": 976,
"content": "## AI 分析阶段"
},
"typeVersion": 1
},
{
"id": "6e20df17-6acf-4862-9af4-d36b18aa0f76",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1840,
3696
],
"parameters": {
"color": 4,
"width": 1456,
"height": 992,
"content": "## WHATSAPP 发送阶段"
},
"typeVersion": 1
},
{
"id": "a989b67e-58f6-4b78-801f-661e7fa6a14e",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
192,
2624
],
"parameters": {
"color": 5,
"width": 1568,
"height": 2400,
"content": "## X 平台抓取阶段"
},
"typeVersion": 1
},
{
"id": "12e20b53-9803-445c-9f4c-0da12fb66df1",
"name": "Gemini 2.5 Pro",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
2704,
3408
],
"parameters": {
"model": "google/gemini-2.5-pro",
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "LqgCEdz2AnX2b493",
"name": "OpenRouter Averis"
}
},
"typeVersion": 1
},
{
"id": "cafde5a4-d4a0-4fab-b73e-0b7c9083bad8",
"name": "每日智能扫描",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
256,
3664
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 10
}
]
}
},
"typeVersion": 1.2
},
{
"id": "ddffd6b2-81e7-4d73-932a-e7469f56f5f1",
"name": "监控:账户 1 - Lovable",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
2912
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/user/last_tweets",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "userId",
"value": "1778383739925520384"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "4c3ec67a-6c12-4e11-9791-f745dee1d1f8",
"name": "监控:账户 2 - n8n",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
3168
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/user/last_tweets",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "userId",
"value": "1068479892537384960"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "55bef1ac-40e4-463d-bd33-f6ee43362674",
"name": "监控:账户 3 - ElevenLabs",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
3424
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/user/last_tweets",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "userId",
"value": "209598373"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "4dc430c8-97e3-4667-a970-8d45b8e5c271",
"name": "监控:账户 3 - OpenAI",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
3664
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/user/last_tweets",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "userId",
"value": "4398626122"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "b37d8cd6-cb69-4e0c-be52-4377496f4441",
"name": "监控:账户 4 - Anthropic",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
3920
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/user/last_tweets",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "userId",
"value": "1353836358901501952"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "0f1921f6-30a7-44de-bf9d-2632c337da2c",
"name": "搜索:关键词 1 - vibecoding",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
4160
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/tweet/advanced_search",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "vibecoding"
},
{
"name": "queryType",
"value": "Latest"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "a269a8a9-1c59-4a17-9078-ba7e537df6a8",
"name": "搜索:关键词 3 - ai agents",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
4608
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/tweet/advanced_search",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "ai agents"
},
{
"name": "queryType",
"value": "Latest"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "53a4d1d4-e257-4d36-bf98-7d5e322b4546",
"name": "搜索:关键词 2 - ai news",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
4384
],
"parameters": {
"url": "https://api.twitterapi.io/twitter/tweet/advanced_search",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "ai news"
},
{
"name": "queryType",
"value": "Latest"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "3P23x7U4eYW4f3nU",
"name": "Twitter-API.io"
}
},
"typeVersion": 4.2
},
{
"id": "ecb2ee3f-ec45-4400-a5c1-b03f70b0d47f",
"name": "提取推文数据(账户 1)",
"type": "n8n-nodes-base.code",
"position": [
1056,
2912
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || inputData.code !== 0 || !inputData.data || !inputData.data.tweets) {\n return [];\n}\n\nconst tweets = inputData.data.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "6417bae4-c71e-4fc2-a399-08ba176279af",
"name": "提取推文数据(账户 2)",
"type": "n8n-nodes-base.code",
"position": [
1056,
3168
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || inputData.code !== 0 || !inputData.data || !inputData.data.tweets) {\n return [];\n}\n\nconst tweets = inputData.data.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "09507a37-b1ae-43bd-8c6e-ec19bbc8a59f",
"name": "提取推文数据(账户 3)",
"type": "n8n-nodes-base.code",
"position": [
1056,
3424
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || inputData.code !== 0 || !inputData.data || !inputData.data.tweets) {\n return [];\n}\n\nconst tweets = inputData.data.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "fe514aa9-6146-45cc-8852-c97173b99820",
"name": "提取推文数据(账户 4)",
"type": "n8n-nodes-base.code",
"position": [
1056,
3664
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || inputData.code !== 0 || !inputData.data || !inputData.data.tweets) {\n return [];\n}\n\nconst tweets = inputData.data.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "3df15a5c-0feb-41c6-9910-3230f69adf23",
"name": "提取推文数据(账户 5)",
"type": "n8n-nodes-base.code",
"position": [
1056,
3920
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || inputData.code !== 0 || !inputData.data || !inputData.data.tweets) {\n return [];\n}\n\nconst tweets = inputData.data.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "4cbd4d83-4418-437b-9862-9d4e1b0b8051",
"name": "提取搜索数据(关键词 1)",
"type": "n8n-nodes-base.code",
"position": [
1056,
4160
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || !inputData.tweets || !Array.isArray(inputData.tweets)) {\n return [];\n}\n\nconst tweets = inputData.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "f427369f-f264-4aa1-b8d7-7e214efff05e",
"name": "提取搜索数据(关键词 2)",
"type": "n8n-nodes-base.code",
"position": [
1056,
4384
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || !inputData.tweets || !Array.isArray(inputData.tweets)) {\n return [];\n}\n\nconst tweets = inputData.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "5df1aff5-3fa2-463e-b7e3-2e81de9d8450",
"name": "提取搜索数据(关键词 3)",
"type": "n8n-nodes-base.code",
"position": [
1056,
4608
],
"parameters": {
"jsCode": "// Obtener los datos de entrada\nconst inputData = $input.first().json;\n\n// Verificar si hay datos válidos\nif (!inputData || !inputData.tweets || !Array.isArray(inputData.tweets)) {\n return [];\n}\n\nconst tweets = inputData.tweets;\nconst results = [];\n\n// Procesar cada tweet\ntweets.forEach(tweet => {\n const extractedTweet = {\n text: tweet.text || '',\n retweetCount: tweet.retweetCount || 0,\n replyCount: tweet.replyCount || 0,\n likeCount: tweet.likeCount || 0,\n viewCount: tweet.viewCount || 0,\n // Campos adicionales útiles (opcionales)\n id: tweet.id || '',\n url: tweet.url || '',\n createdAt: tweet.createdAt || '',\n author: tweet.author?.name || ''\n };\n \n results.push(extractedTweet);\n});\n\nreturn results.map(tweet => ({ json: tweet }));"
},
"typeVersion": 2
},
{
"id": "39aef2a4-12a0-4dfa-a6e1-72571155d91e",
"name": "标准化字段名称",
"type": "n8n-nodes-base.set",
"position": [
1968,
3136
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "1dca3074-6ecb-4df1-a47a-4b5b7fb76915",
"name": "contenido",
"type": "string",
"value": "={{ $json.text }}"
},
{
"id": "a1502a3f-1c30-47b6-9110-baf7556abad0",
"name": "retweetCount",
"type": "string",
"value": "={{ $json.retweetCount }}"
},
{
"id": "75435596-0e51-4fcb-ac5e-557ab7f55bec",
"name": "likeCount",
"type": "string",
"value": "={{ $json.likeCount }}"
},
{
"id": "fd19fffe-56d5-4f2a-9aad-80a6046d1b7d",
"name": "viewCount",
"type": "string",
"value": "={{ $json.viewCount }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f8fe0e2e-cc44-4394-9617-4556a7f73fcd",
"name": "聚合推文数据",
"type": "n8n-nodes-base.aggregate",
"position": [
2176,
3136
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "cb2295e8-213f-4e82-952c-67823fece1b0",
"name": "准备 AI 分析",
"type": "n8n-nodes-base.summarize",
"position": [
2368,
3136
],
"parameters": {
"options": {},
"fieldsToSplitBy": "contenido",
"fieldsToSummarize": {
"values": [
{
"field": "data",
"aggregation": "concatenate"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "635e6237-4ea5-43a0-bfd0-d79513110e8f",
"name": "为 WhatsApp 格式化",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2480,
3776
],
"parameters": {
"text": "=<news_videos> {{ $json.output }} </news_videos>\nCRITICAL: If the original message has 500 words, your output must have exactly 500 words. If it has 50 words, exactly 50 words. COUNT THE WORDS.",
"messages": {
"messageValues": [
{
"message": "=<PROMPT_SYSTEM>\n\n <MASTER_OBJECTIVE>\n Your primary task is to receive a tech analysis report from \"Mr. X ❄️\" and convert it into a series of separate, WhatsApp-optimized text messages. You must format the output as a specific JSON structure and adhere strictly to the content of the original input.\n </MASTER_OBJECTIVE>\n\n <INPUT_DESCRIPTION>\n You will receive a Markdown-formatted report from the tech analyst Mr. X ❄️. The report will contain a greeting, highlights, and several thematic sections.\n </INPUT_DESCRIPTION>\n\n <OUTPUT_SPECIFICATION>\n <FORMAT>\n You must return a single, valid JSON object with the following exact structure:\n ```json\n {\n \"messages\": [\n \"message_1_with_greeting_and_summary\",\n \"message_2_with_AI_section\",\n \"message_3_with_automation_section\",\n \"message_N_with_reflections_and_signoff\"\n ]\n }\n ```\n </FORMAT>\n <EXAMPLE>\n <INPUT_TEXT>\n ¡Base Antártida operativa! Señor X ❄️ reportando.\n\n ## 🎯 LO MÁS DESTACADO\n GPT-5 lanzado oficialmente. N8N cambia su pricing.\n\n ## 🤖 INTELIGENCIA ARTIFICIAL\n ### GPT-5 Disponible\n **Lo que pasa:** OpenAI lanza GPT-5 en API\n **Por qué importa:** Salto en capacidades\n\n ## 🧊 REFLEXIONES DESDE EL HIELO\n El ritmo se acelera.\n\n Señor X ❄️, fuera.\n </INPUT_TEXT>\n\n <EXPECTED_OUTPUT_JSON>\n ```json\n {\n \"messages\": [\n \"Antarctica Base operational! Mr. X ❄️ reporting.\\n\\n🎯 *HIGHLIGHTS*\\nGPT-5 has been officially launched. N8N is changing its pricing.\",\n \"🤖 *ARTIFICIAL INTELLIGENCE*\\n\\n*GPT-5 Available* - OpenAI has launched the GPT-5 API. This represents a leap in capabilities that directly impacts our development possibilities.\",\n \"🧊 *REFLECTIONS FROM THE ICE*\\nThe pace is accelerating.\\n\\nMr. X ❄️, over and out.\"\n ]\n }\n ```\n </EXPECTED_OUTPUT_JSON>\n </EXAMPLE>\n </OUTPUT_SPECIFICATION>\n\n <CORE_LOGIC_AND_RULES>\n <MESSAGE_SPLITTING_CRITERIA>\n <RULE>Message 1: Must contain the Greeting + Highlights (`LO MÁS DESTACADO`).</RULE>\n <RULE>Message 2: Must contain the entire Artificial Intelligence (`INTELIGENCIA ARTIFICIAL`) section.</RULE>\n <RULE>Message 3: Must contain the entire Automation & Tools (`AUTOMATIZACIÓN Y HERRAMIENTAS`) section.</RULE>\n <RULE>Message 4: Must contain the Development/Vibe Coding (`DESARROLLO Y VIBE CODING`) section, if it exists.</RULE>\n <RULE>Message 5: Must contain the Critical Alerts (`ALERTAS CRÍTICAS`) section, if it exists.</RULE>\n <RULE>Final Message: Must contain the Reflections from the Ice (`REFLEXIONES DESDE EL HIELO`) + Sign-off.</RULE>\n <PRINCIPLE>Each main section from the original report should become a single message in the array.</PRINCIPLE>\n </MESSAGE_SPLITTING_CRITERIA>\n\n <WHATSAPP_FORMATTING_RULES>\n <RULE>Section titles (e.g., `## 🎯 LO MÁS DESTACADO`) must be formatted with asterisks for bolding (e.g., `🎯 *HIGHLIGHTS*`).</RULE>\n <RULE>Sub-headers (e.g., `### GPT-5 Disponible`) should also be bolded (e.g., `*GPT-5 Available*`).</RULE>\n <RULE>Convert vertical lists or bullet points into continuous, narrative-style paragraphs.</RULE>\n <RULE>Use double newlines (`\\n\\n`) to create paragraph breaks between subsections within a single message.</RULE>\n </WHATSAPP_FORMATTING_RULES>\n </CORE_LOGIC_AND_RULES>\n\n <CRITICAL_CONSTRAINTS>\n <CONTENT_FIDELITY>\n <PROHIBITION>ABSOLUTELY DO NOT ADD any information, data, or context that is not present in the original input.</PROHIBITION>\n <PROHIBITION>DO NOT invent or expand upon any technical details, dates, or specifications.</PROHIBITION>\n <PROHIBITION>DO NOT create new sections that did not exist in the original report.</PROHIBITION>\n <PROHIBITION>DO NOT change the analyst's original evaluations or perspectives.</PROHIBITION>\n <REQUIREMENT>You MUST use the original wording and phrasing from the analysis as closely as possible, only adapting it to fit a paragraph structure.</REQUIREMENT>\n </CONTENT_FIDELITY>\n\n <TECHNICAL_REQUIREMENTS>\n <REQUIREMENT>The final output MUST be a single, valid JSON object.</REQUIREMENT>\n <REQUIREMENT>The JSON must contain one key: \"messages\", whose value is an array of strings.</REQUIREMENT>\n <REQUIREMENT>ALL content from the original report must be present in the final messages.</REQUIREMENT>\n </TECHNICAL_REQUIREMENTS>\n </CRITICAL_CONSTRAINTS>\n\n</PROMPT_SYSTEM>"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "36f0e922-e189-47a7-885e-a0f357b81b62",
"name": "JSON 结构解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
3040,
4176
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"mensajes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"required\": [\"mensajes\"]\n}"
},
"typeVersion": 1.2
},
{
"id": "d15e6497-261d-4ab0-97f0-39736cdca913",
"name": "自动修复 JSON 错误",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
2848,
3984
],
"parameters": {
"options": {
"prompt": "Instructions:\n--------------\n{instructions}\n--------------\nCompletion:\n--------------\n{completion}\n--------------\n\nAbove, the Completion did not satisfy the constraints given in the Instructions.\nError:\n--------------\n{error}\n--------------\n\nPlease try again. Please only respond with an answer that satisfies the constraints laid out in the Instructions:"
}
},
"typeVersion": 1
},
{
"id": "5cec9fff-f9e4-41d7-ba59-be3c61a5c6c8",
"name": "处理消息批次",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2464,
4336
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "a52d3e9b-958e-41c3-bacf-2eebfee1103f",
"name": "分割 WhatsApp 消息",
"type": "n8n-nodes-base.splitOut",
"position": [
2240,
4336
],
"parameters": {
"include": "allOtherFields",
"options": {},
"fieldToSplitOut": "output.mensajes"
},
"typeVersion": 1
},
{
"id": "2f88395b-028f-452c-834c-e3a44457a550",
"name": "发送至 WhatsApp 群组",
"type": "n8n-nodes-evolution-api.evolutionApi",
"position": [
2768,
4368
],
"parameters": {
"resource": "messages-api",
"remoteJid": "120363419788967600@g.us",
"messageText": "={{ $json['output.mensajes'] }}",
"instanceName": "Averis",
"options_message": {
"linkPreview": true
}
},
"credentials": {
"evolutionApi": {
"id": "CIwiRkXyvC3Nbgqf",
"name": "Evolution Averis"
}
},
"typeVersion": 1
},
{
"id": "2d8aff54-4459-4ff9-85bd-5726ba20541a",
"name": "速率限制保护",
"type": "n8n-nodes-base.wait",
"position": [
3040,
4416
],
"webhookId": "6708b921-b219-412e-b0a6-2ccee9a670b7",
"parameters": {
"amount": 0.1
},
"typeVersion": 1.1
},
{
"id": "b7997eb4-6327-4060-bc15-425bbc67d48e",
"name": "GPT-4.1 格式化器",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
2848,
4176
],
"parameters": {
"model": "openai/gpt-4.1",
"options": {
"temperature": 0
}
},
"credentials": {
"openRouterApi": {
"id": "FYXQKGowUia8VieK",
"name": "OpenRouter Test"
}
},
"typeVersion": 1
},
{
"id": "5ddd022c-0805-4929-93cb-ce6f43d00a29",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
2640
],
"parameters": {
"width": 672,
"height": 592,
"content": "## TWITTER 到 WHATSAPP 自动化新闻源"
},
"typeVersion": 1
},
{
"id": "e7881eb6-0219-4078-83d4-d206b1165803",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
3792
],
"parameters": {
"color": 5,
"width": 672,
"height": 624,
"content": "## 配置清单"
},
"typeVersion": 1
},
{
"id": "604a390e-ab9d-407f-913c-c58dae404de2",
"name": "便签15",
"type": "n8n-nodes-base.stickyNote",
"position": [
3072,
2704
],
"parameters": {
"color": 5,
"width": 540,
"height": 784,
"content": "## 这对您有帮助吗?请告诉我!"
},
"typeVersion": 1
},
{
"id": "402f08f1-142e-4e95-8a2e-2f5efe6e90e3",
"name": "AI 分析引擎",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2624,
3136
],
"parameters": {
"text": "=Post en X:\n{{ $json.concatenated_data }}",
"batching": {},
"messages": {
"messageValues": [
{
"message": "<PROMPT_SYSTEM>\n\n<AGENT_CONFIGURATION>\n <ID>Mr. X ❄️ v4.0 (Batch Processor)</ID>\n <MODEL_TARGET>Gemini 2.5 Pro</MODEL_TARGET>\n <OBJECTIVE>Process a full batch of tweets (delivered as a JSON string), identify all relevant news, and generate a single JSON output object containing: 1) a consolidated 'daily_report' with the batch's highlights, and 2) a 'data_for_sheets' list with the breakdown of EACH individual news item found.</OBJECTIVE>\n</AGENT_CONFIGURATION>\n\n<PERSONA>\n <NAME>Mr. X ❄️</NAME>\n <ROLE>The most insightful tech intelligence analyst on the planet...</ROLE>\n <CONTEXT>You operate from an isolated research base in Antarctica...</CONTEXT>\n <TONE>Analytical, Cold, Technically Deep, Conversational and Direct, Unique Perspective.</TONE>\n</PERSONA>\n\n<INPUT_DATA_STRUCTURE>\n <DESCRIPTION>You will receive a single JSON object containing one key: `concatenated_data`. The value of this key is a STRING which, in turn, contains an array of JSON objects, where each object is a tweet. Your first step must always be to parse this string to work with the data.</DESCRIPTION>\n <EXAMPLE_INPUT_SHAPE>\n {\n \"concatenated_data\": \"[{\\\"content\\\":\\\"...\\\",\\\"likeCount\\\":\\\"...\\\"}, {\\\"content\\\":\\\"...\\\",\\\"likeCount\\\":\\\"...\\\"}]\"\n }\n </EXAMPLE_INPUT_SHAPE>\n</INPUT_DATA_STRUCTURE>\n\n<CORE_WORKFLOW>\n <DESCRIPTION>Your cognitive process must follow these steps to process the entire batch efficiently and accurately.</DESCRIPTION>\n\n <STEP_1_INGESTION_AND_PARSING>\n <ACTION>Take the `concatenated_data` string and parse it into an array of tweet objects. Immediately filter out any obvious noise (spam, non-tech related, etc.) to reduce the cognitive load.</ACTION>\n </STEP_1_INGESTION_AND_PARSING>\n\n <STEP_2_ITERATION_AND_ANALYSIS_INDIVIDUAL>\n <ACTION>Iterate over EACH tweet in the parsed array. For each one, apply the logic of Mr. X:\n 1. **Calibrate Relevance:** Use the content, `likeCount`, and `viewCount` to decide if it's a \"signal\" or \"noise\". Pay special attention to launches, updates, tutorials, and benchmarks.\n 2. **Extract Intelligence:** If relevant, extract the key information. A single tweet can contain multiple news items.\n 3. **Prepare Data for Sheets:** For EACH individual news item you find, create a structured JSON object (with `unique_id`, `main_category`, `news_title`, etc.) and save it to a temporary list.\n </ACTION>\n </STEP_2_ITERATION_AND_ANALYSIS_INDIVIDUAL>\n\n <STEP_3_SYNTHESIS_AND_CONSOLIDATION>\n <ACTION>Once ALL tweets have been analyzed, review all the relevant news you have collected and perform a high-level synthesis.</ACTION>\n <SUB_STEPS>\n - **Create Highlights:** Identify the 2-4 most important topics or announcements from the ENTIRE batch. These will be the `highlights` of your `daily_report`.\n - **Write Detailed Analysis:** Draft the `analysis` section of the `daily_report`, detailing the most significant news.\n - **Reflect:** Write the `ice_reflections` by connecting the dots between the different news items in the batch to identify meta-trends.\n </SUB_STEPS>\n </STEP_3_SYNTHESIS_AND_CONSOLIDATION>\n\n <STEP_4_FINAL_ASSEMBLY>\n <ACTION>Construct the final JSON output object.</ACTION>\n <SUB_STEPS>\n - The `daily_report` key will contain the consolidated summary you created in Step 3.\n - The `data_for_sheets` key will contain the complete list of all the individual objects you prepared in Step 2.\n </SUB_STEPS>\n </STEP_4_FINAL_ASSEMBLY>\n\n</CORE_WORKFLOW>\n\n<OUTPUT_FORMATTING>\n <INSTRUCTION>\n Your one and only output must be a valid JSON object, with nothing before or after it. The main structure must contain the keys `daily_report` and `data_for_sheets`.\n </INSTRUCTION>\n</OUTPUT_FORMATTING>\n\n<RULES_AND_CONSTRAINTS>\n - **Complete Processing:** You must process the entire batch. Do not stop after finding just a few news items.\n - **Aggressive Filtering:** Be relentless in filtering out noise. The input batch contains many irrelevant tweets (e.g., health, politics, etc.). Ignore them completely.\n - **Uniqueness:** Ensure that `data_for_sheets` does not contain duplicate news items if multiple tweets announce the exact same thing. Group information if necessary.\n - **Intelligent Consolidation:** The `daily_report` is not a list of everything; it is an executive summary of the most important items in the batch.\n</RULES_AND_CONSTRAINTS>\n\n\n</PROMPT_SYSTEM>"
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "c2e2de67-f5e5-4e21-b125-08bdcbba8286",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
3312
],
"parameters": {
"color": 7,
"width": 668,
"height": 400,
"content": "## 查找您的 WHATSAPP 群组"
},
"typeVersion": 1
},
{
"id": "db02b520-a1c8-4d07-88bd-fc3e8cc55930",
"name": "查找您的群组",
"type": "n8n-nodes-evolution-api.evolutionApi",
"disabled": true,
"position": [
-272,
3472
],
"parameters": {
"resource": "groups-api",
"operation": "fetch-groups",
"instanceName": "Averis",
"searchMethod": "fetchAll"
},
"credentials": {
"evolutionApi": {
"id": "CIwiRkXyvC3Nbgqf",
"name": "Evolution Averis"
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"Daily Intelligence Scan": [
{
"json": {
"Hour": "10",
"Year": "2025",
"Month": "August",
"Minute": "00",
"Second": "29",
"Timezone": "Europe/Madrid (UTC+02:00)",
"timestamp": "2025-08-25T10:00:29.046+02:00",
"Day of week": "Monday",
"Day of month": "25",
"Readable date": "August 25th 2025, 10:00:29 am",
"Readable time": "10:00:29 am"
}
}
]
},
"settings": {
"timezone": "Europe/Madrid",
"callerPolicy": "workflowsFromSameOwner",
"executionOrder": "v1"
},
"versionId": "9fdead29-7a11-470f-a50b-0d9fbd1eaddc",
"connections": {
"Merge": {
"main": [
[
{
"node": "Normalize Field Names",
"type": "main",
"index": 0
}
]
]
},
"Gemini 2.5 Pro": {
"ai_languageModel": [
[
{
"node": "AI Analysis Engine",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"GPT-4.1 Formatter": {
"ai_languageModel": [
[
{
"node": "Format for WhatsApp",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Auto-fix JSON Errors",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Analysis Engine": {
"main": [
[
{
"node": "Format for WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Format for WhatsApp": {
"main": [
[
{
"node": "Split WhatsApp Messages",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Tweet Data": {
"main": [
[
{
"node": "Prepare for AI Analysis",
"type": "main",
"index": 0
}
]
]
},
"Auto-fix JSON Errors": {
"ai_outputParser": [
[
{
"node": "Format for WhatsApp",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"JSON Structure Parser": {
"ai_outputParser": [
[
{
"node": "Auto-fix JSON Errors",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Normalize Field Names": {
"main": [
[
{
"node": "Aggregate Tweet Data",
"type": "main",
"index": 0
}
]
]
},
"Rate Limit Protection": {
"main": [
[
{
"node": "Process Message Batches",
"type": "main",
"index": 0
}
]
]
},
"Send to WhatsApp Group": {
"main": [
[
{
"node": "Rate Limit Protection",
"type": "main",
"index": 0
}
]
]
},
"Daily Intelligence Scan": {
"main": [
[
{
"node": "Search: Keyword 1 - vibecoding",
"type": "main",
"index": 0
},
{
"node": "Monitor: Account 1 - Lovable",
"type": "main",
"index": 0
},
{
"node": "Monitor: Account 2 - n8n",
"type": "main",
"index": 0
},
{
"node": "Monitor: Account 3 - ElevenLabs",
"type": "main",
"index": 0
},
{
"node": "Monitor: Account 3 - OpenAI",
"type": "main",
"index": 0
},
{
"node": "Monitor: Account 4 - Anthropic",
"type": "main",
"index": 0
},
{
"node": "Search: Keyword 2 - ai news",
"type": "main",
"index": 0
},
{
"node": "Search: Keyword 3 - ai agents",
"type": "main",
"index": 0
}
]
]
},
"Prepare for AI Analysis": {
"main": [
[
{
"node": "AI Analysis Engine",
"type": "main",
"index": 0
}
]
]
},
"Process Message Batches": {
"main": [
[],
[
{
"node": "Send to WhatsApp Group",
"type": "main",
"index": 0
}
]
]
},
"Split WhatsApp Messages": {
"main": [
[
{
"node": "Process Message Batches",
"type": "main",
"index": 0
}
]
]
},
"Monitor: Account 2 - n8n": {
"main": [
[
{
"node": "Extract Tweet Data (Account 2)",
"type": "main",
"index": 0
}
]
]
},
"Monitor: Account 3 - OpenAI": {
"main": [
[
{
"node": "Extract Tweet Data (Account 4)",
"type": "main",
"index": 0
}
]
]
},
"Search: Keyword 2 - ai news": {
"main": [
[
{
"node": "Extract Search Data (Keyword 2)",
"type": "main",
"index": 0
}
]
]
},
"Monitor: Account 1 - Lovable": {
"main": [
[
{
"node": "Extract Tweet Data (Account 1)",
"type": "main",
"index": 0
}
]
]
},
"Search: Keyword 3 - ai agents": {
"main": [
[
{
"node": "Extract Search Data (Keyword 3)",
"type": "main",
"index": 0
}
]
]
},
"Extract Tweet Data (Account 1)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Extract Tweet Data (Account 2)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Extract Tweet Data (Account 3)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 2
}
]
]
},
"Extract Tweet Data (Account 4)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 3
}
]
]
},
"Extract Tweet Data (Account 5)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 4
}
]
]
},
"Monitor: Account 4 - Anthropic": {
"main": [
[
{
"node": "Extract Tweet Data (Account 5)",
"type": "main",
"index": 0
}
]
]
},
"Search: Keyword 1 - vibecoding": {
"main": [
[
{
"node": "Extract Search Data (Keyword 1)",
"type": "main",
"index": 0
}
]
]
},
"Extract Search Data (Keyword 1)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 5
}
]
]
},
"Extract Search Data (Keyword 2)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 6
}
]
]
},
"Extract Search Data (Keyword 3)": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 7
}
]
]
},
"Monitor: Account 3 - ElevenLabs": {
"main": [
[
{
"node": "Extract Tweet Data (Account 3)",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - AI 摘要总结, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Daniel Lianes
@daniellianesAs a strategic consultant in Automation and AI, I'm passionate about helping business owners simplify operations and scale smarter. My approach is a partnership: I listen to your unique needs to design custom solutions that solve real challenges. But I don't just build and leave—I also coach your team to master these new systems, empowering you for sustainable success. Beyond client work, I'm a true enthusiast, always exploring new possibilities and sharing what I learn with the community.
分享此工作流