编辑
2025-07-01
n8n
00

基于公众号《秋芝2046》 分享的工作流稍微实践,特此感谢下 所有 llm 都是用的openrouter上的免费模型

具体操作步骤如下:

  1. 通过 docker-compose 启动 n8n ,配置可以直接让 vibe coding ai 生成
  2. 秋芝的《草履虫教程》https://ccnk05wgo092.feishu.cn/wiki/NpXbwnjrJiYyN1kmbw4cSzT3nBd
  3. 飞书后台配置自建应用
  4. 自建多维表格,如果是知识库下面的需要获取objToken
  5. 触发获取新闻的工作流 - 用的 deepseek-r1-0528
  6. 触发总结的工作流 - 涉及tool的调用,用的是 deepseek-chat-v3-0324

以此类推,扩展更多应用。。。。 推送总结工作流

json
{ "nodes": [ { "parameters": { "rule": { "interval": [ { "triggerAtHour": 10 } ] } }, "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ 0, 19 ], "id": "7b09c457-0c4f-478a-b527-2cac40cae750", "name": "Schedule Trigger" }, { "parameters": { "promptType": "define", "text": "你是我的专属AI助理“新闻报通”!你的使命是帮我洞察最新的AI动态,智能推荐感兴趣的内容和安排行程。在没有行业大事发生时,你也会关心我的生活,推荐放松娱乐活动。 最终你需要将所有分析和建议,整合为一个适合在飞书卡片中展示的Markdown格式文本块。保持乐观、敏锐、有创造力!\n我有一个核心工具供你调遣:\nnews:用它来抓取过去2天内飞书多维表格里最新、最有料的AI新闻。此工具会返回一个新闻列表,列表中的每条新闻都包含:新闻标题、发布日期、发布媒体、核心内容/摘要、以及原文链接。\n\n你的行动指令:\n智能分析与建议(输出为纯Markdown格式)\n你的核心任务是生成一段单一、完整的Markdown文本。此文本本身就是最终要在飞书卡片中呈现的内容。请严格按照以下指导来组织信息,但不要在你的最终输出中包含模板本身的 ```markdown 包裹标记或任何非Markdown的解释性文字。\nMarkdown内容结构指导(请填充实际内容):\n\n### 🚀 AI圈今日速递与【**专属建议**】\n\n**🌟 今日AI新闻看板:**\n{{#if (tool_output.latest_news an_array_with_items)}}\n{{#each tool_output.latest_news as |news_item|}}\n* ---\n* **标题:** {{news_item.title}}\n* **发布日期:** {{news_item.date}}\n* **发布媒体:** {{news_item.source_or_media}}\n* **核心摘要:** {{news_item.summary}}\n* **原文链接:** [点击查看详情]({{news_item.link}})\n{{/each}}\n{{else}}\n* 今天AI领域风平浪静,暂未捕获到新的AI大新闻。是时候出门活动活动了!\n{{/if}}\n* ---\n\n**📅 我的近期日程概览:**\n[此处列出未来几天的相关日程条目,或清晰指明哪些天/时段有空档,例如:\n* X月X日 (周X):上午 - 视频脚本A;下午 - 暂无安排\n* X月X日 (周X):全天 - 参与行业会议\n]\n\n**💡 综合建议与排期参考:**\n[基于今天获取到的所有新闻(如果有的话)以及我的日程空闲情况,给出一个综合性的建议。\n例如:\n- 如果有多条高质量新闻且日程有空:可以建议优先看哪条新闻,或者建议如何将不同新闻分配到不同的空闲时段。例如:“老板,今天新闻不少!**《[某新闻标题]》的讨论热度和价值最高,** 建议安排在[X月X日空闲时段]详细看看。”\n- 如果新闻一般但日程有空:可以建议“今天的几条新闻中,《[某新闻标题]》可以略作关注,但若无特别感兴趣,[X月X日空闲时段]或许更适合外出放松放松。”\n- 如果无新闻但日程有空:“老板,今日无AI大新闻,正好给大脑放个假!我看您[X月X日]有空,不如去[附近的公园散散步/看场最新上映的电影/找个咖啡馆发发呆]?劳逸结合!”\n- 如果日程已满,无论有无新闻:“老板,接下来几天日程紧凑,建议将今天的新闻信息先存档,待有空档再阅读。目前先专注已安排的工作。”\n]\n\n处理逻辑:\n关于新闻展示: 如果【最新新闻查询】工具返回了多条新闻,你需要将所有新闻条目都按照上述Markdown结构中的新闻格式一一列出。 如果没有新闻,则在“今日AI新闻看板”下明确告知。\n关于综合建议: 这是最重要的部分。你需要结合今天获取的所有新闻的整体情况(数量、质量、潜力)和我的日程空闲度,给出一个最终的、具有指导性的综合建议。你的建议逻辑应遵循:\n【有新闻】:优先分析新闻的价值和趣味性,结合日程推荐最有意思的新闻内容详情。\n【无新闻】:则检查日程空闲时间,主动推荐外出、娱乐等放松身心的活动。\n【日程满】:无论有无新闻,都以提醒专注现有工作为最优先。\n第三步:输出纯净的Markdown文本块\n你的最终输出必须且仅仅是按照第二步指导填充内容后形成的完整Markdown文本内容本身。\n再次强调:输出的开头不应有 ```markdown ,结尾也不应有 ``` 或任何其他非Markdown的字符、注释或解释。直接从Markdown的第一个字符(例如 ###)开始,到最后一个字符结束。\n通用要求:\n确保所有列出的信息(新闻的各项数据、日程条目)都准确来源于工具的输出,列出所有的新闻。\n你的建议要具体、有建设性、信息充分,并体现出是对所有信息的综合考量。\n语气要积极、专业,充满洞察力", "options": {} }, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 2, "position": [ 640, 120 ], "id": "d11feabb-0996-498a-bf14-3da6a6bbc3ff", "name": "AI Agent" }, { "parameters": { "model": { "__rl": true, "value": "deepseek/deepseek-chat-v3-0324:free", "mode": "list", "cachedResultName": "deepseek/deepseek-chat-v3-0324:free" }, "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.2, "position": [ 480, 280 ], "id": "6df9158a-0599-47a4-8666-2a2eba67e039", "name": "deep-seek", "credentials": { "openAiApi": { "id": "7zzh8qcPX947r7su", "name": "OpenAi account" } } }, { "parameters": { "method": "POST", "url": "https://open.feishu.cn/open-apis/bot/v2/hook/ec0a3959-81ce-4ad6-b97a-95a0abc1e9bf", "sendBody": true, "specifyBody": "json", "jsonBody": "={\n \"msg_type\": \"interactive\",\n \"card\": {\n \"schema\": \"2.0\",\n \"config\": {\n \"update_multi\": true,\n \"style\": {\n \"text_size\": {\n \"normal_v2\": {\n \"default\": \"normal\",\n \"pc\": \"normal\",\n \"mobile\": \"heading\"\n }\n }\n }\n },\n \"body\": {\n \"direction\": \"vertical\",\n \"padding\": \"12px 12px 12px 12px\",\n \"elements\": [\n {\n \"tag\": \"markdown\",\n \"content\": \"{{ $json.output ? JSON.stringify($json.output).slice(1, -1) : '' }}\",\n \"text_align\": \"left\",\n \"text_size\": \"normal_v2\",\n \"margin\": \"0px 0px 0px 0px\"\n }\n ]\n },\n \"header\": {\n \"title\": {\n \"tag\": \"plain_text\",\n \"content\": \"AI News\"\n },\n \"subtitle\": {\n \"tag\": \"plain_text\",\n \"content\": \"\"\n },\n \"template\": \"blue\",\n \"padding\": \"12px 12px 12px 12px\"\n }\n }\n}\n", "options": {} }, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [ 1000, 120 ], "id": "d2d93ea9-91ea-4167-9dc0-f115ffee26c8", "name": "HTTP Request" }, { "parameters": { "resource": "bitable", "operation": "bitable:table:record:search", "app_toke": "LYrAbBK2taTM4tsW3GucGtvxn2g", "table_id": "tblun1YXEWVYhEMn", "body": "{\n \"filter\": {\n \"conjunction\": \"or\",\n \"conditions\": [\n {\n \"field_name\": \"创建时间\",\n \"operator\": \"is\",\n \"value\": [\"Today\"]\n },\n {\n \"field_name\": \"创建时间\",\n \"operator\": \"is\",\n \"value\": [\"Yesterday\"]\n }\n ]\n }\n}" }, "type": "n8n-nodes-feishu-lite.feishuNodeTool", "typeVersion": 1, "position": [ 840, 360 ], "id": "298cdee2-da09-47bf-9e3e-86ea93fcd147", "name": "news", "credentials": { "feishuCredentialsApi": { "id": "1XGr1gKgS8kme9W8", "name": "Feishu Credentials account" } } } ], "connections": { "Schedule Trigger": { "main": [ [ { "node": "AI Agent", "type": "main", "index": 0 } ] ] }, "AI Agent": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] }, "deep-seek": { "ai_languageModel": [ [ { "node": "AI Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "news": { "ai_tool": [ [ { "node": "AI Agent", "type": "ai_tool", "index": 0 } ] ] } }, "pinData": {}, "meta": { "templateCredsSetupCompleted": true, "instanceId": "5832c2da31ff51a8b1ed3cb67fb3a855aeb24f55266b760e465aaa4b262fb4ec" } }
json
{ "nodes": [ { "parameters": { "rule": { "interval": [ { "triggerAtHour": 7 } ] } }, "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ -180, 360 ], "id": "6f3ca819-a198-487c-8544-ca0d0cf11c9e", "name": "Schedule Trigger" }, { "parameters": { "resource": "bitable", "operation": "bitable:table:record:add", "app_toke": "LYrAbBK2taTM4tsW3GucGtvxn2g", "table_id": "tblun1YXEWVYhEMn", "body": "={\"fields\":{\n \"标题\":\"{{ $json['标题'] }}\",\n \"日期\":\"{{ new Date($json['日期']).toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai', hour12: false }).replace(/\\//g, '-').replace(',', '') }}\",\n \"内容\":\"{{$json['内容']\n .replace(/<[^>]+>/g, '')\n .replace(/[^\\p{L}\\p{N}\\s]/gu, '')\n .replace(/[\\r\\n\\t]/g, ' ')\n}}\"\n,\n\"链接\": {\n \"text\": \"AI新闻原文\",\n \"link\": \"{{ $json[\"链接\"].replace(/\\n/g, \"\") }}\"\n},\n\"媒体\":\"{{ $json['媒体'] }}\"\n}}" }, "type": "n8n-nodes-feishu-lite.feishuNode", "typeVersion": 1, "position": [ 1960, 520 ], "id": "099fc5cb-28f3-4fdc-96cf-2ec520f9ccc3", "name": "Feishu Node", "credentials": { "feishuCredentialsApi": { "id": "1XGr1gKgS8kme9W8", "name": "Feishu Credentials account" } } }, { "parameters": { "assignments": { "assignments": [ { "id": "c12a8604-4cf6-4450-b62a-34efc6041c92", "name": "标题", "value": "={{ $json.title }}", "type": "string" }, { "id": "41a62bce-c755-4cc2-9beb-05c33146fa8d", "name": "内容", "value": "={{ $json['content:encodedSnippet'] }}", "type": "string" }, { "id": "65541a9d-7041-41ec-8b51-87cf75b76554", "name": "日期", "value": "={{ $json.pubDate }}", "type": "string" }, { "id": "885000e0-7cf7-45e1-8757-ced1cd54fc00", "name": "链接", "value": "={{ $json.link }}", "type": "string" }, { "id": "3b253c13-45ff-4fbc-a12f-70e3f09c815c", "name": "媒体", "value": "国内媒体新", "type": "string" } ] }, "options": {} }, "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 820, 220 ], "id": "b6d660f1-86bc-449a-bc61-978b023e04eb", "name": "Edit Fields1" }, { "parameters": { "assignments": { "assignments": [ { "id": "4a6f9f45-3c11-4524-9be5-f730b56f17f3", "name": "标题", "value": "={{ $json.title }}", "type": "string" }, { "id": "f68170aa-2ca3-4e5b-a3cd-6de9caf18bc7", "name": "日期", "value": "={{ $json.pubDate }}", "type": "string" }, { "id": "de78fd6b-2ee0-4d0e-9c62-7bc7fcff3f32", "name": "内容", "value": "={{ $json['content:encodedSnippet'] }}", "type": "string" }, { "id": "92d70c7f-03ce-4608-bad1-41c7fae5f4a4", "name": "链接", "value": "={{ $json.link }}", "type": "string" }, { "id": "4bccfc6b-c914-47fd-a073-049e0ab52234", "name": "媒体", "value": "腾讯科技", "type": "string" } ] }, "options": {} }, "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 800, 620 ], "id": "e4d2dbeb-e34f-4cec-bd5e-a83e8352ac8a", "name": "Edit Fields2" }, { "parameters": { "maxItems": 6 }, "type": "n8n-nodes-base.limit", "typeVersion": 1, "position": [ 600, 820 ], "id": "39a8b2d6-8cbc-4fc9-a736-e256bfbb302c", "name": "Limit1" }, { "parameters": { "assignments": { "assignments": [ { "id": "a45690cf-ad3c-45eb-b247-573cbeb33085", "name": "日期", "value": "={{ $json.pubDate }}", "type": "string" }, { "id": "6ab5382e-0ab1-4f1f-a24f-37558243d508", "name": "标题", "value": "={{ $json.title }}", "type": "string" }, { "id": "c36ff096-9fa6-46f1-9b19-610887b9eed7", "name": "内容", "value": "={{ $json.content }}", "type": "string" }, { "id": "8af9729f-fd49-4063-a45d-fe381ac46654", "name": "链接", "value": "={{ $json.guid }}", "type": "string" }, { "id": "804fa287-05c3-497e-be0e-b7ee2e3ef13b", "name": "媒体", "value": "国内媒体量", "type": "string" } ] }, "options": {} }, "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 820, 820 ], "id": "fec4cc85-34c6-49ac-b8b9-1ef060848885", "name": "Edit Fields3" }, { "parameters": { "url": "https://plink.anyfeeder.com/weixin/AI_era", "options": { "ignoreSSL": true } }, "type": "n8n-nodes-base.rssFeedRead", "typeVersion": 1.1, "position": [ 600, 220 ], "id": "ecb933a6-5c3e-4845-9caa-c4909eea132a", "name": "xinzhiyuan" }, { "parameters": { "url": "https://plink.anyfeeder.com/weixin/qqtech", "options": {} }, "type": "n8n-nodes-base.rssFeedRead", "typeVersion": 1.1, "position": [ 600, 620 ], "id": "02702a2b-0243-4358-9cf1-bb83c29a0e79", "name": "tengxunkeji" }, { "parameters": { "url": "https://www.qbitai.com/feed", "options": {} }, "type": "n8n-nodes-base.rssFeedRead", "typeVersion": 1.1, "position": [ 380, 820 ], "id": "458f0bbf-aaec-4d74-9772-357f869f2954", "name": "liangziwei" }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "loose", "version": 2 }, "conditions": [ { "id": "a291383a-2989-4e4f-bf9a-34a46c06c3d8", "leftValue": "={{ new Date($json[\"日期\"]).toISOString().slice(0,10) }}\n", "rightValue": "={{ new Date().toISOString().slice(0,10) }}", "operator": { "type": "dateTime", "operation": "equals" } }, { "id": "04261e50-217f-4338-aa39-2bcfcb5c774e", "leftValue": "", "rightValue": "", "operator": { "type": "string", "operation": "equals", "name": "filter.operator.equals" } } ], "combinator": "and" }, "looseTypeValidation": true, "options": {} }, "type": "n8n-nodes-base.filter", "typeVersion": 2.2, "position": [ 1120, 560 ], "id": "e7343116-d66a-4c6b-b254-3492840bd26b", "name": "filter_today" }, { "parameters": { "rule": { "interval": [ { "triggerAtHour": 21 } ] } }, "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.2, "position": [ -100, 700 ], "id": "3d9b9946-6dba-4000-898d-236c6504399c", "name": "Schedule Trigger1" }, { "parameters": { "promptType": "define", "text": "=把你收到的新闻信息都整理成干净的格式,内容需要总结为摘要,以下是新闻:\n 标题 :{{ $json['标题'] }} 内容:{{ $json['内容'] }} 日期:{{ $json['日期'] }} 链接:{{ $json['链接'] }} 媒体:{{ $json['媒体'] }}", "hasOutputParser": true, "batching": {} }, "type": "@n8n/n8n-nodes-langchain.chainLlm", "typeVersion": 1.7, "position": [ 1340, 560 ], "id": "aa004b70-22f4-42bc-8406-3acffe6665e6", "name": "Basic LLM Chain" }, { "parameters": { "assignments": { "assignments": [ { "id": "4899cbc9-b256-4378-b030-5ed9c4b9f491", "name": "日期", "value": "={{ $json.output['日期'] }}", "type": "string" }, { "id": "55f35fb8-e5dc-4e29-be42-d04d8a5ddf38", "name": "内容", "value": "={{ $json.output['内容'] }}", "type": "string" }, { "id": "7cfb38ff-e2fc-4d06-b3ca-74b6018f80f0", "name": "媒体", "value": "={{ $json.output['媒体'] }}", "type": "string" }, { "id": "21625050-7ccd-48a3-834b-cab3e03f833f", "name": "链接", "value": "={{ $json.output['链接'] }}", "type": "string" }, { "id": "a8acfac0-6be7-4bd7-b685-744f020dd6b6", "name": "标题", "value": "", "type": "string" } ] }, "options": {} }, "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 1720, 520 ], "id": "b8498457-18a1-48c3-b31b-7e1d499d0a29", "name": "Edit Fields4" }, { "parameters": { "jsonSchemaExample": "{\n \"标题\":\"xxxx\",\n\t\"日期\": \"\",\n\t\"内容\": \"国内第一个 ai 大模型诞生了\",\n \"媒体\":\" 国内媒体新\",\n \"链接\":\"http://www.baidu.com\"\n}" }, "type": "@n8n/n8n-nodes-langchain.outputParserStructured", "typeVersion": 1.2, "position": [ 1480, 780 ], "id": "51510b93-36dc-4ab3-a540-7b5cc1a29f25", "name": "Structured Output Parser" }, { "parameters": { "model": { "__rl": true, "value": "deepseek/deepseek-r1-0528:free", "mode": "list", "cachedResultName": "deepseek/deepseek-r1-0528:free" }, "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.2, "position": [ 1300, 780 ], "id": "1261066f-d108-49ca-a7a3-9dcecaad3c2b", "name": "deep-seek", "credentials": { "openAiApi": { "id": "JNjUfw6zJuudOMye", "name": "open router" } } } ], "connections": { "Schedule Trigger": { "main": [ [ { "node": "xinzhiyuan", "type": "main", "index": 0 }, { "node": "tengxunkeji", "type": "main", "index": 0 }, { "node": "liangziwei", "type": "main", "index": 0 } ] ] }, "Edit Fields1": { "main": [ [ { "node": "filter_today", "type": "main", "index": 0 } ] ] }, "Edit Fields2": { "main": [ [ { "node": "filter_today", "type": "main", "index": 0 } ] ] }, "Limit1": { "main": [ [ { "node": "Edit Fields3", "type": "main", "index": 0 } ] ] }, "Edit Fields3": { "main": [ [ { "node": "filter_today", "type": "main", "index": 0 } ] ] }, "xinzhiyuan": { "main": [ [ { "node": "Edit Fields1", "type": "main", "index": 0 } ] ] }, "tengxunkeji": { "main": [ [ { "node": "Edit Fields2", "type": "main", "index": 0 } ] ] }, "liangziwei": { "main": [ [ { "node": "Limit1", "type": "main", "index": 0 } ] ] }, "filter_today": { "main": [ [ { "node": "Basic LLM Chain", "type": "main", "index": 0 } ] ] }, "Schedule Trigger1": { "main": [ [ { "node": "xinzhiyuan", "type": "main", "index": 0 }, { "node": "liangziwei", "type": "main", "index": 0 }, { "node": "filter_today", "type": "main", "index": 0 } ] ] }, "Basic LLM Chain": { "main": [ [ { "node": "Edit Fields4", "type": "main", "index": 0 } ] ] }, "Edit Fields4": { "main": [ [ { "node": "Feishu Node", "type": "main", "index": 0 } ] ] }, "Structured Output Parser": { "ai_outputParser": [ [ { "node": "Basic LLM Chain", "type": "ai_outputParser", "index": 0 } ] ] }, "deep-seek": { "ai_languageModel": [ [ { "node": "Basic LLM Chain", "type": "ai_languageModel", "index": 0 } ] ] } }, "pinData": {}, "meta": { "templateCredsSetupCompleted": true, "instanceId": "5832c2da31ff51a8b1ed3cb67fb3a855aeb24f55266b760e465aaa4b262fb4ec" } }
如果对你有用的话,可以打赏哦
打赏
ali pay
wechat pay

本文作者:beq

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!