# Smart email classifier & auto-responder with Azure OpenAI: n8n workflow

> Started by an arriving email, and works across Gmail, Google Calendar and Telegram. It hands the judgement calls to Azure OpenAI.

Source: https://millionrounds.com/workflow/smart-email-classifier-and-auto-responder-with-azure-openai (Millionrounds; every figure on the page links to its filing or article)

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

# Smart email classifier & auto-responder with Azure OpenAI

Started by an arriving email, and works across Gmail, Google Calendar and Telegram. It hands the judgement calls to Azure OpenAI. 22 steps: large, and worth reading before you trust it with anything live.

Large Calls a model: Azure OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsmart-email-classifier-and-auto-responder-with-azure-openai)

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

**0** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 6 Logic 2 Service 13

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

- 1 **Azure OpenAI Chat Model** Lm Chat Azure Open Ai *Model*
- 2 **Draft** Gmail Tool *Service*
- 3 **Get emails** Gmail Tool *Service*
- 4 **Google Calendar** Google Calendar Tool *Service*
- 5 **Gmail Trigger** Gmail trigger *Starts it*
- 6 **json schema** Output Parser Structured *Model*
- 7 **Sentiment Analysis** Sentiment Analysis *Model*
- 8 **important?** Sentiment Analysis *Model*
- 9 **Draft Reply** Agent *Model*
- 10 **needs reply?** Sentiment Analysis *Model*
- 11 **$INPUTS$** Set *Logic*
- 12 **Spam** Gmail *Service*
- 13 **Important** Gmail *Service*
- 14 **Promotion** Gmail *Service*
- 15 **Notification** Gmail *Service*
- 16 **Personal** Gmail *Service*
- 17 **Call request** Gmail *Service*
- 18 **Needs Reply** Gmail *Service*
- 19 **Gmail** Gmail *Service*
- 20 **Write draft** Gmail *Service*
- 21 **No Operation, do nothing** No Op *Logic*
- 22 **Telegram** Telegram *Service*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 22
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Calendar, Telegram
- **Model:** Azure OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Calendar and Telegram accounts, and a key for Azure OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an arriving email.

Does it use AI?

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

How long does it take to set up?

Take your time. At 22 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 22 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%2Fsmart-email-classifier-and-auto-responder-with-azure-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 Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

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

- [**Organise an Event with Slack and Google Calendar** 22 steps · calls a model · Google Calendar, Slack](https://millionrounds.com/workflow/organise-an-event-with-slack-and-google-calendar)
- [**Personal assistant for calendar & tasks with OpenAI** 22 steps · calls a model · Google Calendar, Google Tasks](https://millionrounds.com/workflow/personal-assistant-for-calendar-and-tasks-with-openai)
- [**Schedule motivational YouTube Shorts with Google Drive** 22 steps · calls a model · Airtable, Google Cloud Storage](https://millionrounds.com/workflow/schedule-motivational-youtube-shorts-with-google-drive)
- [**Telegram AI Personal Assistant with Gemini and Tools** 22 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/telegram-ai-personal-assistant-with-gemini-and-tools)
- [**Sync Clockify to Google Calendar** 22 steps · Google Calendar](https://millionrounds.com/workflow/sync-clockify-to-google-calendar)
- [**AI Virtual Assisstant Version 1 with Gemini and Gmail** 21 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ai-virtual-assisstant-version-1-with-gemini-and-gmail)
