Turns every new row in your Notion planning database into a Todoist task, and never sends the same row twice.

UsesNotionTodoist

Send planned work from Notion to Todoist

Every hour, your Notion planning database is checked for rows that have not yet been sent across, and a Todoist task is created for each one with the row's title as the task text and its due date carried over. The task's id is then written back to the row, which is how the same row is never sent twice.

You end up with a Todoist task for every planned row, in the project you choose or in your Inbox, with no duplicates. If the write back to Notion ever fails, the run stops on the spot and tells you which row, so at worst one task is created twice rather than the whole database being sent again next hour. A row with no title is skipped and reported. A modest batch is handled per run, so a backlog drains over a few hours instead of arriving at once.

Your database needs two properties: a text property called 'Todoist task', left empty, and a date property called 'Due date'. A row without a due date becomes a task with no date.

Run every hour.Run every hour.
Set notionDatabaseId to blank.Set notionDatabaseId to blank.
Set todoistProject to blank.Set todoistProject to blank.
Set todoistProjectId to blank.Set todoistProjectId to blank.
If todoistProject isn't emptyIf todoistProject isn't empty
Yes
TodoistTodoistList projects. Save it as todoistProjects.List projects. Save it as todoistProjects.
For each todoistProjectOption in todoistProjects:For each todoistProjectOption in todoistProjects:
If todoistProjectOption.name is todoistProject If todoistProjectOption.name is todoistProject
Yes
Change todoistProjectId to todoistProjectOption.id.Change todoistProjectId to todoistProjectOption.id.
Stop repeating.Stop repeating.
No
No steps
If todoistProjectId is blankIf todoistProjectId is blank
Yes
Stop and report a problem: There is no Todoist project called '@todoistProject'. Correct the name in the 'todoistProject' step, or clear that step to file the tasks in your Todoist Inbox.Stop and report a problem: There is no Todoist project called '@todoistProject'. Correct the name in the 'todoistProject' step, or clear that step to file the tasks in your Todoist Inbox.
No
No steps
No
No steps
Set plannedRows to an empty list.Set plannedRows to an empty list.
If a step below fails, save the error as notionErrorIf a step below fails, save the error as notionError
Try
NotionNotionFind pages in notionDatabaseId. Save it as plannedWork.Find pages in notionDatabaseId. Save it as plannedWork.
Change plannedRows to plannedWork.results.Change plannedRows to plannedWork.results.
On error
Stop and report a problem: Could not read that Notion database. Check the id in the 'notionDatabaseId' step, that the database is shared with Lodol in Notion, and that it has a text property named exactly 'Todoist task'.Stop and report a problem: Could not read that Notion database. Check the id in the 'notionDatabaseId' step, that the database is shared with Lodol in Notion, and that it has a text property named exactly 'Todoist task'.
Set createdCount to 0.Set createdCount to 0.
For each plannedRow in plannedRows:For each plannedRow in plannedRows:
Set newTaskId to blank.Set newTaskId to blank.
If a step below fails, save the error as rowErrorIf a step below fails, save the error as rowError
Try
Trim plannedRow.title and save it as taskName.Trim plannedRow.title and save it as taskName.
Set dueDate to blank.Set dueDate to blank.
If a step below fails, save the error as noDueDateIf a step below fails, save the error as noDueDate
Try
Trim plannedRow.properties["Due date"] and save it as dueValue.Trim plannedRow.properties["Due date"] and save it as dueValue.
Get the first item of the first item of dueValue split by a space split by “T” and save it as dueDay.Get the first item of the first item of dueValue split by a space split by “T” and save it as dueDay.
If the length of dueDay is 10 and dueDay contains “-”If the length of dueDay is 10 and dueDay contains “-”
Yes
Change dueDate to dueDay.Change dueDate to dueDay.
No
No steps
On error
Change dueDate to blank.Change dueDate to blank.
If taskName is emptyIf taskName is empty
Yes
Show in the output: “Skipped a row in the Notion database because it has no title.”.Show in the output: “Skipped a row in the Notion database because it has no title.”.
No
TodoistTodoistCreate task taskName. Save it as createdTask.Create task taskName. Save it as createdTask. Project ID: todoistProjectId Due date: dueDate
Trim createdTask.id and save it as newTaskId.Trim createdTask.id and save it as newTaskId.
On error
Show in the output: Could not create a Todoist task for the Notion row plannedRow.title as text: rowError as text.Show in the output: Could not create a Todoist task for the Notion row plannedRow.title as text: rowError as text.
If newTaskId isn't emptyIf newTaskId isn't empty
Yes
If a step below fails, save the error as writeBackErrorIf a step below fails, save the error as writeBackError
Try
NotionNotionUpdate plannedRow.Update plannedRow.
Add 1 to createdCount.Add 1 to createdCount.
On error
Stop and report a problem: Created the Todoist task for the Notion row plannedRow.title as text but could not write the task id back to that row, so the run stopped here rather than send the same work across again on the next run. Check that the database has a text property named exactly 'Todoist task' that Lodol is allowed to edit.Stop and report a problem: Created the Todoist task for the Notion row plannedRow.title as text but could not write the task id back to that row, so the run stopped here rather than send the same work across again on the next run. Check that the database has a text property named exactly 'Todoist task' that Lodol is allowed to edit.
No
No steps
Show in the output: Sent createdCount new row(s) from the Notion database to Todoist.Show in the output: Sent createdCount new row(s) from the Notion database to Todoist.