LOW / CODEBlueprints
marketingai

AI Email Subject Line A/B Generator

Feed your email campaign context to Claude AI and get 10 subject line variations with predicted open rate scores and reasoning for each. Results land in Google Sheets for team review, with top picks sent to Slack and Gmail.

Beginner~10 minn8nMake.com 617 downloads 1409 views

Setup Instructions

1. Get your Claude API key from console.anthropic.com and store it as a credential. 2. Create a Google Sheet with columns: Campaign Name, Subject Line, Predicted Open Rate, Reasoning, Rank, and Generated Date. 3. Set up a webhook trigger that receives campaign context (campaign name, audience, product, key offer, tone preference). 4. Add an HTTP Request node to call the Claude API (POST https://api.anthropic.com/v1/messages) with model "claude-sonnet-4-20250514". Prompt Claude to generate exactly 10 email subject lines, each with a predicted open rate percentage and one-sentence reasoning. Instruct it to return valid JSON as an array of objects. 5. Parse the Claude response and use a loop/split node to create individual rows for each subject line. 6. Add a Google Sheets node to append all 10 subject lines with their scores and reasoning. 7. Add a Slack node to post the top 3 subject lines (highest predicted open rates) to your marketing channel for quick team review. 8. Add a Gmail node to send the full report of all 10 variations to the campaign owner or marketing lead.
Troubleshooting
**Claude returns inconsistent JSON format:** Be explicit in your prompt — include an example of the exact JSON structure you expect. Use a system message like "Always respond with valid JSON. No markdown, no code fences, just the JSON array." **Predicted open rates seem unrealistic:** Claude's predictions are directional estimates, not guarantees. Add context to your prompt about your industry and typical open rates (e.g., "Our average open rate is 22% for B2B SaaS"). This helps Claude calibrate its predictions. **Slack message is too long:** Only send the top 3 subject lines to Slack, not all 10. Use the Gmail node for the complete report. Format Slack messages with bullet points for readability. **Google Sheets rate limit on batch insert:** If inserting all 10 rows at once fails, add a small delay between writes or use the batch append operation instead of individual row inserts.

Need a custom version?

We can build a tailored automation workflow for your specific needs.

New blueprints weekly

Get notified when we publish new automation workflows.