LLM Driven Newsletters with Subscription Management and Image Generation

This workflow automates AI-generated newsletters with subscription management using Airtable and Gmail. Key nodes include Form Trigger for subscriptions, Schedule Trigger for daily sends, Airtable for subscriber management, AI Agent for content creation, Gmail for email delivery, and Set nodes for response formatting. It supports daily, weekly, or surprise newsletters with tailored content and images. To set up, install n8n by downloading from n8n.io for self-hosting or sign up at cloud.n8n.io for cloud use. Obtain Airtable credentials (Personal Access Token) from airtable.com/account. Add Airtable credentials in n8n under Credentials > Add Credential > Airtable, entering your token and base ID (e.g., appL3dptT6ZTSzY9v). For Gmail, add OAuth2 credentials via Credentials > Add Credential > Gmail, following Google’s OAuth setup at console.cloud.google.com. For the AI Agent, add Groq API credentials at Credentials > Add Credential > Groq API, using a key from console.grok.ai. For image generation, add OpenAI credentials via Credentials > Add Credential > OpenAI API, using a key from platform.openai.com. Import the workflow JSON via Workflows > Import. Configure Form Trigger webhooks for subscription (/newsletter-subscribe) and unsubscribe (/newsletter-unsubscribe) paths, using ngrok for local testing. Test by submitting a subscription form with an email, topic (e.g., technology), and frequency (e.g., daily). Verify that Airtable logs the subscriber, and Gmail sends a welcome email. Test the Schedule Trigger by manually running it to generate and send a newsletter. Check Condition nodes for errors like invalid emails or topics (>500 characters), triggering error handlers with messages like “Provide a valid email and topic.” Deploy by saving and enabling the workflow, ensuring webhooks and scheduler are active. Validate outputs in the Email Sender node for styled HTML emails with images and in Airtable for updated subscriber records. For errors, check Airtable/Gmail credentials for connection issues or API key validity in n8n’s Credentials section.

$6.99

Workflow steps: 32

Integrated apps: formTrigger, scheduleTrigger, switch

LLM Driven Newsletters with Subscription Management and Image Generation preview