AI powered newsletter generation

This workflow automates newsletter creation by researching topics with AI, generating engaging email copy, and creating draft broadcasts in ConvertKit—all managed through a simple Google Sheet.

Who is it for?

This template is perfect for:

  • Content Creators and Newsletter Writers
  • Marketing Teams
  • Solopreneurs managing their own newsletters
  • Agencies creating content for clients

What it does

  1. Google Sheets Trigger: Monitors a Google Sheet for rows with status "Ready to Generate".
  2. Deep Research: Uses Perplexity AI's sonar-deep-research model to gather facts, figures, statistics, and key information about the newsletter topic.
  3. Content Cleanup: Applies regex pattern to remove any thinking tags or unwanted formatting from the research output.
  4. Email Writing: Uses Claude 3.7 Sonnet to transform the research into engaging, human-sounding newsletter copy with a friendly tone, short paragraphs, and clear takeaways.
  5. HTML Cleaning: Processes the generated HTML email body to ensure proper formatting and escape sequences.
  6. Subject Line & Metadata Generation: Uses Claude again to create an attention-grabbing subject line, preview text, and internal description based on the email content.
  7. JSON Parsing: Extracts the subject, preview text, and description from Claude's response.
  8. ConvertKit Broadcast Creation: Makes an HTTP API call to ConvertKit to create a draft broadcast with all the generated content.
  9. Sheet Update: Updates the Google Sheet row with status "Newsletter Generated" and a link to the draft in ConvertKit.

How to set up

  1. Google Sheets Setup:

    • Update the Spreadsheet ID to your Google Sheet.
    • Sheet must have columns: Newsletter_number (A), Newsletter topic (B), Status (C), ConvertKit Link (D).
    • Set status to "Ready to Generate" to trigger the workflow.
  2. Perplexity AI Configuration:

  3. Add your Perplexity API key.

  4. Model is set to "sonar-deep-research" for comprehensive topic research.

  5. Customize the research prompt if needed to match your content style.

  6. Claude API Setup:

  7. Add your Anthropic API key for Claude.

  8. Two Claude modules are used: one for email writing, one for subject line generation.

  9. Both use claude sonnet 3.7 model.

  10. Customize the email writing prompt to match your brand voice and signing style.

  11. ConvertKit API Configuration:

  12. In the HTTP module "Create + Publish Kit Broadcast", add your ConvertKit API secret in the headers.

  13. Update the URL endpoint if needed (currently using broadcast endpoint).

  14. The module sends: subject, description, preview_text, and email_body as HTML.

  15. Customize Prompts:

  16. Perplexity Research Prompt: Adjust to specify what facts/data you want included.

  17. Email Writing Prompt: Modify tone, format preferences, and signature.

  18. Subject Line Prompt: Customize the style of subject lines and preview text.

  19. Run the Workflow: Set a row in your Google Sheet to "Ready to Generate" status, and the automation will research, write, and create a draft newsletter in ConvertKit!

Note: The template includes three unconnected modules at the bottom that can be used if you want to directly publish the newsletter instead of saving it as a draft. The current connected workflow saves newsletters as drafts in ConvertKit, giving you a chance to review before sending. To auto-publish, disconnect the current HTTP module and connect the unconnected modules instead.