Classify cold email replies and route leads with Gmail, Gemini, Slack and Sheets

Go to Workflow
1 views
Built by Hassan Hassan
Created on July 27, 2026

Description

Quick overview
This workflow polls Gmail for labeled outreach replies, cleans and classifies each reply with Google Gemini, logs results to Google Sheets, and for actionable messages, creates a Gmail draft response and alerts a Slack channel with the draft link.

How it works
Triggers every minute when a new Gmail message arrives with the specified label.
Fetches the full email content from Gmail and extracts sender, subject, and a cleaned reply body that removes quoted text.
Sends the cleaned reply body to Google Gemini to classify it (Interested, Question, Objection, Not Interested, Auto-Reply) and generate a suggested reply.
Parses the Gemini JSON output and falls back to a “Needs Manual Review” classification if the response cannot be parsed.
Appends the email details, classification, confidence, reasoning, and suggested reply to a Google Sheets tracker.
If the reply is classified as Interested or Question, creates a draft reply in Gmail and posts a Slack alert that links directly to the saved draft.

Setup
Connect your Gmail OAuth2 account and create a Gmail label and filter that applies it to inbound replies (for example, add -from:me to avoid matching your own sent emails).
Add a Google Gemini (PaLM) API credential for the Google Gemini node.
Connect your Google Sheets OAuth2 account, set the target spreadsheet/document ID, and ensure the sheet has columns matching the workflow’s mapped fields.
Connect your Slack OAuth2 credential, set the target channel (for example, #outreach-replies), and invite the Slack bot/app to that channel.

Customization
To add or remove classification categories, edit the prompt in the Gemini node and update the IF condition on the routing node to match
To alert on Objection replies, add Objection as a second condition on the routing node
To adjust poll frequency, change the interval on the Gmail trigger

Additional info
This workflow strips Gmail's quoted reply content before classification, significantly improving AI accuracy compared to passing the full thread. The AI never sends emails automatically — all outbound messages go through human review via Gmail Drafts. Tested with Google Gemini 3 Flash.

Nodes Used (5)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Gemini
@n8n/n8n-nodes-langchain.googleGemini
Google Sheets
n8n-nodes-base.googleSheets
Slack
n8n-nodes-base.slack