What Gets Synced
The Gmail connector syncs:- Threads - Email conversation threads
- Messages - Individual email messages
- Attachments - File attachments
Authentication
This connector uses OAuth 2.0 with custom credentials.Configuration
After Date (Required)
Sync emails after this date (format:YYYY/MM/DD or YYYY-MM-DD).
Included Labels (Optional)
Labels to include (e.g.,inbox, sent, important). Defaults to inbox and sent.
Excluded Labels (Optional)
Labels to exclude (e.g.,spam, trash). Defaults to spam and trash.
Gmail Query (Optional)
Advanced: Custom Gmail query string (overrides other filters).Setup
Create Google Cloud OAuth App
- Create a Google Cloud project
- Enable the Gmail API
- Configure OAuth consent screen
- Add scope:
https://www.googleapis.com/auth/gmail.readonly - Create OAuth credentials
Add Gmail Connection
In Airweave, enter:
- Client ID and Client Secret
- After date (e.g.,
2024/01/01) - Optional: Include/exclude labels
Supported Entities
Gmail Messages
Email messages with full content. Key fields:- Subject and sender
- To, CC, BCC recipients
- Sent/received timestamps
- Labels
- Snippet
Gmail Attachments
File attachments. Key fields:- Filename
- Associated message and thread
- Attachment ID
Implementation Details
View Source Code
Explore the Gmail connector implementation on GitHub
For detailed setup instructions with screenshots, see the source documentation in the GitHub repository.