# Triage Gmail, draft replies and log leads with OpenAI: n8n workflow

> Started by an arriving email, and works across Gmail, Google Sheets, Slack and Telegram. 30 steps, 2 branches: large, and worth reading before you trust it...

Source: https://millionrounds.com/workflow/triage-gmail-draft-replies-and-log-leads-with-openai (Millionrounds; every figure on the page links to its filing or article)

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

# Triage Gmail, draft replies and log leads with OpenAI

Started by an arriving email, and works across Gmail, Google Sheets, Slack and Telegram. 30 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Ftriage-gmail-draft-replies-and-log-leads-with-openai)

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

**2** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 2 Logic 10 Service 18

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

- 1 **Gmail Trigger - New Email** Gmail trigger *Starts it*
- 2 **On Workflow Failure** Error trigger *Starts it*
- 3 **Configuration** Set *Logic*
- 4 **Send Failure Alert** Telegram *Service*
- 5 **Extract Email Details** Code *Logic*
- 6 **Skip Ignored Senders?** If *Logic*
- 7 **Skip - Self Sent** No Op *Logic*
- 8 **AI: Classify Email** Http Request *Service*
- 9 **Parse Classification** Code *Logic*
- 10 **Log Every Email to Sheet** Google Sheets *Service*
- 11 **Route by Category** Switch *Logic*
- 12 **Label as Urgent** Gmail *Service*
- 13 **AI: Draft Support Reply** Http Request *Service*
- 14 **AI: Extract Sales Lead Info** Http Request *Service*
- 15 **AI: Extract Meeting Details** Http Request *Service*
- 16 **Label & Archive Promotional** Gmail *Service*
- 17 **Label as Needs Review** Gmail *Service*
- 18 **Send Instant Slack Alert** Slack *Service*
- 19 **Parse Support Draft** Code *Logic*
- 20 **Parse Lead Info** Code *Logic*
- 21 **Parse Meeting Details** Code *Logic*
- 22 **Create Support Draft in Gmail** Gmail *Service*
- 23 **Log Lead to CRM Sheet** Google Sheets *Service*
- 24 **Create Meeting Draft in Gmail** Gmail *Service*
- 25 **Label as Support** Gmail *Service*
- 26 **AI: Draft Sales Reply** Http Request *Service*
- 27 **Label as Meeting** Gmail *Service*
- 28 **Parse Sales Draft** Code *Logic*
- 29 **Create Sales Draft in Gmail** Gmail *Service*
- 30 **Label as Sales Lead** Gmail *Service*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 30, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Slack, Telegram
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets, Slack and Telegram accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 30 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 30 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%2Ftriage-gmail-draft-replies-and-log-leads-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)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

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

- [**AI-Powered Cold Calling Automation with Google Sheets** 30 steps · Google Sheets, Slack](https://millionrounds.com/workflow/ai-powered-cold-calling-automation-with-google-sheets)
- [**Automated LinkedIn lead enrichment pipeline with Google Sheets** 30 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/automated-linkedin-lead-enrichment-pipeline-with-google-shee)
- [**Generate B2B leads from any city & business type with Jina.AI** 30 steps · calls a model · Airtable, Slack](https://millionrounds.com/workflow/generate-b2b-leads-from-any-city-and-business-type-with-jina)
- [**Generate and research sales leads with Jina AI and OpenAI** 30 steps · calls a model · Airtable, Gmail](https://millionrounds.com/workflow/generate-and-research-sales-leads-with-jina-ai-and-openai)
- [**Lead generation and qualification with OpenAI** 30 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/lead-generation-and-qualification-with-openai)
- [**Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis** 30 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/lead-workflow-yelp-and-trustpilot-scraping-openai-analysis)
