Use Cases
- Monitor emails from specific senders (customers, partners, systems)
- Read unread messages for automated processing
- Extract email content for analysis or summarization
- Trigger workflows based on incoming emails
- Create email-based automation and response systems
Configuration
Gmail Authorization
The Gmail Reader uses OAuth 2.0 for secure authentication. Click the “Connect Gmail” button to authorize Agility to access your Gmail account.Your Gmail credentials are never stored. Agility uses secure OAuth tokens that can be revoked at any time from your Google Account settings.
Email Filtering
The email address of the sender to search for. Only emails from this address will be retrieved.Example:
[email protected], [email protected]Maximum number of emails to retrieve. Range: 1-50Default: 5 emails
When enabled, only retrieves unread emails. When disabled, retrieves all emails matching other criteria.Default: true
Workflow Trigger
When enabled, this agent becomes the workflow trigger. The workflow will automatically execute when new emails arrive from the specified sender.Note: Only one agent per workflow can be set as a trigger.
Output Structure
The Gmail Reader provides comprehensive email data that can be used by subsequent agents.Array of email message objects retrieved from Gmail. Each message contains full email details.
Body content of the first email message in plain text format.
Subject line of the first email message.
Email address of the sender of the first message.
Email address of the recipient of the first message.
Date and time when the first email was sent (ISO 8601 format).
Formatted representation of the first email including all headers and body content.
Example Output
Usage Examples
Customer Support Automation
Workflow: Auto-respond to support emails-
Gmail Reader
- From Email:
[email protected] - Only Unread: true
- Max Results: 1
- Set as Trigger: true
- From Email:
-
Text Generator
- Prompt: “Generate a professional support response for: ”
-
Gmail Sender
- To:
{{emailFrom}} - Subject:
Re: {{emailSubject}} - Body:
{{text}}
- To:
Order Notification Monitor
Workflow: Extract and log order information-
Gmail Reader
- From Email:
[email protected] - Only Unread: true
- Max Results: 10
- From Email:
-
Text Generator
- Prompt: “Extract order number, customer name, and total amount from: ”
-
Discord Messenger
- Message: “New order received: “
GitHub Digest
Workflow: Daily summary of GitHub notifications-
Gmail Reader
- From Email:
[email protected] - Only Unread: false
- Max Results: 20
- From Email:
-
Text Generator
- Prompt: “Summarize these GitHub notifications: ”
-
Discord Messenger
- Message: “Daily GitHub Digest:\n”
Best Practices
Email Filtering
- Use specific sender addresses rather than domains
- Start with small
maxResultsvalues and increase as needed - Use “Only Unread” to avoid processing the same emails repeatedly
Performance
- Avoid setting very high
maxResultsvalues (>20) as it increases processing time - Use workflow triggers for real-time email processing instead of polling
Security
- Regularly review OAuth permissions in your Google Account
- Only grant access to workflows that genuinely need email access
- Revoke access when workflows are no longer needed
Error Handling
Common errors and solutions:- Gmail authorization required: Click “Connect Gmail” to authorize access
- No emails found: Verify the sender email address is correct and matching emails exist
- Rate limit exceeded: Gmail API has usage limits; wait before retrying
- Invalid sender email: Ensure the email address format is valid