Turn starred Gmail emails into Todoist tasks every evening
Every weekday at 6pm, sweep today's starred Gmail messages and turn the ones that still need a reply into Todoist tasks with a link, a sender, and a smart due date.
Build an agent workflow that converts my starred Gmail emails into Todoist tasks at the end of each workday.
Trigger: cron, every weekday (Monday through Friday) at 6:00pm in my local timezone.
On the very first run only, check Gmail's labels via the List Labels operation and, if a label called "Todoist-Processed" does not exist, create it with Gmail's Create a Label operation. This label is what the workflow uses to remember which messages it has already turned into tasks.
Each run, call Gmail's List Messages with the search query: is:starred newer_than:1d -label:Todoist-Processed. That returns today's starred messages that have not been processed yet. For each message ID returned, call Gmail's Get a Message with format=full so the agent can read the subject, sender, snippet, and body.
For each thread, the agent should decide whether I actually owe the sender something — a reply, a decision, a piece of work, a scheduling action, or any other follow-up. If the email is pure FYI, a newsletter, a confirmation, or something already resolved in the thread, skip it.
When the agent decides a follow-up is owed, call Todoist's Create Task with these fields:
- content: a one-line summary of what I need to do, written in the imperative (e.g. "Reply to Sarah with the Q3 budget numbers").
- description: include the sender's name and a clickable link back to the Gmail thread (https://mail.google.com/mail/u/0/#inbox/<threadId>).
- project_id: my Inbox project. Use Todoist's List Projects operation once to find the Inbox project id and reuse it.
- due_string: a due date inferred from the email body if one is mentioned (e.g. "by Friday", "end of week", "tomorrow"). If nothing is specified, default to "next business day".
After the task is created successfully, call Gmail's Modify Message Labels on that message to add the Todoist-Processed label. This is how we prevent duplicates if the email stays starred or if the workflow runs again later.
If creating the Todoist task fails for a message, do not add the Todoist-Processed label so the next run retries it. Log the failure but keep processing the rest of the batch.
At the end of the run, no notification or digest is needed. The Todoist Inbox itself is the output.
Additional information
What does this prompt do?
- Sweeps today's starred Gmail messages every weekday at 6pm so nothing falls through the cracks.
- An agent reads each thread and decides whether you actually owe someone a reply, a decision, or a piece of work.
- Adds the ones that need follow-up to your Todoist Inbox with a one-line summary, the sender's name, a link back to the email, and a due date pulled from the message.
- Skips pure FYI emails and avoids creating duplicates on the next run by labeling messages it has already processed.
What do I need to use this?
- A Gmail account you can star messages in.
- A Todoist account (free or paid) with an Inbox project.
- A simple habit of starring the emails you want to keep an eye on.
How can I customize it?
- Change the schedule. Run it at noon, after the workday, or twice a day instead of once.
- Send tasks to a different Todoist project or section instead of Inbox, like Work or Follow-ups.
- Swap the trigger filter. Use a custom Gmail label like Action instead of stars, or combine both.
- Adjust the default due date the agent uses when the email does not name a deadline, for example same day vs next business day.
Frequently asked questions
Will it create duplicate tasks if I leave the email starred?
Can I use a Gmail label other than starred?
How does it pick a due date?
Where do the tasks show up in Todoist?
What happens to emails that do not need a response?
Stop letting starred emails pile up.
Connect Gmail and Todoist once, and Geni turns every email you star into a real task every weekday at 6pm.