A collection of Google Apps Script automations that create Todoist tasks from various sources.
Watches for starred Gmail messages and creates a Todoist task for each one, including a link back to the original email and cleaned body text. Unstars the message after processing.
Watches for Fireflies.ai meeting recap emails (via Gmail label), extracts action items assigned to a configured person, and creates one Todoist task per action item. Routes tasks to different Todoist projects based on which email account received the recap.
Both integrations run as a single Google Apps Script project deployed via clasp.
git clone https://github.com/stackedsax/todoist-automations.git
cd todoist-automationsnpm install- Go to https://script.google.com/home/usersettings
- Turn on the Google Apps Script API toggle
npx clasp login
npx clasp create --title "Todoist Automations" --type standalone
npx clasp push
npx clasp open- Go to Todoist Integrations and copy your API token
- In the Apps Script editor: Project Settings → Script Properties
- Add property:
TODOIST_API_TOKEN= your token
No additional configuration needed beyond the shared setup above.
Create the trigger — run this once in the Apps Script editor:
createTrigger()This creates a 1-minute time-based trigger for createTaskFromStarred.
How it works:
- Searches Gmail for starred messages
- Creates a Todoist task with the email subject +
@starred - Includes a link to the original email and cleaned body text in the description
- Unstars the email
Run these one-time setup functions in the Apps Script editor.
1. Create a setup wrapper function (paste into the editor, run once, then delete):
function setup() {
setupFirefliesLabel();
setFirefliesPersonName('Jane Smith');
setFirefliesRouting([
{ "domain": "example.com", "project": "My Project", "section": "Generated Tasks" },
{ "domain": "other.com", "project": "Other Project" }
]);
}setupFirefliesLabel()creates aFirefliesGmail label and prints filter instructionssetFirefliesPersonName()sets whose action items to extract (case-insensitive substring match —"Jane"matches"Jane Smith")setFirefliesRouting()maps sender email domains to Todoist projects/sections
The routing is based on the To: header of the incoming email, which Fireflies preserves even when emails are forwarded. Each routing rule can optionally specify a section — the section will be created automatically if it doesn't exist.
2. Create a Gmail filter
In Gmail Settings → Filters and Blocked Addresses → Create a new filter:
- From:
fred@fireflies.ai - Apply label:
Fireflies
3. Create the trigger — run once in the Apps Script editor:
createFirefliesTrigger()This creates a 5-minute time-based trigger for processFirefliesEmails.
How it works:
- Searches Gmail for unread messages with the
Fireflieslabel - Extracts the Action Items section from each recap email
- Filters action items assigned to the configured person
- Creates one Todoist task per action item, routed to the correct project and section
- Marks the email as read
Each task description includes:
- Meeting title
- Link to the Fireflies recap
- Link to the Gmail message
- Timestamp within the recording
# Push code changes to Apps Script
npx clasp push
# Open the Apps Script editor
npx clasp openFiles pushed to Apps Script:
Code.js— Gmail Stars integrationFireflies.js— Fireflies integrationappsscript.json— project manifest and OAuth scopes
"Todoist API token not found" — set TODOIST_API_TOKEN in Script Properties
"Fireflies person name not set" — run setFirefliesPersonName() as described above
Todoist project not found error — the project name in setFirefliesRouting() must exactly match the name in Todoist (case-sensitive)
Emails not being processed — confirm the Fireflies Gmail label is applied to the emails and they are marked unread
Tasks missing for long meetings — timestamps longer than mm:ss (e.g. 1:02:34) are handled correctly