Automation library · Chat assistants

AI email triage and smart auto-responder with OpenAI and Gmail

Started by another system calling it, and works across Email, Gmail, Google Sheets and Slack. It hands the judgement calls to OpenAI. 25 steps, 4 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

25 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 5Model 3Logic 13Service 4

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

  1. 1IMAP - Poll InboxEmail Read ImapService
  2. 2Webhook - API TriggerWebhookStarts it
  3. 3OpenAI Chat ModelLm Chat Open AiModel
  4. 4Structured Output ParserOutput Parser StructuredModel
  5. 5Error TriggerError triggerStarts it
  6. 6Extract Email FieldsSetLogic
  7. 7Extract Webhook FieldsSetLogic
  8. 8AI - Classify EmailAgentModel
  9. 9Error ResponseRespond To WebhookStarts it
  10. 10Has Email Content?IfLogic
  11. 11Merge Classification DataSetLogic
  12. 12Respond - Invalid EmailRespond To WebhookStarts it
  13. 13Route by PriorityIfLogic
  14. 14Slack - Urgent AlertSlackService
  15. 15Route by CategorySwitchLogic
  16. 16Merge Urgent After SlackSetLogic
  17. 17Forward to Sales TeamGmailService
  18. 18Archive SpamSetLogic
  19. 19Archive NewsletterSetLogic
  20. 20Prepare Draft ResponseSetLogic
  21. 21Is Spam or Newsletter?IfLogic
  22. 22Skip - No Log for SpamNo OpLogic
  23. 23Log to Google SheetsGoogle SheetsService
  24. 24Build API ResponseSetLogic
  25. 25Respond to WebhookRespond To WebhookStarts it

How it's built

Starts on
Another system calling it
Steps
25, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Email, Gmail, Google Sheets, Slack
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on another system calling it.

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 25 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 25 steps before you point it at anything that matters.