Turns every new row in your Notion planning database into a Todoist task, and never sends the same row twice.
UsesNotion
Todoist
Send planned work from Notion to Todoist
notionDatabaseId to blank.Set notionDatabaseId to blank.todoistProject to blank.Set todoistProject to blank.todoistProjectId to blank.Set todoistProjectId to blank.todoistProject isn't emptyIf todoistProject isn't emptyYes
todoistProjects.List projects. Save it as todoistProjects.todoistProjectOption in todoistProjects:For each todoistProjectOption in todoistProjects:todoistProjectOption.name is todoistProject If todoistProjectOption.name is todoistProjectYes
todoistProjectId to todoistProjectOption.id.Change todoistProjectId to todoistProjectOption.id.No
No steps
todoistProjectId is blankIf todoistProjectId is blankYes
No
No steps
No
No steps
plannedRows to an empty list.Set plannedRows to an empty list.notionErrorIf a step below fails, save the error as notionErrorTry
notionDatabaseId. Save it as plannedWork.Find pages in notionDatabaseId. Save it as plannedWork.plannedRows to plannedWork.results.Change plannedRows to plannedWork.results.On error
createdCount to 0.Set createdCount to 0.plannedRow in plannedRows:For each plannedRow in plannedRows:newTaskId to blank.Set newTaskId to blank.rowErrorIf a step below fails, save the error as rowErrorTry
plannedRow.title and save it as taskName.Trim plannedRow.title and save it as taskName.dueDate to blank.Set dueDate to blank.noDueDateIf a step below fails, save the error as noDueDateTry
plannedRow.properties["Due date"] and save it as dueValue.Trim plannedRow.properties["Due date"] and save it as dueValue.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.dueDay is 10 and dueDay contains -If the length of dueDay is 10 and dueDay contains -Yes
dueDate to dueDay.Change dueDate to dueDay.No
No steps
On error
dueDate to blank.Change dueDate to blank.taskName is emptyIf taskName is emptyYes
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
taskName. Save it as createdTask.Create task taskName. Save it as createdTask.
Project ID: todoistProjectId
Due date: dueDatecreatedTask.id and save it as newTaskId.Trim createdTask.id and save it as newTaskId.On error
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.newTaskId isn't emptyIf newTaskId isn't emptyYes
writeBackErrorIf a step below fails, save the error as writeBackErrorTry
plannedRow.Update plannedRow.createdCount.Add 1 to createdCount.On error
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
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.