Quick overview
This workflow monitors labeled Gmail messages, uses easybits Extractor to pull event details from the email body and any PDF/image attachments, and either creates a Google Calendar event or labels the email for review and sends you a notification.
How it works
- Polls Gmail every minute for new emails that have the specified “Events” label and downloads any attachments.
- Renders the email subject, sender, date, and body into a minimal PDF and sends it to easybits Extractor to extract structured event fields.
- Splits PDF/image attachments into separate items and sends each one to easybits Extractor to extract the same event fields.
- Merges the extracted results, prioritizing attachment data over email-body data and filling missing fields from the body when needed.
- Validates that required fields (at least
start_datetime and event_type) are present.
- If valid, creates a Google Calendar event with the extracted title, start/end time, location, and a formatted description, then removes the “Events” label from the email.
- If invalid, adds a “Needs-Review” label, removes the “Events” label, and sends you an HTML email listing missing fields and what was extracted.
Setup
- Connect Gmail OAuth2 credentials for the Gmail Trigger and Gmail actions, and update the Events label ID, Needs-Review label ID, and review recipient email address.
- Install and configure the easybits Extractor community node (
@easybits/n8n-nodes-extractor) and add your easybits Extractor API key and Pipeline ID to both Extractor steps.
- Connect Google Calendar OAuth2 credentials and replace the target calendar ID with your calendar (or create a dedicated “Auto-imported” calendar and select it).
- Create the Gmail labels used by the workflow (for example,
Events and Events/Needs-Review) and apply the Events label to test emails you want turned into calendar events.