# Personalize marketing emails with OpenAI: n8n workflow template

> Started by an event in a connected app, and works across Email. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/personalize-marketing-emails-with-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [AI assistants](https://millionrounds.com/workflows?category=AI+assistants#library)

# Personalize marketing emails with OpenAI

Started by an event in a connected app, and works across Email. It hands the judgement calls to OpenAI. 16 steps, 2 branches: a working afternoon to understand properly.

Medium Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpersonalize-marketing-emails-with-openai)

**16 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 2 Logic 10 Service 3

The steps in the order they run, from what starts it.

- 1 **When clicking "Execute Workflow"** Manual trigger *Starts it*
- 2 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 3 **Download dummy data** Http Request *Service*
- 4 **Information Extractor** Information Extractor *Model*
- 5 **Extract from File** Extract From File *Service*
- 6 **AI Output + Prev Data** Merge *Logic*
- 7 **Some Options for the Campaign** Set *Logic*
- 8 **Is the result valid?** If *Logic*
- 9 **Coupon them or not to Coupon them** If *Logic*
- 10 **AI did fail us1** Stop And Error *Logic*
- 11 **Html Template for our Email** Html *Logic*
- 12 **The composed E-Mail + Prev Data** Merge *Logic*
- 13 **Fake coupon** Set *Logic*
- 14 **The composed E-Mail with Coupon + Prev Data** Merge *Logic*
- 15 **Send Email** Email Send *Service*
- 16 **Html Template for our Email with a Coupon** Html *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 16, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Email
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Email account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 16 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 16 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpersonalize-marketing-emails-with-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Email](https://millionrounds.com/workflows?service=Email#library)

## Workflows like it

Also ai assistants, with the same services where possible, closest in size first.

- [**Detect financial anomalies and reconcile revenue with OpenAI** 16 steps · calls a model · Email](https://millionrounds.com/workflow/detect-financial-anomalies-and-reconcile-revenue-with-openai)
- [**Validate student progress and orchestrate interventions** 16 steps · calls a model · Email](https://millionrounds.com/workflow/validate-student-progress-and-orchestrate-interventions)
- [**AI-Powered Customer Email Auto Responder with OpenAI** 15 steps · calls a model · Email](https://millionrounds.com/workflow/ai-powered-customer-email-auto-responder-with-openai)
- [**Automatic email categorization & labeling in Zoho Mail** 15 steps · calls a model · Email](https://millionrounds.com/workflow/automatic-email-categorization-and-labeling-in-zoho-mail)
- [**Email-based book recommendations with Ollama LLM** 15 steps · calls a model · Email](https://millionrounds.com/workflow/email-based-book-recommendations-with-ollama-llm)
- [**Automate Job Opportunity Digests with OpenRouter GPT-5** 14 steps · calls a model · Email](https://millionrounds.com/workflow/automate-job-opportunity-digests-with-openrouter-gpt-5)
