Automation library · AI assistants

Classify and draft Gmail replies with OpenRouter

Started by an arriving email, and works across Gmail. It hands the judgement calls to OpenRouter. 14 steps, 1 branch: a working afternoon to understand properly.

MediumCalls a model: OpenRouter

14 stepsMedium: a working afternoon
1Branch: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 1Model 6Logic 2Service 5

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

  1. 1When Gmail Receives EmailGmail triggerStarts it
  2. 2Fetch Knowledge Base DataGoogle Docs ToolService
  3. 3Get Knowledge for ReplyGoogle Docs ToolService
  4. 4OpenRouter Model ClassifyLm Chat Open RouterModel
  5. 5OpenRouter Model Email DraftLm Chat Open RouterModel
  6. 6OpenRouter Model for ReplyLm Chat Open RouterModel
  7. 7Retrieve Gmail EmailGmailService
  8. 8Draft New Email with AIAgentModel
  9. 9Create Reply with AIAgentModel
  10. 10Email Classification AgentAgentModel
  11. 11Send Email for ReviewGmailService
  12. 12Send Reply EmailGmailService
  13. 13Route Email DecisionSwitchLogic
  14. 14Skip ActionNo OpLogic

How it's built

Starts on
An arriving email
Steps
14, with 1 branch
Size
Medium: a working afternoon
Connects to
Gmail
Model
OpenRouter

Questions

What does it need to run?

An n8n account, plus your own Gmail account, and a key for OpenRouter. 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 OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 14 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 14 steps before you point it at anything that matters.