📱 Automate research-based newsletters with Perplexity, GPT-4, and image generation

898 views · 📱 Social Media & Email Marketing

Description

This n8n workflow automates the process of creating and sending high-quality newsletters with images generated by a GPT image generator. It is triggered on a schedule.

What is included?

Who is this for?

This template is ideal for:

What problem is this workflow solving?

Manually creating and sending newsletters can be time-consuming, especially when including relevant and engaging content and imagery. This workflow automates the content generation (using AI and web search), image creation, and sending process, freeing up time and ensuring consistent communication with clients.

What this workflow does:

This workflow automates the following steps:

Scheduled Trigger: The workflow is triggered automatically on a predefined schedule.

Get Newsletter Topic: Retrieves the first unpublished newsletter topic from a Google Sheet titled “Newsletter Topics”. It then updates the status of this topic and records the publication date to avoid duplication in future runs.

AI Newsletter & Image Generator: This is the core content creation step. It uses an AI agent (configured with OpenAI and Perplexity APIs) to generate an engaging newsletter and a detailed, ultra-realistic image prompt based on the selected topic and real-time web research.

GPT Image Generation: Uses the OpenAI API to generate an image based on the detailed image prompt created in the previous step.

Get Client List: Retrieves client names and email addresses from a Google Sheet titled “Clients”.

Send Newsletter: Sends the personalized newsletter via Gmail to each client on the list, including the AI-generated title, content, and the uploaded image. The email body HTML is customizable.

Setup:

  1. Configure the workflow’s run frequency within the “Schedule Trigger” node.

  2. Create a Google Sheet named “Newsletter Topics” and “Clients” in your Google Drive.

  3. Enter your OpenAI and Perplexity API key in the ‘Input’ node.

  4. Connect your Gmail account to the “SendNewsletter” node.

How to customize this workflow:

Adjust the prompt for your newsletter style in the “AI Agent” node.

Adjust the Email Body HTML for your newsletter style in the “SendNewsletter” node.

Optionally, enable the “Tavily WebSearch” node and configure it if you prefer to use Tavily instead of Perplexity for web search.

Category:

Marketing, Content Creation, Automation

🔗 Nodes Used

Google Sheets, HTTP Request, Gmail, Google Cloud Storage, Schedule Trigger, AI Agent

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup