Route important Gmail messages to Slack channels
Workflow Description
Automation that captures incoming emails from Gmail based on custom criteria and instantly forwards them to designated Slack channels with full context preserved. Includes database logging for audit trails and compliance tracking across your team communication.
How it works
- 1.Receive email notifications from Gmail via webhook monitoring new incoming messages
- 2.Apply filtering conditions to identify priority emails based on sender, subject, or content rules
- 3.Send formatted message to the appropriate Slack channel with sender details and email content
- 4.Log all forwarded messages in Postgres database for tracking and historical reference
Use cases
- Alert sales team immediately when high-priority customer emails arrive
- Distribute daily reports from email inbox to relevant team channels automatically
- Route support tickets from email to dedicated Slack channels for faster response
Requirements
- Active Gmail account with app password or OAuth credentials configured
- Slack workspace with channel management and message posting permissions
- Postgres database connection for storing message logs and audit history
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (43)
Extract relevant data
Set
New /login event
Webhook
Unknown threat?
If
Get last 10 logins from the same user
Postgres
Query IP API1
HTTP Request
New location?
If
Parse User Agent
HTTP Request
Merge
Merge
New Device/Browser?
If
Complete login info
Merge
Query user by ID
Postgres
New Location
No Op
New Device/Browser
No Op
User has email?
If
HTML
HTML Page
Inform user
Gmail
noise?
If
Slack
Slack
Check trust level
Switch
Check classification
Switch
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note9
Sticky Note
Sticky Note10
Sticky Note
riot?
If
🔴 Priority: HIGH
Set
🟡 Priority: MEDIUM
Set
🟢 Priority: LOW
Set
GreyNoise
HTTP Request
IP API
HTTP Request
UserParser
HTTP Request
When clicking "Execute Workflow"
Manual Trigger
Example event
Code
Sticky Note7
Sticky Note
Sticky Note11
Sticky Note
Sticky Note12
Sticky Note
Sticky Note13
Sticky Note
Known, Do Nothing
No Op
Known Location
No Op
Old Device/Browser
No Op
Not Riot
No Op