Back to Integrations
integrationMailchimp node
integrationOpenAI node

Mailchimp and OpenAI integration

Save yourself the work of writing custom integrations for Mailchimp and OpenAI and use n8n instead. Build adaptable and scalable Marketing, Communication, AI, and Langchain workflows that work with your technology stack. All within a building experience you will love.

How to connect Mailchimp and OpenAI

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Mailchimp and OpenAI integration: Create a new workflow and add the first step

Step 2: Add and configure Mailchimp and OpenAI nodes

You can find Mailchimp and OpenAI in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Mailchimp and OpenAI nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Mailchimp and OpenAI integration: Add and configure Mailchimp and OpenAI nodes

Step 3: Connect Mailchimp and OpenAI

A connection establishes a link between Mailchimp and OpenAI (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Mailchimp and OpenAI integration: Connect Mailchimp and OpenAI

Step 4: Customize and extend your Mailchimp and OpenAI integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Mailchimp and OpenAI with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Mailchimp and OpenAI integration: Customize and extend your Mailchimp and OpenAI integration

Step 5: Test and activate your Mailchimp and OpenAI workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Mailchimp to OpenAI or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Mailchimp and OpenAI integration: Test and activate your Mailchimp and OpenAI workflow

Ai-powered restaurant newsletter creator with Mailchimp and Telegram approval

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Who is this for?
This workflow is for restaurant owners, marketing managers, and any business owner who wants to automate the creation of high-quality, research-driven email newsletters. It's designed to save hours of manual work by leveraging AI to handle content generation, from initial idea to final send.

If you want to consistently engage your customers with fresh, relevant content but lack the time for research and writing, this template is your all-in-one solution.

What does this workflow do?
This is a comprehensive, multi-agent system that automates the entire email marketing process. It begins with a simple prompt from you and ends with a polished newsletter sent to your Mailchimp subscribers.

Initiates on a Schedule: A fully customizable Cron trigger starts the process by sending you a message on Telegram.

Asks for Your Input: The Telegram bot asks you for a single topic for the upcoming newsletter (e.g., "healthy eating," "weekend specials," or "new cocktail menu").

Conducts AI-Powered Research: Once you reply, an AI agent researches your topic using Tavily, focusing on current industry trends, food culture, and customer interests to ensure your content is fresh and relevant.

Plans the Content: The AI generates a complete table of contents for the newsletter, structuring it into engaging sections.

Writes Each Section: A dedicated AI research team then writes detailed, engaging content for each section of the newsletter, weaving in your restaurant's unique brand voice.

Assembles the Final Draft: The workflow aggregates all the generated sections into a complete newsletter draft, including a compelling subject line and a full body of text.

Requests Final Approval: It sends the complete draft to you via Telegram for a final "Approved" or "Denied" confirmation. If you provide feedback, an AI editor will revise the draft.

Sends to Mailchimp: Once approved, the workflow automatically creates a new campaign in Mailchimp and sends the final, polished email to your subscriber list.

Setup
To get this workflow running, you will need to configure a few credentials and settings.

Set Up Credentials: In your n8n instance, add credentials for the following services:

Telegram

OpenAI

Tavily

Anthropic

Mailchimp (using HTTP Basic Auth with any_string as the username and your Mailchimp API key as the password).

Configure the Telegram Bot:

Create a Telegram bot using BotFather and obtain its API token.

Find your personal Chat ID by messaging a bot like @get_id_bot.

In the HITL (Human in the Loop) Telegram node, insert your Chat ID.

Configure Mailchimp:

In the Create_Campaign HTTP Request node, find the recipients section and replace the placeholder list_id with your actual Mailchimp Audience ID.

Customize the System Prompts: This is the most important step for personalization.

Go into the AI Agent and OpenAI nodes (e.g., "Restaurant Newsletter Expert," "Newsletter Section Planner," "Restaurant Content Research Team").

In the system prompts, replace all instances of (insert restaurant name), (insert cuisine type), etc., with your own business details. This is where you inject your unique brand, menu, and voice into the AI.

How to customize this workflow
This template is powerful out of the box but is also designed to be highly flexible.

Change the Schedule: Modify the Cron trigger to run at any interval you prefer (e.g., weekly, bi-weekly, or on specific days).

Adjust the AI Models: You can easily swap the OpenAI or Anthropic models used in the workflow to different ones (e.g., change from GPT-4o-mini to GPT-4 Turbo) to balance cost and performance.

Use a Different Notification Service: Replace the Telegram nodes with Slack, email, or another service for the approval process.

Integrate a Different Email Platform: Adapt the final HTTP Request nodes to work with another email marketing provider like SendGrid, ConvertKit, or Brevo by changing the API endpoints and authentication.

Refine the AI's Personality: The core of the workflow is in the system prompts. By editing the prompts in the AI nodes, you can completely change the tone, style, and output of the generated content to perfectly match your brand.

Nodes used in this workflow

Popular Mailchimp and OpenAI workflows

+5

AI-Powered Restaurant Newsletter Creator with Mailchimp and Telegram Approval

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Who is this for? This workflow is for restaurant owners, marketing managers, and any business owner who wants to automate the creation of high-quality, research-driven email newsletters. It's designed to save hours of manual work by leveraging AI to handle content generation, from initial idea to final send. If you want to consistently engage your customers with fresh, relevant content but lack the time for research and writing, this template is your all-in-one solution. What does this workflow do? This is a comprehensive, multi-agent system that automates the entire email marketing process. It begins with a simple prompt from you and ends with a polished newsletter sent to your Mailchimp subscribers. Initiates on a Schedule: A fully customizable Cron trigger starts the process by sending you a message on Telegram. Asks for Your Input: The Telegram bot asks you for a single topic for the upcoming newsletter (e.g., "healthy eating," "weekend specials," or "new cocktail menu"). Conducts AI-Powered Research: Once you reply, an AI agent researches your topic using Tavily, focusing on current industry trends, food culture, and customer interests to ensure your content is fresh and relevant. Plans the Content: The AI generates a complete table of contents for the newsletter, structuring it into engaging sections. Writes Each Section: A dedicated AI research team then writes detailed, engaging content for each section of the newsletter, weaving in your restaurant's unique brand voice. Assembles the Final Draft: The workflow aggregates all the generated sections into a complete newsletter draft, including a compelling subject line and a full body of text. Requests Final Approval: It sends the complete draft to you via Telegram for a final "Approved" or "Denied" confirmation. If you provide feedback, an AI editor will revise the draft. Sends to Mailchimp: Once approved, the workflow automatically creates a new campaign in Mailchimp and sends the final, polished email to your subscriber list. Setup To get this workflow running, you will need to configure a few credentials and settings. Set Up Credentials: In your n8n instance, add credentials for the following services: Telegram OpenAI Tavily Anthropic Mailchimp (using HTTP Basic Auth with any_string as the username and your Mailchimp API key as the password). Configure the Telegram Bot: Create a Telegram bot using BotFather and obtain its API token. Find your personal Chat ID by messaging a bot like @get_id_bot. In the HITL (Human in the Loop) Telegram node, insert your Chat ID. Configure Mailchimp: In the Create_Campaign HTTP Request node, find the recipients section and replace the placeholder list_id with your actual Mailchimp Audience ID. Customize the System Prompts: This is the most important step for personalization. Go into the AI Agent and OpenAI nodes (e.g., "Restaurant Newsletter Expert," "Newsletter Section Planner," "Restaurant Content Research Team"). In the system prompts, replace all instances of (insert restaurant name), (insert cuisine type), etc., with your own business details. This is where you inject your unique brand, menu, and voice into the AI. How to customize this workflow This template is powerful out of the box but is also designed to be highly flexible. Change the Schedule: Modify the Cron trigger to run at any interval you prefer (e.g., weekly, bi-weekly, or on specific days). Adjust the AI Models: You can easily swap the OpenAI or Anthropic models used in the workflow to different ones (e.g., change from GPT-4o-mini to GPT-4 Turbo) to balance cost and performance. Use a Different Notification Service: Replace the Telegram nodes with Slack, email, or another service for the approval process. Integrate a Different Email Platform: Adapt the final HTTP Request nodes to work with another email marketing provider like SendGrid, ConvertKit, or Brevo by changing the API endpoints and authentication. Refine the AI's Personality: The core of the workflow is in the system prompts. By editing the prompts in the AI nodes, you can completely change the tone, style, and output of the generated content to perfectly match your brand.

Build your own Mailchimp and OpenAI integration

Create custom Mailchimp and OpenAI workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Mailchimp supported actions

Delete
Delete a campaign
Get
Get a campaign
Get Many
Get many campaigns
Replicate
Replicate a campaign
Resend
Creates a Resend to Non-Openers version of this campaign
Send
Send a campaign
Get Many
Get many groups
Create
Create a new member on list
Delete
Delete a member on list
Get
Get a member on list
Get Many
Get many members on a list
Update
Update a new member on list
Create
Add tags from a list member
Delete
Remove tags from a list member

OpenAI supported actions

Message a Model
Generate a model response with GPT 3, 4, 5, etc. using Responses API
Classify Text for Violations
Check whether content complies with usage policies
Analyze Image
Take in images and answer questions about them
Generate an Image
Creates an image from a text prompt
Edit Image
Edit an image
Generate Audio
Creates audio from a text prompt
Transcribe a Recording
Transcribes audio into text
Translate a Recording
Translates audio into text in English
Delete a File
Delete a file from the server
List Files
Returns a list of files that belong to the user's organization
Upload a File
Upload a file that can be used across various endpoints
Create
Create a conversation
Get
Get a conversation
Remove
Remove a conversation
Update
Update a conversation
Generate
Creates a video from a text prompt

Mailchimp and OpenAI integration details

Use case

Automate lead management

Using too many marketing tools? n8n lets you orchestrate all your apps into one cohesive, automated workflow.

Learn more

FAQs

  • Can Mailchimp connect with OpenAI?

  • Can I use Mailchimp’s API with n8n?

  • Can I use OpenAI’s API with n8n?

  • Is n8n secure for integrating Mailchimp and OpenAI?

  • How to get started with Mailchimp and OpenAI integration in n8n.io?

Need help setting up your Mailchimp and OpenAI integration?

Discover our latest community's recommendations and join the discussions about Mailchimp and OpenAI integration.
Artem
sérgio eduardo floresta filho
Andrew adawdad
PinkFloyd
Steve Warburton

Looking to integrate Mailchimp and OpenAI in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Mailchimp with OpenAI

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon