Automate Gmail to Todoist Task Creation with n8n

Frustrated by important emails slipping through the cracks? Learn how this n8n workflow turns your Gmail starred and unread emails into actionable Todoist tasks, saving you hours and enhancing productivity.
gmail
todoist
lmChatOpenAi
+7
Workflow Identifier: 1953
NODES in Use: Manual Trigger, Gmail, If, OpenAI Chat Model, Output Parser Structured, Todoist, Merge, Schedule Trigger, No Operation, Sticky Note
Automate Gmail to Todoist with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow checks Gmail for starred and unread emails at the same time.
It marks unread emails as read and stars them.
After that, it uses AI to read the whole email and make a task summary with actions and reply ideas.
Then, it sees if a matching Todoist task already exists to avoid repeating tasks.
If no task matches, it creates a new task with the AI summary in Todoist.
If an email is unstarred later, the workflow closes the matching Todoist task.

The result is an organized task list from important emails, saved time, and less chance to forget or duplicate work.


Tools and Services Used

  • Gmail API with OAuth2: Accesses starred and unread emails.
  • OpenAI GPT-4o-mini model: Summarizes emails and suggests tasks and replies.
  • Todoist API: Checks for tasks, creates new ones, and closes completed tasks.
  • n8n Automation Platform: Runs the entire workflow sequence combining the above APIs.

Inputs, Processing, and Outputs

Inputs

Processing Steps

  • The workflow marks unread emails as read and stars them.
  • Merges starred and unread email lists without duplicates.
  • Matches email subjects with existing Todoist tasks to skip duplicates.
  • Fetches full email content for AI summarization.
  • Processes email text with AI to produce task content, description, actions, and draft answer.
  • Validates AI output before creating new tasks in Todoist with detailed description.
  • Monitors email stars; unstarred emails prompt closing of corresponding Todoist tasks.

Output

  • Fresh Todoist tasks based on important emails, with clear AI-generated summaries and recommendations.
  • Closed Todoist tasks when related emails lose star status, keeping task list clean.

Who Should Use This Workflow

This helps people who get many important emails that require follow-up.
Users who want to stop missing emails or making repeated tasks will find it useful.
No need to be technical; basic setup of Gmail, Todoist, and OpenAI keys is needed.


Beginner Step-by-Step: How to Use This Workflow in n8n

Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor.
  3. Click “Import from File” and select the downloaded file.

Add Your Credentials

  1. Add Gmail OAuth2 credentials in the Gmail nodes.
  2. Add Todoist API Key in the Todoist nodes.
  3. Add OpenAI API Key in the AI nodes.

Update Workflow Settings

  1. Change project ID in Todoist nodes to your task project.
  2. Change Gmail label filters if needed.
  3. Copy and paste the AI prompt below to the AI summarization node exactly as shown:
You are a professional email assistant. Your task is to analyze provided email content and transform email into task. Your output will be JSON and will have:

- "content", which is exactly "{{ $json.subject }}"
- "description", which is a short summary of what this email is about and what is the whole thread point
- "actions", which is your proposition on what actions should be done before responding or closing this email thread
- "answer", which is your proposition on how to respond to this email, when all actions are done

Test and Activate

  1. Run the workflow once manually using the Manual Trigger node.
  2. Check that tasks appear in Todoist correctly with summaries and actions.
  3. Activate the workflow in n8n to run regularly or on schedule.
  4. If using self hosting, check self-host n8n for setup options.

Customizations

  • Change the AI model or edit the prompt in the AI node to fit your own email style.
  • Modify the Todoist project ID to create tasks in a different project.
  • Adjust Gmail label filters to control which emails enter the workflow.
  • Remove or disable the “Mark As Read” step if you want to keep emails unread but still generate tasks.

Troubleshooting

Gmail API Quota Limit Errors

This happens if marking many emails read and starring too often.
Try running the workflow less frequently or process emails in smaller batches.

AI Node Fails or Times Out

Check OpenAI API key is valid and internet connection is stable.
Limit how often AI is called to avoid hitting usage caps.

Todoist Tasks Not Created

Verify correct API key and project ID are set in the Todoist nodes.
Make sure data from the AI node has valid “content” and “description” fields for tasks.


Pre-Production Checklist

  • Check Gmail OAuth2 credentials work and have rights to read Inbox and labels.
  • Test AI node with example email text and see if it replies with correct JSON.
  • Confirm Todoist API key and project ID match your Todoist account.
  • Run the workflow manually to see a task created in Todoist properly.
  • Backup important Todoist data before going live, just in case.

Deployment Guide

After testing, turn on the workflow in n8n to run automatically by schedule or webhook trigger.
Check logs for any errors like API call limits or invalid data.
Adjust how often it runs based on inbox size and API quota limits.
If needed, consider self-host n8n to have more control over deployment.


Summary of Results

→ Gmail emails marked read and starred to avoid repeats.
→ AI reads full emails and makes clear task summaries with suggested next steps.
→ Todoist tasks created only if no duplicates exist, keeping task list clean.
→ Todoist tasks close automatically if email stars removed, reflecting priority changes.
→ Saves time typing and checking emails, helps organized task management.


Automate Gmail to Todoist with n8n

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

The workflow processes starred and unread emails from the Gmail Inbox.
It compares email subjects with existing open Todoist tasks before creating new tasks.
The workflow closes the matching Todoist task automatically to keep tasks updated.
Yes, the AI node supports changing the OpenAI model and editing the prompt to fit user needs.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.