Sitemap

Jak zbudowałem agenta newslettera AI z n8n (który oszczędza mi godziny co tydzień)

Od świeżych badań po wersje Gmaila — oto jak pozwolić AI wykonać ciężką pracę, jednocześnie zachowując ludzki kontakt.

20 min czytania23 sierpnia 2025

Jeśli kiedykolwiek próbowałeś pisać newsletter, wiesz, jak to jest trudne. Godziny marną na poszukiwaniu najnowszych wiadomości, burzy mózgów, pisaniu sekcji i formatowaniu wszystkiego, by nie wyglądało to jak niechlujny wpis na blogu w skrzynce odbiorczej subskrybentów. Gdy klikasz "Wyślij", już obawiasz się kolejnej edycji.

Naciśnij enter lub kliknij, aby zobaczyć obraz w pełnym rozmiarze
"Przyjazny asystent AI w pracy — automatyzujący tworzenie newsletterów od badań po szkic Gmaila."
Obraz wygenerowany przez autora

Teraz pomyśl, czy większość tego ciężkiego dźwigania mogłaby odbywać się automatycznie. Badania przysłysły do ciebie, wygenerowane tematy, napisane sekcje, a ostateczna wersja trafiła do twojego Gmaila — już w HTML i czekająca na twoją akceptację. To nie jest futurystyczne marzenie. Dzięki automatyzacji opartej na AI i przepływom pracy n8n jest to dziś możliwe.

W tym przewodniku przedstawimy prosty, ale potężny system, który automatyzuje tworzenie newsletterów od początku do końca. Oto ogólny obraz:

  • Raz w tygodniu uruchamia się wyzwalacz pracy.
  • Agent AI znajduje aktualne tematy i pisze sekcje.
  • Agent redaktor formatuje wszystko schludnie w HTML.
  • Ostateczny szkic pojawia się w Twoim Gmailu, gotowy do wysłania.

A najlepsze w tym? Cała konfiguracja działa na stosie lean tech:

Oto stos technologii, którego użyjemy:

  • N8N — Workflow Builder.
  • Tavily — API badawcze.
  • OpenRouter — modele AI (GPT-5, Claude, GPT-4o-mini).
  • Gmail — do wysłania szkicu.

Pod koniec tego artykułu dokładnie zobaczysz, jak workflow się układa — i jak możesz zaoszczędzić godziny tygodniowo, jednocześnie dostarczając profesjonalne, angażujące newslettery.

Dlaczego automatyzować tworzenie newsletterów?

Naciśnij enter lub kliknij, aby zobaczyć obraz w pełnym rozmiarze

Pisanie newslettera wydaje się proste, dopóki nie usiądziesz do tego w praktyce. Nagle żonglujesz tym:

  • Badania: przeszukiwanie artykułów, wpisów na blogach i raportów.
  • Brainstorming: finding a unique angle or topic your readers will care about.
  • Drafting: turning notes into polished sections.
  • Formatting: making sure it looks professional in someone’s inbox.

By the time you’re done, hours are gone. And if you’re running a business or side project, that’s time you don’t always have. Worse, the process is inconsistent — some weeks you may have plenty of energy, other weeks you might skip sending altogether. Consistency is what keeps readers engaged, and manual workflows often break that rhythm.

This is where automation changes the game. With the right system in place:

  • Research happens in the background, pulling in only fresh and relevant content.
  • AI agents generate titles, topics, and sections, so you never start from a blank page.
  • An editor AI formats everything into a clean, professional HTML newsletter.
  • The final draft shows up in your Gmail, ready for your finishing touches.

Instead of hours, you’re looking at minutes — just reviewing, tweaking, and hitting send. The result is faster research, consistent publishing, and a professional newsletter that feels effortless.

Workflow Overview (Step by Step)

Press enter or click to view image in full size
The 10-step workflow that transforms research into a polished Gmail draft.

So how does an AI-powered newsletter actually come together? Let’s break down the workflow into clear steps.

  1. Trigger — Schedule workflow (weekly)
    Everything starts with a simple trigger. You set your workflow to run once a week (for example, every Sunday at midnight). This ensures your newsletter process is consistent without you needing to remember or manually start it.
  2. Research Past Week — Tavily fetches the latest news
    The system uses Tavily, a research tool, to scan recent news and articles from the past week. Instead of spending hours Googling, you instantly get a curated set of sources to work with.
  3. Create Title & Topics — AI planning agent
    Next, an AI “planner” agent reviews the research and generates:

A creative, engaging title for the newsletter.

Three focused topics that will become the main sections.

This step eliminates the dreaded blank-page problem.

4. Research 3 Topics — Deeper insights
The workflow then goes deeper. For each of the three topics, Tavily pulls more detailed content and raw articles. This ensures your newsletter has depth, not just headlines.

5. Write Newsletter Sections — AI writer agent
Each topic gets passed to a dedicated AI writer agent, which creates a standalone section for the newsletter. These sections are:

  • Informative
  • Professionally written
  • Cited with real sources

6. Combine Sections (3 → 1) — Aggregation
The three separate sections are merged into a single draft. Now you have a structured newsletter with multiple segments, ready for polishing.

  1. Stylize & Edit — Editor AI
    This is where the magic happens. An “editor” AI agent takes the combined draft and:
  • Adds an introduction and conclusion.
  • Formats everything in clean HTML (headings, bold text, clickable links).
  • Adds a sources section at the bottom.

The result is a professional, visually appealing newsletter draft.

8. Send Draft — Gmail integration
Finally, the draft is pushed into Gmail as a ready-to-send email. The subject line is already set (from the AI planner’s title), and the body is formatted in HTML. All you need to do is review, tweak, and hit “Send.”

9. End of Process — Human in the loop
The system doesn’t remove your voice — it just takes away the repetitive work. You still review the final draft, adjust the tone if needed, and approve before sending.

Tech Stack You’ll Need

The beauty of this system is that it doesn’t require a massive, complicated setup. The tech stack is lean, reliable, and beginner-friendly. Here’s what you’ll need:

Press enter or click to view image in full size
Image By Author
  1. n8n — The Workflow Builder
    n8n is the backbone of the automation. It’s a no-code/low-code platform where you connect all the pieces together — research, AI agents, formatting, and email delivery. Think of it as the control center where every step of the workflow lives.
  2. Tavily — Research Engine
    Tavily powers the research steps. It pulls in recent articles, news, and web content that the AI agents use to generate ideas and write sections. Instead of manual Googling, Tavily feeds your system with fresh, relevant data each week.
  3. OpenRouter — AI Models
    OpenRouter gives you access to a variety of AI models (GPT-5, Claude, DeepSeek, and more). In this workflow, different AI agents handle specialized tasks:
  • Planner AI: creates newsletter titles and topics.
  • Writer AI: drafts the sections.
  • Editor AI: polishes and formats everything into HTML.

The flexibility here means you can experiment with different models until you find the writing style that best fits your brand.

4. mail — Delivery
Once the newsletter is ready, Gmail is used to create a draft email with the subject line and formatted HTML body. You can send it to your team for review or directly to your subscribers after a quick check.

  • Hosting (Optional, but Recommended)
    If you want this system to run automatically every week (say, Sunday midnight), your n8n instance needs to stay online 24/7. That’s where hosting comes in.

You can:

Run it on your own server, or

Use a hosting provider like Hostinger, which offers one-click n8n setup, daily backups, and unlimited workflow runs.

If you’re just experimenting, you can run n8n locally on your computer. But for consistent, hands-off automation, hosting is highly recommended.

How It All Comes Together

Now that you know the steps and the tools, let’s connect the dots.

Here’s the big picture:

  1. A weekly trigger kicks things off automatically.
  2. Tavily pulls in the freshest articles and insights from the past week.
  3. A planning AI agent reads that research and creates a title plus three key topics.
  4. Tavily dives deeper into each topic, providing detailed content for context.
  5. A writer AI agent turns that content into three standalone newsletter sections.
  6. An aggregate node merges those sections into a single draft.
  7. An editor AI agent adds the polish: intro, conclusion, HTML formatting, and source links.
  8. Finally, the draft lands in your Gmail account, complete with subject line and formatted body.

What you end up with is a ready-to-send newsletter draft — researched, written, and styled — delivered straight to your inbox.

The best part? Your role shifts from being the creator of everything to the editor-in-chief. You spend minutes reviewing and tweaking instead of hours slogging through research and formatting.

In other words, the workflow doesn’t replace you — it amplifies you. You still set the direction, ensure the tone matches your brand, and decide when it’s ready to hit send. The system just handles the repetitive heavy lifting.

This combination of automation and human touch is what makes the process sustainable. You get the consistency of automation with the creativity and personality of your own voice.

Step-by-Step Build Guide

Press enter or click to view image in full size
screenshot by Author

Step 1: Set Up Your Workflow Skeleton

Before we start adding fancy AI agents, we need the backbone of the automation — the workflow skeleton. This is where everything else will plug in.

1. Create a new workflow in n8n

  • Open your n8n dashboard.
  • Click “New Workflow.”
  • Give it a clear name like “AI Newsletter Automation.”

Think of this as your digital whiteboard where all the pieces will connect.

2. Add a Schedule Trigger

This is what ensures your newsletter runs on autopilot, week after week.

  • Click the “+” button to add a node.
  • Search for “Schedule Trigger.”
  • In the settings:
  • Choose Repeat Every → Week.
  • Pick the day and time you want the workflow to run (e.g., Sunday at midnight).

💡 Pro tip: If you’re just testing things, you can temporarily set it to “Every 5 minutes” so you don’t have to wait a whole week to see results. Later, switch it back to weekly.

3. Save and (eventually) Activate

At this stage, your workflow is just a skeleton:

  • One trigger node.
  • Nothing else connected yet.

Once you finish building the entire automation, you’ll activate it so it runs on schedule. But for now, keep it in draft mode while we add the rest of the steps.

👉 That’s it — your foundation is ready.

Step 2: Pull Initial Research with Tavily

Now that your workflow skeleton is ready, it’s time to give it something useful to work with — fresh content. Instead of spending hours Googling the latest news, we’ll let Tavily handle the research for us.

Tavily is a research API that pulls in relevant articles, summaries, and metadata from the web. We’ll use it to scan the past week’s news in your chosen niche, so the newsletter always feels current.

1. Add a Tavily Node

  • In your workflow, click the “+” button.
  • Search for Tavily (if you installed it as a community node).
  • If you don’t see it, use an HTTP Request node instead — Tavily works perfectly through API calls.

2. Configure the Search

In the node settings:

  • Query: enter your newsletter’s broad theme. Example:
AI adoption for small businesses
  • opic/Mode: choose so it prioritizes recent updates.news
  • Time Range: set this to to only fetch fresh content.past_week
  • Max Results: start with 3 (enough to plan topics without overwhelming the AI).
  • Include Raw Content: keep this off for now — summaries are enough for planning. We’ll pull full text later in Step 5.

3. Authenticate with Tavily

If this is your first time:

  • Go to tavily.com and create a free account.
  • Generate an API key.
  • Paste it into n8n when prompted.

Test the Node

Click Execute Node and wait for the results. You should see:

  • Article titles
  • Short summaries
  • URLs
  • Published dates

It should look something like this (simplified example):

[
{
"title": "Small Businesses Bridge the AI Gap",
"summary": "SMBs are exploring automation but remain cautious about AI...",
"url": "https://example.com/article1",
"published_date": "2025-08-15"
},
...
]

5. Pin the Data

Here’s a small but powerful tip:

  • In n8n, click on the node and hit “Pin Data.”
  • This saves the research results locally, so you don’t waste API calls every time you tweak later steps.

✅ At this point, your workflow can already pull in fresh weekly research. That’s your raw fuel for the newsletter. Next, we’ll use AI to turn this research into a catchy title and three focused topics.

Step 3: Generate Newsletter Title & Topics with AI

At this stage, we’ve got raw research from Tavily — but raw data isn’t a newsletter. What we need now is a clear theme, a catchy title, and three focused topics to structure the issue around. That’s where AI comes in.

We’ll use OpenRouter (an API gateway for multiple AI models) to run a “planning agent.” Think of it like your newsletter’s editorial assistant: it reads the research, then tells you what this week’s issue should be about.

1. Add an OpenRouter Node

  • Click “+” → OpenRouter (Chat Model)” in your workflow.
  • If you don’t have the node, use HTTP Request and call the OpenRouter API directly.

2. Configure the AI Model

  • Model: Choose something strong at summarizing and structuring info, like , gpt-4o-mini, claude-3.5-sonnet or gpt-5 if available.
  • Temperature: Set to 0.7 (balanced creativity).

3. Craft the Prompt

Here’s a simple but effective system prompt you can paste into n8n:

You are a newsletter planning assistant.  
You will be given research results (article titles, summaries, and URLs).
From this, create:
1. A single engaging newsletter title.
2. Exactly 3 topics that could become newsletter sections.

Return the output in **valid JSON** with this structure:


{
"title": "string",
"topics": [
{"topic": "string"},
{"topic": "string"},
{"topic": "string"}
]
}

4. Map the Input

  • In Input, pass the Tavily results from Step 2 into the AI node.
  • Make sure you’re feeding it summaries + titles (not full raw content yet — that comes later).

5. Test the Node

Click Execute Node. If all goes well, you should get clean JSON like this:

{
"title": "How AI is Powering the Next Wave of Small Business Tools",
"topics": [
{"topic": "Affordable AI platforms for startups"},
{"topic": "Case studies: SMBs adopting automation"},
{"topic": "Challenges small businesses face with AI adoption"}
]
}

6. Pin & Validate

  • Pin the output (so you don’t rerun Tavily each time).
  • Validate the JSON (n8n will sometimes need you to run a “Set” node to parse it cleanly).

✅ Congratulations — you now have the editorial blueprint of your newsletter:

  • A ready-to-use subject line.
  • Three focused topics that your next steps will dive deeper into.

Next, we’ll split those topics apart so each one can go through its own mini research + writing pipeline.

Step 4: Split the Topics into Separate Items

Right now, your AI planner has given you 3 topics in a single JSON object. That’s useful, but here’s the catch:
The next steps (deep research + writing) need to process each topic individually.

This means we have to “fan out” the topics so that each one runs through its own mini-pipeline. In n8n, this is exactly what the SplitInBatches (or Split Out Items) node is for.

1. Add a SplitInBatches Node

  • After your OpenRouter AI (planning agent) node, click “+” and add SplitInBatches.
  • Connect the output of the AI node into it.

2. Configure the Split Settings

  • Batch Size: set this to .1
  • This ensures each topic goes through the workflow one at a time.
  • Items Input: point it to from the JSON output of your planner AI.topics

💡 Example input from Step 3 looked like this:

{
"title": "How AI is Powering the Next Wave of Small Business Tools",
"topics": [
{"topic": "Affordable AI platforms for startups"},
{"topic": "Case studies: SMBs adopting automation"},
{"topic": "Challenges small businesses face with AI adoption"}
]
}

After splitting, the workflow will treat each {“topic”: “…”} as a separate item.

3. Test the Node

  • Run the workflow up to this step.
  • You should see the first topic only pass through.
  • Click “Next Batch” to cycle through the other two topics.

This is how n8n ensures each topic will independently go through the deep research and section writing stages coming up.

4. Keep the Title Safe

Here’s a subtle but important detail:

  • The title is not included in the split.
  • To use it later (for the subject line), either:
  • Store it in a Set node before splitting, or
  • Use n8n’s “Keep Only Set” feature to carry it along in metadata.

This way, you don’t “lose” your newsletter title when everything fans out.

✅ With this step, your workflow now treats each topic like a mini-project of its own. Next, we’ll feed each of these topics back into Tavily for deeper, focused research.

Step 5: Do Deep Research for Each Topic

So far, you’ve got three promising topics — but they’re just headlines. To actually write meaningful newsletter sections, we need detailed supporting content. This is where Tavily steps back in, but this time we’ll tell it: “Don’t just give me summaries — give me the raw material.”

1. Add Another Tavily Node

  • After your SplitInBatches node, click “+” and add a Tavily Search (or HTTP Request with Tavily API).
  • Connect it so each split topic flows into this research node.

2. Configure the Search

This time we’ll dig deeper. In the settings:

  • Query: map the topic text from the Split node. Example:
{{$json["topic"]}}
  • Time Range: set to or (depending on how broad you want the research).past_weekpast_month
  • Max Results: 5–7 articles is a good balance.

Include Raw Content:set this to true.

  • This ensures you get not only titles and summaries, but also snippets of the article body.
  • These snippets are what your writer AI will use to craft full sections.

3. Example Output

After execution, you’ll see results like this (simplified):

[
{
"title": "AI Platforms Lower Costs for Small Startups",
"url": "https://example.com/article1",
"content": "Startups are finding affordable AI solutions for customer support, marketing, and workflow automation..."
},
{
"title": "The Rise of DIY AI Tools",
"url": "https://example.com/article2",
"content": "Low-cost AI apps are enabling small teams to automate tasks without hiring full-time developers..."
}
]

Now instead of shallow blurbs, you’ve got detailed research — the raw clay the AI writer will shape into your newsletter section.

4. Pin and Test

  • As always, pin this data in n8n so you don’t burn through API calls while debugging later steps.
  • Double-check that your results contain fields — that’s what we’ll feed into the writer AI.content

✅ At this stage, your workflow is powerful: each topic now comes bundled with detailed research snippets. Next, we’ll pass that to an AI “writer agent” that transforms research into a polished newsletter section.

Step 6: Write Newsletter Sections with AI

Now that you’ve got raw content for each topic, it’s time to let an AI do the heavy lifting. This is where the Section Writer Agent comes in. Its job: turn research snippets into a polished newsletter section with a heading, body, and list of sources.

1. Add an OpenRouter Node

  • After the Tavily (deep research) node, click “+”OpenRouter Chat Model (or HTTP Request → OpenRouter API).
  • Connect it directly to the Tavily node.

2. Configure the AI Model

  • Model: Choose a writing-focused one like , , or if available.gpt-4o-miniclaude-3.5-sonnetgpt-5
  • Temperature: → keeps writing professional but slightly engaging.0.6

Craft the Prompt

Paste something like this into your system prompt:

You are a newsletter section writer.  
You will be given a topic and research content.

Write a section in plain, professional language with these rules:
- Start with a short, catchy heading (1 line).
- Write a clear, engaging body (150200 words).
- Include bullet points if useful.
- End with 23 source URLs in a "Sources" list.

Return ONLY valid JSON in this structure:

{
"heading": "string",
"body": "string",
"sources": ["url1", "url2", "url3"]
}

4. Map the Inputs

  • Topic: {{$json["topic"]}}
  • Research content: (from Tavily).{{$json["content"]}}

5. Test the Node

The output should look like this:

{
"heading": "Affordable AI Platforms Reshape Startups",
"body": "Small businesses are increasingly adopting low-cost AI tools to handle customer service, marketing, and internal workflows. These platforms, often costing less than traditional enterprise software, allow startups to scale without major hiring costs...",
"sources": [
"https://example.com/article1",
"https://example.com/article2"
]
}

✅ Repeat this process for each topic — the SplitInBatches ensures each one goes through separately. By the end, you’ll have 3 polished sections in JSON format.

Step 7: Combine All Sections into One Draft

Right now, your workflow has three separate sections floating around. Before we send them to the Editor AI, we need to merge them into a single payload.

1. Add an Aggregate / Merge Node

  • After the Section Writer AI node, drop in an Aggregate node.
  • Configure it to combine all items into one array.

2. Configure the Fields

Make sure the merged object looks like this:

{
"sections": [
{
"heading": "...",
"body": "...",
"sources": ["..."]
},
{
"heading": "...",
"body": "...",
"sources": ["..."]
},
{
"heading": "...",
"body": "...",
"sources": ["..."]
}
]
}

This way, the editor AI (coming in Step 8) receives the full newsletter draft at once.

3. Keep Metadata Safe

Remember that newsletter title from Step 3?

  • Use a Merge node to bring the saved title back in here.
  • Final payload should include both and .titlesections

Example final output:

{
"title": "How AI is Powering the Next Wave of Small Business Tools",
"sections": [
{ "heading": "...", "body": "...", "sources": [...] },
{ "heading": "...", "body": "...", "sources": [...] },
{ "heading": "...", "body": "...", "sources": [...] }
]
}

✅ Now you’ve got a complete draft: three sections plus a newsletter title, all bundled neatly into one JSON object. Next, we’ll pass this to an Editor AI agent to polish, stylize, and format it into a proper HTML email.

Step 8: Polish & Format with the Editor Agent

Right now, you’ve got structured JSON: a title and three sections. It’s good, but it still looks like raw data. What we need now is a polished, professional HTML email.

This is where the Editor AI Agent comes in. Think of it as your in-house copy editor — it adds the finishing touches and turns your content into something subscribers will actually enjoy reading.

1. Add an OpenRouter Node

  • After the Aggregate node (Step 7), insert a new OpenRouter (Chat Model) node.
  • Connect it directly to your merged draft.

2. Configure the Model

  • Model: Pick one strong at formatting and long-text structuring: , , or .gpt-4o-miniclaude-3.5-sonnetgpt-5
  • Temperature: (keeps it consistent, less “creative wandering”).0.5

3. Craft the Prompt

Here’s a reliable prompt template:

You are a newsletter editor.  
You will receive a newsletter title and three sections.

Your job is to:
- Create a final newsletter draft with:
1. Subject line (based on the title).
2. HTML email body with intro, section formatting, and conclusion.
3. Sources list at the end with clickable links.

Return ONLY valid JSON in this structure:


{
"subject": "string",
"html_content": "string",
"sources": ["url1", "url2", "url3"]
}

4. Map the Inputs

  • Title: from Step 3 (newsletter planner).
  • Sections: from Step 7 (aggregated JSON).

5. Example Output

Here’s what you should see:

{
"subject": "How AI is Reshaping Small Business",
"html_content": "<h1>How AI is Reshaping Small Business</h1><p>Welcome to this week’s edition...</p><h2>Affordable AI Platforms Reshape Startups</h2><p>Small businesses are adopting...</p><h2>Case Studies: SMBs Adopting Automation</h2><p>Examples show how...</p><h2>Challenges of AI Adoption</h2><p>Despite progress...</p><p><strong>Sources:</strong><br><a href='https://example.com/article1'>Source 1</a><br><a href='https://example.com/article2'>Source 2</a></p>",
"sources": [
"https://example.com/article1",
"https://example.com/article2"
]
}

Step 9: Send the Draft to Gmail

With your final HTML draft in hand, the last step is delivery. We’ll send everything to Gmail as a draft email so you can quickly review before hitting “Send.”

1. Add a Gmail Node

  • Click “+” → Gmail → Create Draft.
  • Connect it after the Editor AI node.

2. Configure the Draft

  • Subject: map from the AI output → {{$json["subject"]}}
  • Content: map from AI output → {{$json["html_content"]}}
  • Content Type: set to HTML

3. Authenticate Gmail

  • If this is your first time using Gmail in n8n, set up OAuth2.
  • Once connected, you’ll see your Google account in the node.

4. Test the Node

Run the workflow, then check Gmail. You should see a draft sitting there with:

  • Your AI-generated subject line
  • Full HTML newsletter body
  • Sources section neatly formatted

✅ And that’s it! You’ve built a complete newsletter automation pipeline:

  • From raw research → topics → sections → polished HTML → Gmail draft.
  • All you need to do now is tweak and hit “Send.”

Step 10: Test, Debug, and Pin Data

Building complex workflows in n8n is exciting… until something breaks. And trust me, something will break the first few times you run this. Maybe an API response looks different, maybe JSON formatting is off, maybe Gmail yells about permissions.

That’s why Step 10 is all about debugging smartly so you don’t waste time (or tokens).

1. Test Nodes Individually

  • In n8n, you don’t have to run the whole workflow every time.
  • Click “Execute Node” on any single node to test just that piece.
  • Example: if Tavily is failing, test only the Tavily node instead of running the full 10-step chain.

This saves huge amounts of time when troubleshooting.

2. Pin Data to Save Tokens

Every AI + research API call costs money. If you’re testing formatting or downstream nodes, you don’t want to keep hitting Tavily or OpenRouter.

  • After you run a node successfully once, click “Pin Data.”
  • This locks the output so downstream nodes can keep using the same results.
  • Example: Pin your Tavily research so you can test the Writer AI repeatedly without re-fetching web data.

💡 Pro tip: Unpin when you’re ready for the “real run.”

3. Common Debugging Tips

Here are some pitfalls you’ll probably hit — and how to solve them:

  • JSON Parsing Errors:
    If the AI output breaks JSON format (extra commas, missing brackets), add a Code node or JSON Parse node to validate and clean it.
    Prompting the AI with “Return only valid JSON” also reduces errors.
  • Scheduling Issues:
    If your schedule trigger doesn’t fire, check if your n8n instance is active and hosted properly. Remember, local n8n stops when your computer does. Consider using Hostinger, Railway, or n8n.cloud for 24/7 uptime.
  • Gmail Errors:
    Common ones include missing OAuth tokens or HTML content not rendering.
  • Double-check Gmail is connected via OAuth2.
  • Always set Content Type = HTML in the Gmail node.

✅ Once you’ve tested each piece, pinned the data, and fixed small bugs, you’ll have a rock-solid workflow that runs on autopilot every week.

🎉 Congratulations — you’ve just built an AI-powered Newsletter Agent!
What used to take hours of Googling, drafting, and formatting is now a single automation: research → topics → writing → editing → Gmail draft.

You can stop here, or extend it further:

  • Auto-send instead of draft.
  • Add analytics tracking links.
  • Log every newsletter to Google Sheets or Notion.

Beyond the Build: Tips, Tricks, and Next Step

You’ve just walked through building a full AI-powered Newsletter Agent from scratch — from research to Gmail draft. But before we close, let’s add a few finishing touches and extra ideas to take things further.

🔹 Extra Tips

  • Prompt Tuning:
    If the AI’s writing feels too dry or too creative, tweak the prompts. For example, add “Write in a professional but conversational tone, like a business newsletter.” Small changes here = big differences in output.
  • Logging Newsletters:
    Don’t let your best content vanish. Use a Notion or Google Sheets node to log every title + section created. Over time, this becomes a searchable knowledge base of your newsletter content.
  • Error Handling:
    Add an Error Workflow in n8n that catches failed runs. You can send yourself a Slack or Gmail alert if something breaks mid-run (API limit, bad JSON, Gmail error).

Alternative Research Tools:
Tavily is great, but you can experiment with:

  • Perplexity API for conversational research.
  • SerpAPI for raw Google results.
  • NewsAPI for broader media coverage.

This makes your newsletter even more robust.

Conclusion

Manual newsletters are slow, inconsistent, and frankly exhausting. By automating with n8n + AI agents, you’ve unlocked a system that:

  • Saves hours each week.
  • Produces consistent, structured drafts.
  • Still leaves room for you as the editor to add the human touch before sending.

Instead of staring at a blank page on Sunday night, you’ll now open Gmail and find a ready-to-review draft waiting for you.

Next Steps

Now that you’ve built the foundation, you can:

  • Try different AI models (, , ) and compare results.Claude 3.5GPT-5Mistral Large
  • Experiment with styling prompts (minimalist, journalistic, or even fun newsletter tones).
  • Add personalization: fetch user data and make newsletters segmented.

The key takeaway: automation doesn’t replace your voice — it gives you more time to use it.

🎉 And with that, you’ve finished not just an article — but a working newsletter automation workflow that can run every single week.

Amit Kumar

Written by Amit Kumar

Exploring AI, automation, and no-code workflows. Author of 30 Human-Like SEO Prompts for Medium Writers. Let’s connect: www.linkedin.com/in/amit-org

No responses yet

Paweł Domański
Paweł Domański