# Automate sales for digital products & SaaS with OpenAI: n8n workflow

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

Source: https://millionrounds.com/workflow/automate-sales-for-digital-products-and-saas-with-openai (Millionrounds; every figure on the page links to its filing or article)

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

# Automate sales for digital products & SaaS with OpenAI

Started by an event in a connected app, and works across Gmail. It hands the judgement calls to OpenAI. 29 steps, 2 branches, 6 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomate-sales-for-digital-products-and-saas-with-openai)

**29 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**6** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 4 Logic 20 Service 4

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

- 1 **Parse AI Email Output (JSON)** Output Parser Structured *Model*
- 2 **MANUAL TRIGGER: Start Workflow** Manual trigger *Starts it*
- 3 **Configure OpenAI Chat Model (GPT-4o-mini)** Lm Chat Open Ai *Model*
- 4 **Generate Personalized Email (LLM Chain)** Chain Llm *Model*
- 5 **Generate Google Maps Queries (OpenAI)** Open Ai *Model*
- 6 **Send Email via Gmail** Gmail *Service*
- 7 **Process AI-Generated Queries** Code *Logic*
- 8 **Generate Random Delay** Code *Logic*
- 9 **Loop Through Search Queries** Split In Batches *Logic*
- 10 **Wait Between Emails** Wait *Logic*
- 11 **Wait Before Google Search** Wait *Logic*
- 12 **Loop Through Unique Emails** Split In Batches *Logic*
- 13 **Search Google Maps** Http Request *Service*
- 14 **Extract Domain from Email** Code *Logic*
- 15 **Extract URLs from Google Search** Code *Logic*
- 16 **Scrape Website Content (Jina.ai)** Http Request *Service*
- 17 **Filter Out Google/Schema URLs** Filter *Logic*
- 18 **Check for Scraping Error** If *Logic*
- 19 **Check if URL Exists** If *Logic*
- 20 **Truncate Website Content** Code *Logic*
- 21 **Remove Duplicate URLs** Remove Duplicates *Logic*
- 22 **NoOp (If URL Invalid)** No Op *Logic*
- 23 **Loop Through Unique URLs** Split In Batches *Logic*
- 24 **Loop Through Website Content Batches** Split In Batches *Logic*
- 25 **Fetch Website Content (via URL)** Http Request *Service*
- 26 **Aggregate Email Lists** Aggregate *Logic*
- 27 **Extract and Filter Emails** Code *Logic*
- 28 **Split Emails into Items** Split Out *Logic*
- 29 **Remove Duplicate Emails** Remove Duplicates *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 29, with 2 branches, 6 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail 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?

Take your time. At 29 steps it is large: read it before trusting it with anything live.

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 29 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%2Fautomate-sales-for-digital-products-and-saas-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.

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

## Workflows like it

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

- [**Creator sponsorship and brand deals CRM with OpenAI and Gmail** 29 steps · calls a model · Gmail, Notion](https://millionrounds.com/workflow/creator-sponsorship-and-brand-deals-crm-with-openai-and-gmai)
- [**LinkedIn auto-connect & personalized messaging for sales** 29 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/linkedin-auto-connect-and-personalized-messaging-for-sales)
- [**Create weekly sales summaries and Airtable reports with Gmail** 30 steps · Airtable, Discord](https://millionrounds.com/workflow/create-weekly-sales-summaries-and-airtable-reports-with-gmai)
- [**Deal Room - AI-Powered M&A Due Diligence Accelerator** 31 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/deal-room-ai-powered-m-and-a-due-diligence-accelerator)
- [**Restaurant daily insights with Gemini** 27 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/restaurant-daily-insights-with-gemini)
- [**Score customer health and churn risk with Salesforce** 27 steps · calls a model · Gmail, Salesforce](https://millionrounds.com/workflow/score-customer-health-and-churn-risk-with-salesforce)
