Who is it for?
If you are getting a lot of emails into your Gmail inbox, then probably some of those can be solved easily by replying or by doing specific short tasks. Analyzing whole email thread content just to catch up with multiple threads can be very wasteful. By using AI, you can actually get simple propositions of what should be done before closing this specific email and an actual proposed answer to that email.
This is especially useful if you need to do some actions before replying to an email. In that case, you can simply assign a task to a specific person, await until it’s done, copy-paste the AI answer when it’s done, and close.
Another good use would be if multiple people are working in one inbox. It can make the process much more streamlined.
How It Works?
The script runs on your selected trigger. If you are using the section “Read and Star,” then you may use “Email Trigger.”
The automation looks for existing open Todoist tasks that have the same title as the email. If the task does not exist, then we ask AI to analyze the thread and provide output that is Todoist-API-ready, including:
– A summary of email content
– Proposed actions to be taken
– Proposed answer to this email
If the email was unstarred for some reason but the task was not closed, then the task is closed automatically. The script is not trying to unstar messages that have closed tasks, as this could lead to inconsistencies.
How to set up?
1. Select and set up your triggers, depending on your needs.
2. Set up connections using N8N instructions. You will need:
– Gmail
– Todoist
– AI (in this workflow, OpenAI is used)
3. (Optional) Remove the “Read and Star” section if you don’t want tasks automatically read and starred.
4. (Optional) Adjust the AI node, especially useful if you want to use a different model or have a response in a different language.
NOTE: Chat does not have memory attached on purpose. The purpose is that it should analyze each inbox message separately, not in the thread. When using memory, it can get lost easily.
NOTE 2: You might want to adjust limits on nodes “Get Unread From Inbox,” “Get Starred From Inbox,” and “Get Open Tasks,” especially if you have issues with the model complying with the output structure.
And that’s it. I hope that this automation will make your Gmail Todoist process much more streamlined!
What’s More?
There is actually more that you could do with this automation, but it really depends on your needs. For example, you could add a Form trigger to handle incoming support requests. Another option is that you could replace Todoist with Asana or any database (like NocoDB) if you are using it for your task management.