Gmail starred and unread email to Todoist task sync workflow
This n8n workflow scans starred and unread messages in Gmail on a schedule and compares them against open Todoist tasks. Missing messages are fetched in full, summarised by an OpenAI agent with a structured output parser and created as Todoist tasks. When an email is unstarred, its matching task closes automatically.
- Catalogue ID
- #1749
- Functional nodes
- 21
- Connections
- 23
- Trigger
- manualTrigger, scheduleTrigger
- AI layer
- AI-assisted
Business problem solved
Important client emails stay buried inside busy inboxes even after team members star them for follow-up. Meanwhile, completed email threads leave stale open items inside Todoist, cluttering daily priority lists and forcing manual clean-up.
Trigger
A schedule trigger runs periodic inbox checks alongside a manual test trigger and an IMAP email reader node.
Connected systems
- Gmail
- IMAP email reader
- Todoist
- OpenAI
- Structured output parser
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow architecture
- 1. When clicking Test workflow (Trigger) (connects to No Operation, do nothing)
- 2. Mark As Read (Service and data) (connects to Star)
- 3. Star (Service and data)
- 4. Get Starred From Inbox (Service and data) (connects to Merge Starred and Unread…)
- 5. Get Unread From Inbox (Service and data) (connects to Mark As Read, Merge Starred and Unread…)
- 6. If Task Not Exist (Logic and routing) (connects to Get Full Message)
- 7. OpenAI Chat Model (AI layer) (connects to Summarize Message)
- 8. Structure Output Todoist… (AI layer) (connects to Summarize Message)
- 9. If AI responded properly (Logic and routing) (connects to Create Todoist Task)
- 10. Create Todoist Task (Service and data)
- 11. Get Full Message (Service and data) (connects to Summarize Message)
- 12. Summarize Message (AI layer) (connects to If AI responded properly)
- 13. Enrich Emails With Tasks (Logic and routing) (connects to If Task Not Exist)
- 14. Enrich Tasks with Emails (Logic and routing) (connects to If Email Unstarred (Not…)
- 15. If Email Unstarred (Not… (Logic and routing) (connects to Close Task)
- 16. Close Task (Service and data)
- 17. Email Trigger (IMAP) (Trigger) (connects to No Operation, do nothing)
- 18. Schedule Trigger (Trigger) (connects to No Operation, do nothing)
- 19. No Operation, do nothing (Logic and routing) (connects to Get Unread From Inbox, Get Starred From Inbox, Get Open Tasks)
- 20. Merge Starred and Unread… (Logic and routing) (connects to Enrich Emails With Tasks, Enrich Tasks with Emails)
- 21. Get Open Tasks (Service and data) (connects to Enrich Emails With Tasks, Enrich Tasks with Emails)
- Trigger
- AI layer
- Logic and routing
- Service and data
Node positions and directed links are generated from the verified catalogue record.
Workflow steps
- 01
Inbox and open-task intake
The workflow pulls starred and unread messages from Gmail while fetching current open tasks from Todoist in parallel.
- 02
Matching and unstarred task closure
Merge and conditional nodes match threads by subject, queue missing items and close Todoist tasks whose emails were unstarred.
- 03
OpenAI summary and structured action
Full message content is retrieved and passed to an OpenAI agent with a structured parser to draft clear action steps.
- 04
Todoist task creation
After verifying the structured output, the workflow creates a new Todoist task and updates message labels as configured.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow contains zero node-level error flags across its 21 functional nodes and 23 connections, relying on schema validation.
Production layer added by ALTAI
During live deployment, ALTAI adds Todoist rate-limit protection, a parsing error queue for malformed emails, message-ID deduplication and an audit run log.
Gmail to Todoist email task sync workflow Frequently asked questions
Before creating any task, the workflow compares email subjects with open Todoist tasks. Production deployments also track Gmail thread IDs in the run log.
Those optional labelling nodes can be adjusted or removed during set-up so only approved inbox labels enter the task queue.
An explicit conditional check stops malformed output from creating incomplete tasks and routes the message to a review queue.
Related n8n workflows
Gmail Gemini classification and Brevo sync
Reads new Gmail messages, classifies inquiry types via Google Gemini, applies Gmail labels, updates contacts in Brevo and dispatches category responses.
NocoDB Kanban AI ticket prioritisation workflow
Classifies form incidents with OpenAI against NocoDB rules, creates Kanban records and runs daily checks for unpicked or overdue tasks via Slack and email.
WhatsApp AI customer support workflow
Checks the 24-hour Meta service window, answers with PostgreSQL conversation memory and reopens expired threads through approved templates.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms