AutomationFlowsAI & RAG › Generate and Send AI Newsletters with Openai, Tavily, Google Sheets and Gmail

Generate and Send AI Newsletters with Openai, Tavily, Google Sheets and Gmail

ByPratyush Kumar Jha @pratyush on n8n.io

This workflow automates the complete process of generating and sending AI-powered newsletters. It starts with a form submission where the user provides a brand name, website, and topic query. The system then fetches relevant news, analyzes the brand’s visual identity (colors &…

Event trigger★★★★★ complexityAI-powered30 nodesOutput Parser StructuredAgentGoogle SheetsGmailOpenAI ChatHTTP RequestForm TriggerInformation Extractor
AI & RAG Trigger: Event Nodes: 30 Complexity: ★★★★★ AI nodes: yes Added:
Generate and Send AI Newsletters with Openai, Tavily, Google Sheets and Gmail — n8n workflow card showing Output Parser Structured, Agent, Google Sheets integration

This workflow corresponds to n8n.io template #14412 — we link there as the canonical source.

This workflow follows the Agent → Form Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "nli8XpsbjHbI26d1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Newsletter Automation Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "f97f8aad-e674-4c9a-8ac1-528785ff2a79",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1008,
        544
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"required\": [\"title\", \"topics\"],\n  \"properties\": {\n    \"title\": {\n      \"type\": \"string\",\n      \"description\": \"A short, descriptive title\"\n    },\n    \"topics\": {\n      \"type\": \"array\",\n      \"description\": \"An array of exactly three topics\",\n      \"minItems\": 3,\n      \"maxItems\": 3,\n      \"items\": {\n        \"type\": \"string\"\n      }\n    }\n  },\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "0b8c2f23-f7a1-42df-a95b-5c4aac01b334",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3232,
        368
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"subject\": {\n      \"type\": \"string\",\n      \"description\": \"the email subject\"\n    },\n    \"content\": {\n      \"type\": \"string\",\n      \"description\": \"the newsletter content\"\n    }\n  },\n  \"required\": [\"subject\", \"content\"]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "2f7807f3-84ab-4980-8afd-fc063434ab41",
      "name": "Generate Draft Topics (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        864,
        320
      ],
      "parameters": {
        "text": "={{ $json.results.map(item => JSON.stringify(item,null,5)).join('\\n\\\\n') }}",
        "options": {
          "systemMessage": "# Overview\nYou are an expert newsletter planner. You will receive three articles from the past week. Your job is to come up with a creative and fun title as well as the main topics for this newsletter.\n\n## Instructions\nThe newsletter should flow nicely, feel informative, and holistic. The topics should be 5-6 words."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "3c6aae50-ffdb-4a21-a3f3-7760fef62eb9",
      "name": "Split Topics",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1216,
        320
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output.topics"
      },
      "typeVersion": 1
    },
    {
      "id": "94708b0f-eb07-40e8-9bbd-fa253ef6f1de",
      "name": "Generate Newsletter Content (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1664,
        320
      ],
      "parameters": {
        "text": "=Topic {{ $json.query }}\n\nResearch:\n{{ $json.results.map(item => JSON.stringify(item,null,5)).join('\\n\\\\n') }}",
        "options": {
          "systemMessage": "=# Overview\nYou are a professional newsletter section writer. Your only task is to write one standalone section of a newsletter.\n\n## Instructions\n- Always include a clear section heading followed by the section content.\n- Do not write an overall title, introduction, or conclusion.\n- Write in a professional, expert, and engaging tone suitable for a business newsletter.\n- If you reference facts, data, or quotes, you must cite your sources and provide the actual clickable URLs.\n- Do not invent citations\u2014only include real, verifiable sources.\n- Keep the section concise, well-structured, and easy to read."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "ab67a2b7-553a-4134-ac4a-ba2a768e14e8",
      "name": "Merge Content Pieces",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1968,
        320
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "output"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7ac35b41-ce45-4bd3-9bff-f8aa926b1f6f",
      "name": "Convert Newsletter to HTML (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3088,
        160
      ],
      "parameters": {
        "text": "=Title: {{ $('Generate Draft Topics (AI)').item.json.output.title }}\n\nSections: {{ $('Aggregate').item.json.output[2].output.join(\"\\n\\n\\n\")}}",
        "options": {
          "systemMessage": "=You are an expert newsletter editor and visual designer.\nMerge exactly three provided sections into a cohesive, email-ready HTML body that maintains a consistent professional layout, while adapting only the text colors according to the provided brand color theme.\n\n\ud83c\udfaf Objectives\n\nRefine clarity, coherence, and tone across all sections.\n\nMaintain a friendly, modern, Gen Z\u2013aligned voice that\u2019s professional yet approachable.\n\nOnly text colors (headings, paragraphs, links, footer text) should dynamically adapt to the provided color theme.\n\nPreserve the original layout, structure, padding, and overall visual hierarchy exactly as provided.\n\nEnsure strong readability, balance, and flow.\n\nKeep total content \u2264 1000 words (hard limit). Avoid filler or redundant text.\n\nEnd every email with a friendly, brand-colored footer.\n\n\ud83c\udfa8 Brand Text Color Adaptation Rules\n\nUse the color theme study provided by the workflow, which typically includes:\n\nVariable\tDescription\nprimary_color\tHighlight / heading color\nsecondary_color\tBody and paragraph text color\naccent_color\tLinks and buttons\nbackground_color\tOverall background tone\n\n\u2705 Important: Only apply these to text elements.\nDo not alter layout properties such as background, borders, padding, or container structure.\n\n\ud83e\uddf1 Fixed Layout Template\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<body style=\"background-color:#f9f9f9; padding:30px; font-family:'Helvetica Neue', Arial, sans-serif;\">\n  <div style=\"max-width:720px; margin:auto; background:#ffffff; padding:35px 40px; border-radius:16px; line-height:1.7; color:{{ $('Aggregate').item.json.output[1].output.secondary_color }}; box-shadow:0 4px 12px rgba(0,0,0,0.05);\">\n\n    <div style=\"text-align:center;\">\n      <img src=\"{{ $('Aggregate').item.json.output[0].output.Logo }}\" alt=\"Company Logo\" width=\"120\" />\n    </div>\n\n    <h1 style=\"font-size:26px; color:{{ $('Aggregate').item.json.output[1].output.primary_color }}; margin-bottom:20px; text-align:center; font-weight:700;\">\n      {{ $('On form submission').item.json['Brand Name'] }} Newsletter \u2728\n    </h1>\n    <p> Hi {{ $json.Name }}, </p>\n    \n    <!-- Dynamic merged content goes here -->\n    \n    <p style=\"font-size:14px; color:{{ $('Aggregate').item.json.output[1].output.secondary_color }}; text-align:center; margin-top:35px; border-top:1px solid #eee; padding-top:15px;\">\n      \u00a9 {{ $now.format('yyyy') }} <span style=\"color:{{ $('Aggregate').item.json.output[1].output.primary_color }}; font-weight:bold;\">{{ $('On form submission').item.json['Brand Name'] }}</span> | Built with \ud83d\udc9a for our community <br>\n      <span style=\"font-size:12px; color:{{ $('Aggregate').item.json.output[1].output.accent_color }};\">Stay curious. Stay creative. \ud83d\ude80</span>\n    </p>\n  </div>\n</body>\n\n\ud83d\udd8b Element Styling (Only Text Color Adapts)\nElement\tStyle\n<h2>\tfont-size:21px; color: {{ $('Aggregate').item.json.output[1].output.primary_color }}; margin-top:28px; margin-bottom:12px; font-weight:600;\n<h3>\tfont-size:18px; color: {{ $('Aggregate').item.json.output[1].output.secondary_color }}; margin-top:22px; margin-bottom:10px; font-weight:500;\n<p>\tfont-size:16px; margin-bottom:18px; color: {{ $('Aggregate').item.json.output[1].output.secondary_color }};\n<ul>\tmargin:18px 0 18px 25px; font-size:16px; color: {{ $('Aggregate').item.json.output[1].output.secondary_color }};\n<li>\tmargin-bottom:10px;\n<a>\tcolor: {{ $('Aggregate').item.json.output[1].output.accent_color }}; text-decoration:none; (hover underline optional)\n\nThe layout (margins, padding, shadows, alignment) remains static. Only text colors are dynamically injected from the color study.\n\n\ud83e\udde9 Content Structure\n\nIntroduction Paragraph:\nBriefly introduce the three topics and mention today\u2019s date: {{ $now.format('yyyy-MM-dd') }}.\n\nEach Section:\n\n<h2>: Use or slightly refine the section title.\n\n<p>: Summarize clearly and engagingly.\n\nAdd verifiable citations using clickable <a href=\"https://...\">Source</a> links.\n\nSources Section:\n\n<h3>Sources:</h3>\n<ul>\n  <li><a href=\"[URL]\">[Publication Name] \u2013 [Article Title]</a></li>\n</ul>\n\n\nAlphabetize by publication name\n\nRemove duplicates\n\nConclusion:\nSummarize all three themes and end with an uplifting or call-to-action note.\n\n\ud83d\udd17 Citation Rules\n\nNever fabricate or alter sources.\n\nOnly use real, verifiable URLs.\n\nStandardize all sources into <a> tags.\n\nRemove duplicates.\n\n\ud83d\udce5 Input\n\nYou will receive:\n\nThree newsletter content sections\n\nBrand color theme study (primary_color, secondary_color, accent_color, background_color)\n\nOptionally: brand_name and brand_logo_url\n\n\ud83d\udce4 Output Format\n\nSubject line: One concise, specific subject (\u2264 80 characters)\n\nBody: Fully styled HTML that applies dynamic text colors only, while preserving the fixed, professional layout and footer."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "5f8ca3bc-9a8c-47bd-b224-b6e1c1681986",
      "name": "Save Newsletter Draft in Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3440,
        48
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $json.output.subject }}",
            "Message": "={{ $json.output.content }}",
            "Email Send At": "={{$now}}",
            "Email Created At": "={{$now}}"
          },
          "schema": [
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Message",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Created At",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email Created At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Send At",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email Send At",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA/edit?usp=drivesdk",
          "cachedResultName": "Newsletter Emails"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e5212eee-c26a-4aa3-8e47-4c4a338912d5",
      "name": "Sending Emails to all the Subscribers",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3456,
        240
      ],
      "parameters": {
        "sendTo": "={{ $('Loop Over Items').item.json.Email }}",
        "message": "={{ $('Convert Newsletter to HTML (AI)').item.json.output.content }}",
        "options": {},
        "subject": "={{ $('Convert Newsletter to HTML (AI)').item.json.output.subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c9ad18bd-00a2-4e8b-8f12-4bc61560c34d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        864,
        544
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "012f555e-6931-482c-8c90-d37e4d537985",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1664,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d463cedc-5d0d-4100-8d65-beba941dc1ad",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3088,
        368
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a7ed594d-450b-4f74-aaa1-93b391aea887",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -64
      ],
      "parameters": {
        "width": 592,
        "height": 528,
        "content": "# \ud83d\udce8 AI Newsletter Automation Workflow\n\n## \ud83d\ude80 Brief Overview (How It Works)\n\nThis workflow automates the complete process of generating and sending AI-powered newsletters. It starts with a form submission where the user provides a brand name, website, and topic query. The system then fetches relevant news, analyzes the brand\u2019s visual identity (colors & logo), and uses AI to generate structured newsletter topics and content. Finally, it converts everything into a beautifully styled HTML email, saves it to Google Sheets, and sends it to all subscribers via Gmail.\n\n## Quick Setup Guide\n\ud83d\udc49 [Demo & Setup Video](https://drive.google.com/file/d/1ulOGWNL3cKe3y7tSKWNG2jlpL7dyiAgX/view?usp=sharing)\n\ud83d\udc49 [Sheet Template](https://docs.google.com/spreadsheets/d/1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA/edit?usp=sharing)\n\ud83d\udc49 [Course](https://www.udemy.com/course/n8n-automation-mastery-build-ai-powered-enterprise-ready/?referralCode=2EAE71591D3BEB80F2CC)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b59b4147-a715-4202-9887-c629c259d403",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        320
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"query\": \"{{ $json.Query }}\",\n    \"include_answer\": \"advanced\",\n    \"topic\": \"news\",\n    \"search_depth\": \"advanced\",\n    \"time_range\": \"week\"\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fa0708d4-d3f9-4770-8364-df8647a82d5b",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        352,
        128
      ],
      "parameters": {
        "options": {},
        "formTitle": "Newsletter",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Brand Name",
              "requiredField": true
            },
            {
              "fieldLabel": "Brand Website",
              "requiredField": true
            },
            {
              "fieldLabel": "Query",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "0b7d6405-36ab-4971-b526-66d339255cbe",
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        -176
      ],
      "parameters": {
        "url": "={{ $json['Brand Website'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "9ae3a4e0-08aa-41b1-b0f4-bc4e761cd03f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        960,
        -176
      ],
      "parameters": {
        "text": "={{ $json.data }}",
        "options": {
          "systemMessage": "analyze the website html data and then provide me the colour code this website is following like the theme of this website and output the result providing\nprimary_color \u2013 brand\u2019s accent or highlight color\n\nsecondary_color \u2013 neutral contrast or typography color\n\naccent_color \u2013 supporting tone for buttons or links\n\nbackground_color \u2013 overall email background tone"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "07c1ee47-78ec-4a7e-8b89-49eac3725bab",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2176,
        128
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "afdb8cd7-5265-4f00-8393-272e98f67005",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2400,
        144
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "7635573f-fd5b-4f26-96d7-6be8edab0021",
      "name": "Structured Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1104,
        16
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"primary_color\": \"\",\n\t\"secondary_color\": \"\",\n    \"accent_color\": \"\",\n    \"background_color\":\"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "0f7b7368-6586-4ed8-ab52-b23b3ad15d58",
      "name": "OpenAI Chat Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        960,
        32
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "132a6753-6b89-4e5a-8611-59b8124e4eb0",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2832,
        144
      ],
      "parameters": {
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 3
    },
    {
      "id": "c407e362-47dd-4006-9d84-a81d03ba4a4d",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2608,
        144
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 358131854,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA/edit#gid=358131854",
          "cachedResultName": "Subscribers List"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1hvB5Zif52eCLv_X7E_OifQv9OI5usn-CQ50-TsZTMQA/edit?usp=drivesdk",
          "cachedResultName": "Newsletter Emails"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "4bd28f3b-afe8-42a6-9a89-aeef8eab5d92",
      "name": "Information Extractor1",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        976,
        -352
      ],
      "parameters": {
        "text": "={{ $json.data }}",
        "options": {},
        "attributes": {
          "attributes": [
            {
              "name": "Logo",
              "description": "Logo Image Link"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "99f732c1-03be-4f2d-9c2e-d00456a8b7e8",
      "name": "HTTP Request6",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        -352
      ],
      "parameters": {
        "url": "={{ $json['Brand Website'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "b245b36b-115e-445c-bb8d-d8b29a39f781",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -16
      ],
      "parameters": {
        "color": 6,
        "width": 294,
        "height": 384,
        "content": "## Workflow Input (Form Trigger)\nThis section collects the required inputs from the user through a form submission."
      },
      "typeVersion": 1
    },
    {
      "id": "d3aa0e66-2d2f-4830-8050-e0ac26520e3b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -512
      ],
      "parameters": {
        "color": 6,
        "width": 1542,
        "height": 704,
        "content": "## Extract Brand Style & Colors\nThis block analyzes the provided brand website to determine the brand\u2019s visual identity."
      },
      "typeVersion": 1
    },
    {
      "id": "40e8a406-eb62-462f-8e20-fcb816672260",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        208
      ],
      "parameters": {
        "color": 6,
        "width": 1526,
        "height": 544,
        "content": "## Fetch News About Query\nThis section retrieves news about the query"
      },
      "typeVersion": 1
    },
    {
      "id": "66720341-53b9-4de6-8eae-6603439e2877",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        -128
      ],
      "parameters": {
        "color": 6,
        "width": 1526,
        "height": 704,
        "content": "## AI Processing, HTML Generation & Email Delivery\nThis section handles the core content generation and delivery of the newsletter."
      },
      "typeVersion": 1
    },
    {
      "id": "73674565-21c5-40bc-a16d-ee310a3b9909",
      "name": "Tavily",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1440,
        320
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "={{ $json['output.topics'] }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <API Token>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b964c2bc-d45d-4a61-b553-29090576de0f",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily": {
      "main": [
        [
          {
            "node": "Generate Newsletter Content (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Generate Draft Topics (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Topics": {
      "main": [
        [
          {
            "node": "Tavily",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request6": {
      "main": [
        [
          {
            "node": "Information Extractor1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Convert Newsletter to HTML (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Draft Topics (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP Request6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Newsletter Content (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Convert Newsletter to HTML (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model4": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor1",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Content Pieces": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Information Extractor1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Draft Topics (AI)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Convert Newsletter to HTML (AI)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Draft Topics (AI)": {
      "main": [
        [
          {
            "node": "Split Topics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Newsletter to HTML (AI)": {
      "main": [
        [
          {
            "node": "Save Newsletter Draft in Google Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Sending Emails to all the Subscribers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Newsletter Content (AI)": {
      "main": [
        [
          {
            "node": "Merge Content Pieces",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sending Emails to all the Subscribers": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates the complete process of generating and sending AI-powered newsletters. It starts with a form submission where the user provides a brand name, website, and topic query. The system then fetches relevant news, analyzes the brand’s visual identity (colors &…

Source: https://n8n.io/workflows/14412/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.

OpenAI, HTTP Request, Form Trigger +7
AI & RAG

🧠 Automate end-to-end SEO blog creation and WordPress publishing using a GPT-5 multi-agent workflow with real-time research, metadata generation, and optional featured images.

Output Parser Structured, HTTP Request, OpenAI +10
AI & RAG

This is an automated blog post generation system that: Researches topics using AI agents and web search tools Writes complete blog posts with proper SEO structure Generates custom images for each post

Output Parser Structured, Google Gemini Chat, HTTP Request Tool +11
AI & RAG

This workflow automates end-to-end contract and invoice management using AI intelligence. It processes proposals through intelligent contract generation, approval workflows, and automated invoicing. O

Form Trigger, Data Table, Agent +4
AI & RAG

This n8n workflow template automates your lead generation and follow-up process using AI. It captures leads through a form, enriches them with company data, classifies them into different categories,

Gmail, Output Parser Structured, Form Trigger +5