WhatsApp and support messaging

Gmail email classification with Gemini and Brevo contact upsert workflow

Short answer

This n8n workflow captures incoming Gmail messages, marks them as read and categorises each inquiry with a Google Gemini text classifier. Conditional branches separate active contract threads from guest-post or video requests before applying Gmail labels. Contact details upsert into Brevo and structured email replies run on your server.

Catalogue ID
#0796
Functional nodes
11
Connections
12
Trigger
gmailTrigger
AI layer
AI-assisted
Business problem solved

Business problem solved

Marketing and partnerships inboxes fill up with repetitive sponsorship, guest-article and media requests mixed alongside live client conversations. Sorting labels and copying contact records into Brevo by hand wastes hours every week.

Trigger

The Gmail trigger runs immediately whenever a new email arrives in the monitored inbox.

Connected systems

Connected systems

  • Gmail
  • Google Gemini
  • Text classifier
  • Brevo
  • Email sender
  • Self-hosted n8n

Every workflow is deployed on your own server with documentation, a run log and an error queue.

Workflow architecture

Workflow architecture

  1. 1. Gmail Trigger (Trigger) (connects to Emails from Existing…)
  2. 2. Text Classifier (AI layer) (connects to GuestPost Inquiry, Youtube Video Inquiry, Send Email)
  3. 3. Google Gemini Chat Model (AI layer) (connects to Text Classifier)
  4. 4. GuestPost Inquiry (Service and data) (connects to Mark as Read)
  5. 5. Youtube Video Inquiry (Service and data) (connects to Mark as Read)
  6. 6. Send Email (Service and data) (connects to Mark as Read)
  7. 7. Mark as Read (Service and data) (connects to Apply Label, Create Contact in Brevo)
  8. 8. Apply Label (Service and data)
  9. 9. Create Contact in Brevo (Service and data)
  10. 10. Emails from Existing… (Logic and routing) (connects to Reply)
  11. 11. Reply (Logic and routing) (connects to Text Classifier)
  • Trigger
  • AI layer
  • Logic and routing
  • Service and data

Node positions and directed links are generated from the verified catalogue record.

Workflow steps

Workflow steps

  1. 01

    Gmail intake and Gemini classification

    Incoming messages enter the Google Gemini text classifier node to identify partnership, media or contract intent.

  2. 02

    Conditional routing and Gmail labelling

    Conditional branches isolate active contract emails from standard inquiries, mark threads read and assign matching Gmail labels.

  3. 03

    Brevo contact upsert and response

    Sender details upsert into Brevo without duplicating contacts, and the matched response template is dispatched by email.

Error queue and human approval

Error queue and human approval

Built-in state in the catalogue workflow

The verified catalogue workflow contains zero node-level error flags across its 11 functional nodes and 12 connections.

Production layer added by ALTAI

During live deployment, ALTAI adds human draft review for uncertain inquiries, sender allow and block lists and a Brevo API error queue.

Frequently asked

Gmail Gemini classification and Brevo sync Frequently asked questions

Yes. In production, the send nodes can switch to Gmail draft creation or add a Slack approval step before anything goes out.

No. The conditional branch detects emails linked to active contracts and excludes them from standard automated responses.

No. The Brevo node uses an upsert operation so existing contact profiles update cleanly instead of duplicating.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

We write the proposal after we have found the problem together

In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.

30 minutes · no preparation needed

The call and the week of discovery are both free.Read the terms

Chat on WhatsApp