Gmail Trigger
Monitor a Gmail inbox and trigger workflows on new messages.
Overview
The Gmail Trigger starts a workflow when a new message arrives in a connected Gmail inbox. Spojit polls the mailbox using the authorized account's credentials and fires the trigger for each new message that matches the configured filter.
It is commonly used for inbox-driven automations: turning support emails into Monday.com tasks, extracting attachments for downstream processing, summarizing or classifying messages with AI, or routing customer requests into Slack and other systems.
What You Can Do
The Gmail Trigger watches an inbox and exposes each new message to the workflow body:
new-messageevents - fires when a message arrives that matches your filter.filter- optional Gmail search query (for examplefrom:billing@vendor.com,label:support,has:attachment) to scope which messages trigger the workflow.from,to,cc,bcc,subject,date- standard email headers exposed to the workflow.body-plainandbody-html- the plain text and HTML versions of the message body.attachments- an array of attachment metadata (filename, mime type, size) along with content available to PDF, image, and CSV tools downstream.thread-idandmessage-id- identifiers useful for threading replies or deduplicating runs.
Authentication
The Gmail Trigger uses OAuth to access the inbox. Spojit redirects you to Google to sign in and authorize read access to messages and attachments. You can revoke the grant at any time from your Google Account at Security -> Third-party apps with account access.
Setting Up Your Connection
- Go to Connections from the sidebar.
- Click + Add Connection.
- Search for Gmail Trigger and select it.
- Click Connect to start the OAuth flow. Sign in to the Google account whose inbox you want to monitor and approve the requested scopes.
- Optionally configure a Gmail search filter (for example
label:support newer_than:1d) to limit which messages fire the trigger. - Give your connection a name (for example "Support inbox") and click Save.
Using the Trigger
Workflows that use this connection start on an email trigger node bound to the connection. Each new matching message fires one run of the workflow. Use {{trigger.subject}}, {{trigger.from}}, {{trigger.body-plain}}, and {{trigger.attachments}} in downstream nodes to act on the message contents.
Tips
- Use a Gmail label and a filter rule on the inbox to pre-tag messages, then trigger on
label:spojit-processfor tighter scoping. - For attachment-driven workflows, branch on attachment count or mime type early so empty messages do not run the full pipeline.
- Use the
thread-idto deduplicate when a long conversation could otherwise fire the trigger multiple times. - If you process replies and need to skip your own outgoing messages, exclude
from:your own address in the filter.
Common Pitfalls
- OAuth grants are tied to a single Google account; if you change the account that owns the inbox, you need to reconnect.
- Spojit polls Gmail rather than pushing in real time, so triggers fire within a short delay, not instantly.
- HTML-only messages may have an empty
body-plain; usebody-htmland a text or AI node to normalize. - Large attachments can slow down workflow execution. Filter or branch early to skip oversized messages.
Common Use Cases
- How to Set Up Email-Triggered Document Processing
- How to Create Monday.com Tasks from Emails
- How to Create Monday.com Tasks from Customer Support Emails
- How to Auto-Index Incoming Emails into Your Knowledge Base
- How to Auto-Respond to Customer Emails Using AI
Related Articles
For technical API details and field specifications, see the Gmail Trigger trigger documentation.