Automation library · AI assistants

Design and apply Gmail label systems with OpenAI

Started by someone submitting a form, and works across Gmail. It hands the judgement calls to OpenAI. 21 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

21 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 1Model 2Logic 9Service 9

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

  1. 1When Setup InitiatedForm triggerStarts it
  2. 2Fetch Gmail Inbox SampleGmailService
  3. 3Normalize Emails DataCodeLogic
  4. 4Compile Emails OverviewCodeLogic
  5. 5AI Suggest LabelsOpen AiModel
  6. 6Prepare Labels ProposalCodeLogic
  7. 7Seek Label ApprovalFormService
  8. 8Check Label ApprovalIfLogic
  9. 9Format Approved LabelsCodeLogic
  10. 10Display Rejection MessageFormService
  11. 11Generate Approved Labels in GmailGmailService
  12. 12Map Label Names to IDsCodeLogic
  13. 13Create AI Reviewed Gmail LabelGmailService
  14. 14Fetch Emails for ClassificationGmailService
  15. 15Normalize Classification EmailsCodeLogic
  16. 16AI Classify EmailsOpen AiModel
  17. 17Validate Email ClassificationCodeLogic
  18. 18Tag Email with Approved LabelGmailService
  19. 19Tag Email as AI ReviewedGmailService
  20. 20Summarize Completion StatusCodeLogic
  21. 21Display Success MessageFormService

How it's built

Starts on
Someone submitting a form
Steps
21, with 1 branch
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 someone submitting a form.

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