Gmail Node
Loading node sections...
Overview
The Gmail Node is an email automation component that provides both event triggering and action capabilities for Gmail integration. This node enables automated email monitoring, sending, and management within flows, supporting real-time email processing and automated email operations.
Node Type Information
Type | Description | Status |
---|---|---|
Batch Trigger | Starts the flow on a schedule or batch event. Ideal for periodic data processing. | ❌ False |
Event Trigger | Starts the flow based on external events (e.g., webhook, user interaction). | ✅ True |
Action | Executes a task or logic as part of the flow (e.g., API call, transformation). | ✅ True |
This node is both an Event Trigger and Action node that provides email automation capabilities for monitoring, sending, and managing emails.
This node combines Event Trigger and Action capabilities to provide comprehensive email automation within your workflows.
Features
Key Functionalities
- Event Trigger - On New Email: Automatically triggers workflows when new emails are received, enabling real-time email processing and automation.
- Action - Send Email: Composes and sends emails with customizable content, recipients, and attachments.
- Action - Create Event Draft: Generates calendar event drafts from email content for scheduling automation.
- Action - Fetch Email: Retrieves specific emails or email threads based on search criteria and filters.
Benefits
- Real-time Email Monitoring: Automatically responds to incoming emails without manual intervention.
- Automated Email Communication: Streamlines email sending processes with customizable templates and dynamic content.
- Calendar Integration: Seamlessly converts email content into calendar events for better scheduling.
- Email Data Extraction: Efficiently retrieves and processes email data for analysis and workflow integration.
Prerequisites
Before using Gmail Node, ensure the following:
- Gmail Account: A valid Gmail account with proper authentication setup.
Setup
Step 1: Set Up Gmail API Access
- Set Up Google Drive Access
- Set up Google OAuth credentials for Gmail access |
Step 2: Set Up Lamatic Flow
- Create a Custom Flow for Gmail automation:
- Configure the Gmail node based on your use case
- Set up event triggers for email monitoring
- Define action parameters for email operations
Configuration Reference
Event Trigger Configuration
Parameter | Description | Required | Example |
---|---|---|---|
Name | Display name for the node | ✅ | Gmail Monitor |
Credentials | Gmail authentication details required to access the account | ✅ | my-gmail-credentials |
Trigger Type | Type of email event to monitor | ✅ | On New Email |
Action Configuration
Send Email Action
Parameter | Description | Required | Example |
---|---|---|---|
Name | Display name for the action | ✅ | Send Email |
Credentials | Gmail authentication details required to send emails | ✅ | my-gmail-credentials |
Action | Actions for Gmail | ✅ | Send Email , Create Email Draft , Fetch Email |
Recipient Email | Recipient email addresses (comma-separated) | ✅ | [email protected] |
Subject | Email subject line | ✅ | Automated Response |
Body | Email body content (supports HTML and plain text) | ✅ | Hello, this is an automated email. |
CC | CC recipient email addresses (comma-separated) | ❌ | [email protected] |
BCC | BCC recipient email addresses (comma-separated) | ❌ | [email protected] |
Is Content HTML? | Set to true if the email body is HTML. | ❌ | true , false |
Fetch Email Action
Parameter | Description | Required | Example |
---|---|---|---|
Name | Display name for the action | ✅ | Fetch Email |
Credentials | Gmail authentication details required to fetch emails | ✅ | my-gmail-credentials |
Max Results | Maximum number of emails to retrieve | ❌ | 10 |
From User | If provided, only emails from the specified user(s) will be fetched. If not provided, all emails will be fetched. | ❌ | [email protected] |
To User | If provided, only emails to the specified user(s) will be fetched. If not provided, all emails will be fetched. | ❌ | [email protected] |
Low-Code Example
Event Trigger Example
triggerNode:
nodeId: triggerNode_1
nodeType: gmailNode
nodeName: Gmail
values:
credentials: Gmail OAuth VJS
action: GMAIL_NEW_GMAIL_MESSAGE
modes: {}
Action Examples
Send Email Action
nodes:
- nodeId: gmailNode_397
nodeType: gmailNode
nodeName: Gmail
values:
credentials: Gmail OAuth VJS
action: GMAIL_SEND_EMAIL
recipient_email: ''
cc: ''
bcc: ''
subject: ''
body: ''
is_html: false
max_results: 10
from_user: ''
to_user: ''
modes: {}
needs:
- triggerNode_1
Create Event Draft Action
nodes:
- nodeId: gmailNode_397
nodeType: gmailNode
nodeName: Gmail
values:
credentials: Gmail OAuth VJS
action: GMAIL_CREATE_EMAIL_DRAFT
recipient_email: ''
cc: ''
bcc: ''
subject: ''
body: ''
is_html: false
max_results: 10
from_user: ''
to_user: ''
modes: {}
needs:
- triggerNode_1
Fetch Email Action
nodes:
- nodeId: gmailNode_397
nodeType: gmailNode
nodeName: Gmail
values:
credentials: Gmail OAuth VJS
action: GMAIL_FETCH_EMAILS
recipient_email: ''
cc: ''
bcc: ''
subject: ''
body: ''
is_html: false
max_results: 10
from_user: ''
to_user: ''
modes: {}
needs:
- triggerNode_1
Output
Event Trigger Output
emailId
: String identifier for the emailfrom
: String containing the sender's email addressto
: String containing the recipient's email addresssubject
: String containing the email subjectbody
: String containing the email body contenttimestamp
: String containing the email timestamplabels
: Array of strings containing Gmail labelsattachments
: Array of attachment objects (if any)
Action Output
Send Email Output
messageId
: String identifier for the sent emailthreadId
: String identifier for the email threadsuccess
: Boolean indicating if the email was sent successfullytimestamp
: String containing the send timestamp
Create Event Draft Output
eventId
: String identifier for the created eventeventLink
: String containing the link to the eventsuccess
: Boolean indicating if the event was created successfullyattendees
: Array of attendee objects with their response status
Fetch Email Output
emails
: Array of email objects containing:emailId
: String identifier for the emailfrom
: String containing the sender's email addressto
: String containing the recipient's email addresssubject
: String containing the email subjectbody
: String containing the email body contenttimestamp
: String containing the email timestamplabels
: Array of strings containing Gmail labelsattachments
: Array of attachment objects (if any)
totalCount
: Number indicating the total number of emails foundnextPageToken
: String token for pagination (if applicable)
Troubleshooting
Common Issues
Problem | Solution |
---|---|
Authentication Errors | Verify that the Gmail OAuth credentials are valid and have the correct scopes |
Permission Denied | Ensure the Gmail API is enabled and the account has proper permissions |
Email Not Triggering | Check the filter criteria and ensure the monitored label exists |
Send Email Fails | Verify recipient email addresses and ensure the account has sending permissions |
Calendar Access Issues | Confirm that Calendar API is enabled and the account has calendar permissions |
Rate Limiting | Implement appropriate delays between API calls to avoid hitting rate limits |
Debugging
- Check Gmail API logs for detailed error messages
- Verify OAuth token validity and refresh if necessary
- Test email filters using Gmail's search syntax
- Monitor API quota usage to avoid rate limiting
- Validate email addresses and calendar event parameters
- Check network connectivity and firewall settings
- Review Gmail API documentation for specific error codes