8
n8n 中文网amn8n.com

使用 GPT-5-mini 从 Google Sheets 生成 AI 新闻简报草稿到

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, Notion, HttpRequest, GoogleSheets, ManualTrigger 等节点。 使用 GPT-5-mini 从 Google Sheets 生成 AI 新闻简报草稿到 Notion

前置要求
  • Notion API Key
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "zr4Sw6kh7nyjbwHU",
  "meta": {
    "instanceId": "592ab86418d16f6d35fe26275b159f790f264e346be9ab41a59d2e46ed226265",
    "templateCredsSetupCompleted": true
  },
  "name": "新闻简报自动化",
  "tags": [],
  "nodes": [
    {
      "id": "6828ddf2-9504-4944-892a-adf294822ec6",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -256,
        -1056
      ],
      "parameters": {
        "text": "=## System Role Instructions\n\nYou are an expert newsletter writer tasked with creating engaging, professional, and story-driven newsletters for our audience. Your job is to take the given **title** and **about text** and turn them into a polished newsletter draft.\n\nFollow these detailed rules and guidelines:\n\n---\n\n### ✍️ Writing Style & Voice\n\n* Inspired by **Ali Abdaal’s newsletters**: warm, friendly, conversational, yet structured and reflective.  \n* The email should feel like it’s written to a friend, while still delivering value and insight.  \n* Use **plain English**. No jargon unless explained simply.  \n* Flow naturally from **story → reflection → takeaway**.  \n* Keep a **narrative feel** — avoid heavy subheadings or too many bullet points.  \n* Use paragraphs as the main building blocks (with the occasional list if absolutely needed).  \n* Balance personal anecdotes with **clear, useful lessons**.  \n\n---\n\n### 🏗️ Structure to Follow\n\n1. **Subject Line**  \n   * Must be curiosity-driven (can include 1 emoji).  \n   * Example: “⚡ The One Decision That Changed Everything.”  \n\n2. **Hero Caption**  \n   * Short supporting line that adds intrigue or context.  \n\n3. **Opening Hook**  \n   * Friendly, personal update or anecdote that draws the reader in.  \n\n4. **Main Story / Insights**  \n   * Expand on `{{ $json['About the Newsletter'] }}`.  \n   * Present it as a flowing story with reflections woven in.  \n   * Prefer paragraphs (80%) over lists (20%).  \n\n5. **Reactions / Internet Pulse (optional)**  \n   * If relevant, mention how people reacted online or in your circle.  \n\n6. **Personal Reflection / Lesson**  \n   * Add your own viewpoint.  \n   * End with a **clear, memorable takeaway**.  \n\n7. **Optional Plug / CTA Section**  \n   * Natural and conversational — like recommending something to a friend.  \n   * Never salesy.  \n\n8. **Closing**  \n   * Warm sign-off, often with a reflective or open-ended question.  \n\n---\n\n### 📌 Content Guidelines\n\n* Keep paragraphs short (2–4 sentences for readability).  \n* Use bold only for **emphasis**.  \n* ❌ No emojis in the body text (only in subject line).  \n* ❌ Avoid filler, robotic tone, or clickbait.  \n* ✅ Must always sound **human, authentic, and thoughtful**.  \n\n---\n\n### 🚀 Output Format\n\nGenerate the newsletter draft with these sections in order:\n\n1. **Subject Line**  \n2. **Hero Caption**  \n3. **Body**  \n   * Hook  \n   * Story/Insights (based on `{{ $json['About the Newsletter'] }}`)  \n   * Reflection/lesson  \n   * Optional plug  \n   * Closing  \n\n---\n\n## User Prompt\n\nGenerate a newsletter using the following inputs:\n\n* **Newsletter Title**: `{{ $json['Newsletter Title'] }}`  \n* **About the Newsletter**: `{{ $json['About the Newsletter'] }}`  \n\n---\n\n## Assistant Task\n\nTake the above inputs and produce a **complete, story-driven newsletter draft** following the system role instructions.\n\n👉 Each time you pass a new `{{ $json['Newsletter Title'] }}` and `{{ $json['About the Newsletter'] }}`, the assistant will output a full, narrative-style newsletter in this exact tone and structure.",
        "options": {
          "systemMessage": "=You are an expert newsletter writer tasked with creating engaging, professional, and **story-driven** newsletters for our audience.  \nYour job is to take the **topics provided by the user** and turn them into polished newsletters that follow these rules and guidelines.\n\n---\n\n## ✍️ Writing Style & Voice\n\n* Inspired by **Ali Abdaal’s LifeNotes style** — warm, reflective, conversational.  \n* Feels like an **email to a friend** rather than a blog article.  \n* Prioritize paragraphs and flow — avoid overuse of bullet points or subheadings.  \n* Use **short, varied sentences** to create rhythm.  \n* Inject personal reflections, small anecdotes, and lessons.  \n* Always **balance storytelling with useful takeaways**.  \n\n---\n\n## 🏗️ Structure\n\n1. **Subject Line**  \n   * Curiosity-driven, can include one emoji.  \n\n2. **Hero Caption**  \n   * Short, intriguing supporting line.  \n\n3. **Opening Hook**  \n   * A friendly anecdote or casual update that sets the tone.  \n\n4. **Main Story**  \n   * Narrative expansion of the newsletter topic.  \n   * Keep flow conversational — no rigid sectioning.  \n   * Prefer **paragraph storytelling** (80%) with light use of lists (20%).  \n\n5. **Reflection / Lesson**  \n   * Share your key insight and leave the reader with a clear takeaway.  \n\n6. **Optional Plug**  \n   * Smoothly integrate recommendations, resources, or links.  \n   * Must feel natural, never sales-pitchy.  \n\n7. **Closing**  \n   * Warm sign-off with an optional reflective question to invite replies.  \n\n---\n\n## 📌 Content Guidelines\n\n1. **Language & Tone**  \n   * Conversational, professional, but never stiff.  \n   * No jargon unless explained.  \n   * No fluff, filler, or robotic tone.  \n\n2. **Formatting**  \n   * Short paragraphs (2–4 sentences).  \n   * Bold sparingly for emphasis.  \n   * Minimal lists; narrative should dominate.  \n\n3. **Do’s**  \n   * Keep curiosity alive.  \n   * Share stories + reflections.  \n   * Provide **actionable or thoughtful takeaways**.  \n\n4. **Don’ts**  \n   * ❌ No emojis in body (only in subject line).  \n   * ❌ No clickbait or over-promises.  \n   * ❌ No generic motivational filler.  \n\n---\n\n## 🚀 Output Expectations\n\n* Always generate a **complete newsletter draft** (subject line → closing).  \n* Must feel **human, authentic, and narrative-driven**.  \n* No heavy subheadings or over-structured blog style.  \n\n✅ For each new `{{ $json['Newsletter Title']}}` and `{{ $json['About the Newsletter'] }}`, output a **storytelling-style newsletter** in this format.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": false,
      "typeVersion": 2.1
    },
    {
      "id": "d8f83230-6d9b-4c25-bf45-5e1914dd7b50",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -192,
        -832
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini",
          "cachedResultName": "gpt-5-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "7zjRgMY7Orjj7sAw",
          "name": "Nected OpenAI"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "089d9188-2ad9-4eed-a29d-4072b0c5c35b",
      "name": "获取表格中的行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -704,
        -928
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Pending",
              "lookupColumn": "N8n Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1587951649,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FC85hTMDoQjEZQ_gPvxccUBnb3_TQCJ4LE-puIIQqok/edit#gid=1587951649",
          "cachedResultName": "newsletter"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1FC85hTMDoQjEZQ_gPvxccUBnb3_TQCJ4LE-puIIQqok",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FC85hTMDoQjEZQ_gPvxccUBnb3_TQCJ4LE-puIIQqok/edit?usp=drivesdk",
          "cachedResultName": "Blog Automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "o840xhrR0qHFcIq7",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "a0ac31b3-3ca6-452f-8dbe-a97fa10bfea2",
      "name": "在表格中更新行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        -928
      ],
      "parameters": {
        "columns": {
          "value": {
            "N8n Status": "Done",
            "Newsletter Title": "={{ $('Loop Over Items').item.json['Newsletter Title'] }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "Newsletter Title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Newsletter Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "About the Newsletter",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "About the Newsletter",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "N8n Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "N8n Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Manual Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Manual Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Newsletter Title"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1587951649,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FC85hTMDoQjEZQ_gPvxccUBnb3_TQCJ4LE-puIIQqok/edit#gid=1587951649",
          "cachedResultName": "newsletter"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1FC85hTMDoQjEZQ_gPvxccUBnb3_TQCJ4LE-puIIQqok",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1FC85hTMDoQjEZQ_gPvxccUBnb3_TQCJ4LE-puIIQqok/edit?usp=drivesdk",
          "cachedResultName": "Blog Automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "o840xhrR0qHFcIq7",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "28dafa8b-a70a-4444-95f1-3abbf9ad0e92",
      "name": "更新Notion块",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        544,
        -1056
      ],
      "parameters": {
        "url": "=https://api.notion.com/v1/blocks/{{ $('Create Page').item.json.id }}/children",
        "method": "PATCH",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "children",
              "value": "={{ $json.children }}"
            }
          ]
        },
        "nodeCredentialType": "notionApi"
      },
      "credentials": {
        "notionApi": {
          "id": "cyStdgM7SXwC0wd9",
          "name": "Personal Notion"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "eec35fc8-d211-44b2-8329-1d799f3de22e",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        -1056
      ],
      "parameters": {
        "jsCode": "const src = JSON.stringify($('AI Agent').first().json.output);\nconst size = 1800; // safe chunk size for Notion text\nconst blocks = [];\nfor (let i = 0; i < src.length; i += size) {\n  blocks.push({\n    type: 'paragraph',\n    paragraph: {\n      // language: 'json',\n      rich_text: [{ type: 'text', text: { content: src.slice(i, i + size) } }]\n    }\n  });\n}\nreturn [{ children: blocks, title: \"AML JSON\" }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5be862bd-44bf-4ffb-a196-cf44d5b7c274",
      "name": "创建页面",
      "type": "n8n-nodes-base.notion",
      "position": [
        96,
        -1056
      ],
      "parameters": {
        "title": "={{ $('Loop Over Items').item.json[\"Newsletter Title\"] }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "25464682-6523-80fb-9d90-fa66eea90e21",
          "cachedResultUrl": "https://www.notion.so/25464682652380fb9d90fa66eea90e21",
          "cachedResultName": "Newsletter Automation"
        }
      },
      "credentials": {
        "notionApi": {
          "id": "cyStdgM7SXwC0wd9",
          "name": "Personal Notion"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "62e67b86-a0f0-4933-9bbc-f02c159975b2",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -928,
        -928
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "25b33ac0-44b4-493e-8b3b-4591d67bf100",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -480,
        -928
      ],
      "parameters": {
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 3
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4ae5a026-3240-474a-b57b-8c2d61a68ed7",
  "connections": {
    "eec35fc8-d211-44b2-8329-1d799f3de22e": {
      "main": [
        [
          {
            "node": "28dafa8b-a70a-4444-95f1-3abbf9ad0e92",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6828ddf2-9504-4944-892a-adf294822ec6": {
      "main": [
        [
          {
            "node": "5be862bd-44bf-4ffb-a196-cf44d5b7c274",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5be862bd-44bf-4ffb-a196-cf44d5b7c274": {
      "main": [
        [
          {
            "node": "eec35fc8-d211-44b2-8329-1d799f3de22e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "25b33ac0-44b4-493e-8b3b-4591d67bf100": {
      "main": [
        [],
        [
          {
            "node": "6828ddf2-9504-4944-892a-adf294822ec6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d8f83230-6d9b-4c25-bf45-5e1914dd7b50": {
      "ai_languageModel": [
        [
          {
            "node": "6828ddf2-9504-4944-892a-adf294822ec6",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "28dafa8b-a70a-4444-95f1-3abbf9ad0e92": {
      "main": [
        [
          {
            "node": "a0ac31b3-3ca6-452f-8dbe-a97fa10bfea2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "089d9188-2ad9-4eed-a29d-4072b0c5c35b": {
      "main": [
        [
          {
            "node": "25b33ac0-44b4-493e-8b3b-4591d67bf100",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a0ac31b3-3ca6-452f-8dbe-a97fa10bfea2": {
      "main": [
        [
          {
            "node": "25b33ac0-44b4-493e-8b3b-4591d67bf100",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "62e67b86-a0f0-4933-9bbc-f02c159975b2": {
      "main": [
        [
          {
            "node": "089d9188-2ad9-4eed-a29d-4072b0c5c35b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 内容创作, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量9
分类2
节点类型8
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Snehasish Konger

Snehasish Konger

@snehasish

Founder @Scientyfic World

外部链接
在 n8n.io 查看

分享此工作流

分类

分类: 34