Back to Templates

Generate AI Newsletter Drafts from Google Sheets to Notion with GPT-5-mini

Created by

Created by: Snehasish Konger || snehasish

Snehasish Konger

Last update

Last update a day ago

Share


How it works:

This template turns rows in a Google Sheet into polished newsletter drafts in Notion using an AI writing agent. You click Execute workflow in n8n, it fetches all rows marked N8n Status = Pending, generates the draft from the row’s Newsletter Title and About the Newsletter, creates a Notion page, writes the full draft into it, then flips the sheet row to Done before moving to the next one.

Step-by-step:

  1. Manual Trigger
    You start the run with When clicking ‘Execute workflow’.

  2. Fetch pending input (Google Sheets → Get row(s) in sheet)
    Reads from your spreadsheet’s newsletter tab and pulls only rows where N8n Status = Pending.

  3. Iterate (Split In Batches → Loop Over Items)
    Processes one sheet row at a time to keep memory use steady and control pacing.

  4. Generate the newsletter (AI Agent + OpenAI Chat Model)

    • AI Agent loads a structured “System Role Instructions” prompt that defines the newsletter style, sections, and output format.
    • It passes the row’s Newsletter Title and About the Newsletter to the OpenAI Chat Model (gpt-5-mini) to produce a complete draft.
  5. Create a Notion page (Notion → Create Page)
    Makes a new page in your Notion database Newsletter Automation, with the page title set to the row’s Newsletter Title.

  6. Prepare long content for Notion (Code)
    Splits the AI output into ~1,800-character chunks and wraps them as Notion paragraph blocks to avoid payload limits.

  7. Write content blocks to Notion (HTTP Request → UpdateNotionBlock)
    Sends a PATCH request to the Notion API to append all generated blocks to the new page, so the full draft appears in Notion.

  8. Mark the sheet row as done (Google Sheets → Update row in sheet)
    Updates N8n Status = Done for the processed Newsletter Title.

  9. Continue the loop
    Returns to Split In Batches for the next pending row until no items remain.

Tools integration:

  • Google Sheets — input queue and status tracking (PendingDone)
  • OpenAI — LLM that writes the newsletter from provided fields
  • Notion — target knowledge base where each draft is saved as a page
  • n8n Code + HTTP Request — chunking and Notion API write operations

Want to add an auto-run? Attach a Cron trigger before step 2 and keep the same flow.