{
  "name": "Realtime Notion Todoist 2-way sync with Redis",
  "nodes": [
    {
      "id": "eb7c1dae-e8e2-4737-b52c-03d866e3ea3d",
      "name": "Get Notion Databases",
      "type": "n8n-nodes-base.notion",
      "position": [
        -4208,
        1008
      ]
    },
    {
      "id": "64a5276b-2dfa-47ef-8f3d-04b5da8ced40",
      "name": "Prep Dropdown",
      "type": "n8n-nodes-base.code",
      "position": [
        -4000,
        1008
      ]
    },
    {
      "id": "3d5cba34-8b6b-4048-960c-da405680de7b",
      "name": "Prep Dropdown1",
      "type": "n8n-nodes-base.code",
      "position": [
        -3120,
        1008
      ]
    },
    {
      "id": "889c6cfb-90c4-4d0d-9df7-d44c2012be7c",
      "name": "Generate config",
      "type": "n8n-nodes-base.code",
      "position": [
        -2240,
        1008
      ]
    },
    {
      "id": "0de726dd-68be-49ab-ae2f-96c1e1240c51",
      "name": "Choose Notion Database",
      "type": "n8n-nodes-base.form",
      "position": [
        -3776,
        1008
      ]
    },
    {
      "id": "5e2ae4fe-283e-41ef-bfee-c036f657fcea",
      "name": "Choose Todoist Project",
      "type": "n8n-nodes-base.form",
      "position": [
        -2896,
        1008
      ]
    },
    {
      "id": "0eedfa42-ecda-4ce4-81fb-88f722fa8fc2",
      "name": "Verify security token",
      "type": "n8n-nodes-base.if",
      "position": [
        -3216,
        1728
      ]
    },
    {
      "id": "a98c32b2-cc60-45c5-8f03-8174dfc4a25d",
      "name": "Generate security token",
      "type": "n8n-nodes-base.crypto",
      "position": [
        -3440,
        1360
      ]
    },
    {
      "id": "62e95455-6e10-481a-a96f-a04adf0ad100",
      "name": "Store variables",
      "type": "n8n-nodes-base.code",
      "position": [
        -3216,
        1360
      ]
    },
    {
      "id": "b6ec1fc1-fd53-4b21-aedf-51b0c3b36634",
      "name": "Get variables",
      "type": "n8n-nodes-base.code",
      "position": [
        -3440,
        1728
      ]
    },
    {
      "id": "ee4b4407-5b81-4e26-9439-c1e7be32e4d6",
      "name": "Redirect to Auth Page",
      "type": "n8n-nodes-base.form",
      "position": [
        -2992,
        1360
      ]
    },
    {
      "id": "cb2123b2-50cf-4488-b225-f39d35d81626",
      "name": "OAuth redirect",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3648,
        1728
      ]
    },
    {
      "id": "f7f257c1-022d-466d-861c-473078c46a2c",
      "name": "Exchange Tokens",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2992,
        1632
      ]
    },
    {
      "id": "75f299bb-e036-4888-8768-4bd81d8eb1b1",
      "name": "Respond with success",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -2768,
        1520
      ]
    },
    {
      "id": "c0ca1309-1395-44ce-9658-8aa455c98e96",
      "name": "Respond with error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -2768,
        1728
      ]
    },
    {
      "id": "93467680-86a0-4b74-9d51-2add04bec4d8",
      "name": "Get Notion Database ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -3552,
        1008
      ]
    },
    {
      "id": "1a818dea-c4bc-4923-a8f3-2e0caec46c38",
      "name": "Get Todoist Project ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -2672,
        1008
      ]
    },
    {
      "id": "8451cfb8-459a-4108-8034-fe50a9383936",
      "name": "Notion-Todoist Sync Setup Helper",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -4432,
        1008
      ]
    },
    {
      "id": "91d0410a-ce94-4d65-84ef-772b6e572fa0",
      "name": "Todoist Webhook Setup Helper",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -3648,
        1360
      ]
    },
    {
      "id": "b301dc26-0493-4725-9a88-f4b2e9038a0e",
      "name": "Return config JSON",
      "type": "n8n-nodes-base.form",
      "position": [
        -2016,
        1008
      ]
    },
    {
      "id": "7e0552d0-f21b-4a8d-aef1-69c8efbc245c",
      "name": "Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        352,
        1152
      ]
    },
    {
      "id": "13634b4a-3e5f-44d7-b666-8f2cf38588aa",
      "name": "Compare Datasets",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        784,
        1248
      ]
    },
    {
      "id": "adbb2f90-016d-4e36-9a36-c0e7cec0902a",
      "name": "Exists/Completed in Notion",
      "type": "n8n-nodes-base.if",
      "position": [
        1248,
        1968
      ]
    },
    {
      "id": "7ac57f7e-c699-4f50-80b5-9eda9991fbd6",
      "name": "If Todoist ID exists",
      "type": "n8n-nodes-base.if",
      "position": [
        1472,
        560
      ]
    },
    {
      "id": "13c14df3-3233-49b2-a693-8413274b9006",
      "name": "Store Todoist ID",
      "type": "n8n-nodes-base.notion",
      "position": [
        2560,
        560
      ]
    },
    {
      "id": "d50fce0f-ee3d-49d9-a5af-8416ab2958cf",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1024,
        2064
      ]
    },
    {
      "id": "ded60dc9-a31c-4ab5-9c63-0af2a91ca345",
      "name": "Get Notion Task",
      "type": "n8n-nodes-base.notion",
      "position": [
        1248,
        2160
      ]
    },
    {
      "id": "e5a4016d-9cd2-4709-8dd4-bc3cba04f085",
      "name": "Update Task in Todoist",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1248,
        1264
      ]
    },
    {
      "id": "916699fd-f3ad-4bcf-abff-bb0ca710008c",
      "name": "Pick Todoist Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        1344
      ]
    },
    {
      "id": "d2d381cb-4a2c-4266-b3aa-22650fb8f783",
      "name": "Map Notion to Todoist",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        1152
      ]
    },
    {
      "id": "70bf0c95-8ad2-4bc1-a0b2-8d1418e9ffa5",
      "name": "Update task in Todoist before closing",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1904,
        1872
      ]
    },
    {
      "id": "d4f88e89-7fad-4318-8b4f-e113db81c0d4",
      "name": "Map Notion to Todoist1",
      "type": "n8n-nodes-base.code",
      "position": [
        1472,
        1872
      ]
    },
    {
      "id": "885a0518-253d-47fa-ab65-7e04720d4a68",
      "name": "Handle empty dates",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        1264
      ]
    },
    {
      "id": "600349b6-0388-4023-b696-9ca6dce23a28",
      "name": "Handle empty dates1",
      "type": "n8n-nodes-base.code",
      "position": [
        1680,
        1872
      ]
    },
    {
      "id": "a6119ab9-a664-4252-9d81-9e916c4e994c",
      "name": "Handle empty dates2",
      "type": "n8n-nodes-base.code",
      "position": [
        1024,
        560
      ]
    },
    {
      "id": "7584eb97-9494-4b75-96f2-e6167bf398ef",
      "name": "Create task in Todoist",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2352,
        464
      ]
    },
    {
      "id": "1d3da76d-c8ad-48d5-bc5e-c2b42cca762b",
      "name": "Add project ID",
      "type": "n8n-nodes-base.set",
      "position": [
        1248,
        560
      ]
    },
    {
      "id": "2b236f8d-122a-48c6-b372-a0c3deb9b35e",
      "name": "Lock Todoist ID",
      "type": "n8n-nodes-base.redis",
      "position": [
        2560,
        368
      ]
    },
    {
      "id": "f935bbc8-c1af-40a1-856e-5027fdf80cf8",
      "name": "Generate UUID",
      "type": "n8n-nodes-base.crypto",
      "position": [
        3440,
        672
      ]
    },
    {
      "id": "f63d9166-c190-4258-a38a-cd0a8056378e",
      "name": "Update section (Sync API)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4112,
        672
      ]
    },
    {
      "id": "b2ffce7f-b7ff-406d-b51c-7f8d0457fb4d",
      "name": "Status changed",
      "type": "n8n-nodes-base.filter",
      "position": [
        1472,
        1264
      ]
    },
    {
      "id": "980b5184-5d1e-467c-913d-ad22e8cb5cd9",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3888,
        672
      ]
    },
    {
      "id": "6dae7405-82a7-4b1e-a717-14e33af79b73",
      "name": "Prepare Batching Items",
      "type": "n8n-nodes-base.set",
      "position": [
        3664,
        672
      ]
    },
    {
      "id": "9a7a71ba-2106-4df4-9745-a5c462919477",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3232,
        560
      ]
    },
    {
      "id": "1d81b7eb-21e2-42ee-b1e3-f88b9aaff6b9",
      "name": "Status is Done",
      "type": "n8n-nodes-base.if",
      "position": [
        2128,
        1968
      ]
    },
    {
      "id": "3a38857c-6438-4393-bff5-0bd796418967",
      "name": "Lock Todoist ID1",
      "type": "n8n-nodes-base.redis",
      "position": [
        2128,
        1760
      ]
    },
    {
      "id": "a7f5822f-0816-4aac-b3c8-3fbf41cd61d1",
      "name": "Lock Todoist ID2",
      "type": "n8n-nodes-base.redis",
      "position": [
        1472,
        1072
      ]
    },
    {
      "id": "282277d9-7136-4cfd-9925-eaaf765e4489",
      "name": "Update task in Todoist",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2560,
        160
      ]
    },
    {
      "id": "3433ea76-1c46-469d-81cf-a8bd090b445c",
      "name": "Get mapped item",
      "type": "n8n-nodes-base.set",
      "position": [
        2784,
        160
      ]
    },
    {
      "id": "65f9b104-c6ca-47f3-82c9-f0e44a2f3548",
      "name": "Get mapped item1",
      "type": "n8n-nodes-base.set",
      "position": [
        2368,
        1264
      ]
    },
    {
      "id": "0c4eb2c6-84a5-4ccb-a06b-05dae30d3744",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        128,
        1248
      ]
    },
    {
      "id": "a074f47b-0edf-4ac9-a46b-1ec1cd6ab31d",
      "name": "Prepare summary data",
      "type": "n8n-nodes-base.set",
      "position": [
        1472,
        1472
      ]
    },
    {
      "id": "28dd1ba0-2e01-40f5-b4d5-411ca819f626",
      "name": "Prepare summary data1",
      "type": "n8n-nodes-base.set",
      "position": [
        2560,
        1872
      ]
    },
    {
      "id": "c0c3d6b0-dbee-4557-ab5b-c3e88964c538",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        3008,
        560
      ]
    },
    {
      "id": "576c41ef-2575-4132-8551-546043d3688f",
      "name": "Prepare summary data2",
      "type": "n8n-nodes-base.set",
      "position": [
        2560,
        2064
      ]
    },
    {
      "id": "0f795337-994f-434e-bd67-c6e65edcde72",
      "name": "Filter out status changes",
      "type": "n8n-nodes-base.filter",
      "position": [
        3472,
        1472
      ]
    },
    {
      "id": "58ac9f22-5da5-4164-8a17-eaea51be6ec0",
      "name": "Map Todoist to Notion",
      "type": "n8n-nodes-base.code",
      "position": [
        3680,
        1472
      ]
    },
    {
      "id": "6ef7f30e-c4d5-48cd-bb61-5b271cb2a439",
      "name": "Map summary fields",
      "type": "n8n-nodes-base.set",
      "position": [
        3904,
        1472
      ]
    },
    {
      "id": "abb6c26e-ac98-41d9-9b28-9d276ed3ef95",
      "name": "Convert to HTML Table",
      "type": "n8n-nodes-base.html",
      "position": [
        4128,
        1472
      ]
    },
    {
      "id": "3dfea9f2-2dd1-4c24-819f-4e16c3025d50",
      "name": "Generate email body",
      "type": "n8n-nodes-base.html",
      "position": [
        4352,
        1472
      ]
    },
    {
      "id": "2ae5fe04-aca6-4261-b401-dee5a68900d0",
      "name": "Get mapped item2",
      "type": "n8n-nodes-base.set",
      "position": [
        2784,
        560
      ]
    },
    {
      "id": "a9f2ddd6-0969-4b39-990d-e868608e997e",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4560,
        1472
      ]
    },
    {
      "id": "320e3f1a-5816-48ee-8840-b30067b7ef20",
      "name": "Merge summary",
      "type": "n8n-nodes-base.merge",
      "position": [
        3248,
        1424
      ]
    },
    {
      "id": "94e25c6d-e8d7-48c4-ae58-d38139e688bc",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        1008
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "## Keep in sync\nif you update the mapping, make sure to change it in the other node as well!"
      }
    },
    {
      "id": "420726ab-7bb1-40b9-a17a-f1419a91c30d",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        1728
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "## Keep in sync\nif you update the mapping, make sure to change it in the other node as well!"
      }
    },
    {
      "id": "6c986320-3740-4b61-805e-7f2b7f8248d5",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        768
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "## Set Globals\nUse Sync Setup Helper Workflow to generate the JSON and paste it in every Globals Nodes"
      }
    },
    {
      "id": "042c7cde-3019-458c-b36e-3c54f5af3a29",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        352,
        912
      ]
    },
    {
      "id": "8dd5f05c-43d3-44b2-9e6e-7e27f20cd89e",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3168,
        480
      ],
      "parameters": {
        "width": 1100,
        "height": 380,
        "content": "Update section for each task in Todoist using the Sync API in full sync mode. Use batching and split into multiple batches, if needed, since there is a request limit of 100 full syncs within a 15 minu"
      }
    },
    {
      "id": "592be3f9-1cde-43ba-8511-7d58d5312291",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 4760,
        "height": 2420,
        "content": "# Unidirectional sync from Notion to Todoist"
      }
    },
    {
      "id": "9ebde276-e412-4be7-a98e-67f163185cc4",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        1072
      ],
      "parameters": {
        "width": 220,
        "height": 440,
        "content": "Get open/incomplete tasks from both Notion and Todoist"
      }
    },
    {
      "id": "d9bcd8b7-c488-43ef-9fc5-c63b27b58e44",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3408,
        1408
      ],
      "parameters": {
        "width": 1100,
        "height": 220,
        "content": "Generate an email report containing all changes made by this workflow, since changes in Todoist are being overwritten."
      }
    },
    {
      "id": "90e22a4a-0b52-409c-86e4-a3d0f7c66645",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        160,
        4288
      ]
    },
    {
      "id": "7d478659-6ddd-47ab-8b0b-321864a87529",
      "name": "Differences exist1",
      "type": "n8n-nodes-base.filter",
      "position": [
        4352,
        3472
      ]
    },
    {
      "id": "701ff2f5-d63b-4882-9307-4c96942469d7",
      "name": "Requires completion change1",
      "type": "n8n-nodes-base.filter",
      "position": [
        4352,
        3840
      ]
    },
    {
      "id": "a92bafa8-4e50-4f15-b29c-89c44d8df64c",
      "name": "Create task in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        4784,
        2960
      ]
    },
    {
      "id": "ccbc881a-8610-4b50-8750-297e28e58994",
      "name": "Update task in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        5008,
        3472
      ]
    },
    {
      "id": "ae97e1bc-c522-4906-8a74-e7aa1355bf21",
      "name": "Mark as Done in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        5008,
        4128
      ]
    },
    {
      "id": "19cbf129-3523-49b4-9d4f-dcbd53e3cd93",
      "name": "Mark as Obsolete in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        5008,
        4448
      ]
    },
    {
      "id": "28abcbbc-2c06-49e8-a840-ee17fb748327",
      "name": "Mark as In Progress in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        5008,
        3920
      ]
    },
    {
      "id": "2ac0d5f3-04f2-489e-b0ae-bc1bb4a209af",
      "name": "Only continue if not locked",
      "type": "n8n-nodes-base.filter",
      "position": [
        1232,
        3648
      ]
    },
    {
      "id": "55be7955-0931-40f8-8698-8f3413d967b8",
      "name": "Lock Notion ID",
      "type": "n8n-nodes-base.redis",
      "position": [
        5664,
        3792
      ]
    },
    {
      "id": "42f7cb4b-1293-4a45-a2d3-6d63150a1c52",
      "name": "Check if Todoist ID is locked",
      "type": "n8n-nodes-base.redis",
      "position": [
        1008,
        3648
      ]
    },
    {
      "id": "4c62e8f7-6422-4665-8dc0-66d66cf0fcda",
      "name": "Description has changed in Todoist",
      "type": "n8n-nodes-base.filter",
      "position": [
        4352,
        3664
      ]
    },
    {
      "id": "e8b8725c-1b18-4c5f-8ca6-7d0efa990ad0",
      "name": "Generate UUID1",
      "type": "n8n-nodes-base.crypto",
      "position": [
        4784,
        3184
      ]
    },
    {
      "id": "cb44b2f7-c442-4419-952a-70450494d212",
      "name": "Update section (Sync API)1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5008,
        3184
      ]
    },
    {
      "id": "61268948-545e-4b85-a4c5-957410f4e812",
      "name": "Get Backlog Section ID",
      "type": "n8n-nodes-base.code",
      "position": [
        4560,
        3184
      ]
    },
    {
      "id": "a8f1aa4d-19fe-4488-9731-113f75b515c9",
      "name": "Notion Task not found",
      "type": "n8n-nodes-base.if",
      "position": [
        3648,
        3504
      ]
    },
    {
      "id": "f9abbf61-09a8-4dc1-b307-18169a292528",
      "name": "Check if creating flag exists1",
      "type": "n8n-nodes-base.redis",
      "position": [
        3904,
        3184
      ]
    },
    {
      "id": "6c340ed3-9744-4dbb-9ce9-5aee85679446",
      "name": "Only continue if flag does not exist1",
      "type": "n8n-nodes-base.filter",
      "position": [
        4128,
        3184
      ]
    },
    {
      "id": "48154fcc-fb0c-4665-91e4-36d9a61a6d1e",
      "name": "Set creating flag1",
      "type": "n8n-nodes-base.redis",
      "position": [
        4352,
        3184
      ]
    },
    {
      "id": "dc0baa21-e5a8-45a0-90ae-112a1efd71c3",
      "name": "Neither focussed nor planned1",
      "type": "n8n-nodes-base.filter",
      "position": [
        4784,
        3760
      ]
    },
    {
      "id": "f516c7cc-8d63-4562-9b07-c00c77f0a88f",
      "name": "Mark as Focussed in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        5008,
        3664
      ]
    },
    {
      "id": "59a433c7-a3de-4288-9a2a-9611398817af",
      "name": "Todoist trigger reference",
      "type": "n8n-nodes-base.noOp",
      "position": [
        560,
        3648
      ]
    },
    {
      "id": "d5bace77-110a-4e41-9298-ed2f5e577c5d",
      "name": "Get Notion Task2",
      "type": "n8n-nodes-base.notion",
      "position": [
        4128,
        4448
      ]
    },
    {
      "id": "e76b8281-13e2-46f2-afb7-8dd6c04d8445",
      "name": "Notion Task found1",
      "type": "n8n-nodes-base.filter",
      "position": [
        4352,
        4448
      ]
    },
    {
      "id": "d9b1e08f-7ad2-4819-853e-5ff6d7757f42",
      "name": "Switch by Event",
      "type": "n8n-nodes-base.switch",
      "position": [
        4128,
        3664
      ]
    },
    {
      "id": "4de43cba-eabc-4aea-b078-8cf9deb6171a",
      "name": "If event is not :deleted",
      "type": "n8n-nodes-base.if",
      "position": [
        1440,
        3648
      ]
    },
    {
      "id": "b0301431-62c3-4bf9-81f5-a24581b6cd63",
      "name": "Execution Data",
      "type": "n8n-nodes-base.executionData",
      "position": [
        784,
        3648
      ]
    },
    {
      "id": "c1f98369-7daa-42bb-a104-6c5beb256ed6",
      "name": "Execution Data1",
      "type": "n8n-nodes-base.executionData",
      "position": [
        3200,
        3504
      ]
    },
    {
      "id": "d818a7cb-5aed-4fbd-a38b-4dac99338509",
      "name": "Execution Data2",
      "type": "n8n-nodes-base.executionData",
      "position": [
        5008,
        2960
      ]
    },
    {
      "id": "dcfac69b-2f8a-4c2c-839d-c68281b6fcf7",
      "name": "Execution Data3",
      "type": "n8n-nodes-base.executionData",
      "position": [
        3904,
        3664
      ]
    },
    {
      "id": "cd29c4e7-5b18-4c57-afbe-414d2b6ffa4a",
      "name": "Execution Data4",
      "type": "n8n-nodes-base.executionData",
      "position": [
        4560,
        4448
      ]
    },
    {
      "id": "0c877641-ba30-47e8-be82-da2c5356134f",
      "name": "Globals1",
      "type": "n8n-nodes-base.set",
      "position": [
        784,
        3392
      ]
    },
    {
      "id": "4d97d7a1-8cbc-4623-a5c0-5d8b4170cf1a",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        3248
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "## Set Globals\nUse Sync Setup Helper Workflow to generate the JSON and paste it in every Globals Nodes"
      }
    },
    {
      "id": "16f15140-f522-4e43-8695-cff75f53edd9",
      "name": "Map Todoist to Notion1",
      "type": "n8n-nodes-base.code",
      "position": [
        2992,
        3504
      ]
    },
    {
      "id": "51490ccf-5766-4b61-a08b-3a252cac7369",
      "name": "Get Notion Task1",
      "type": "n8n-nodes-base.notion",
      "position": [
        3424,
        3504
      ]
    },
    {
      "id": "fd92b43b-22df-4b27-974e-5bac2e4a5784",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3152,
        3408
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Store more information, which was not available earlier"
      }
    },
    {
      "id": "954b5ae9-7b2d-47a4-913d-7e41ba0b1089",
      "name": "Sticky Note26",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4720,
        2880
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Set focussed flag, so it remains in Todoist even after updating in Notion"
      }
    },
    {
      "id": "e0ecb1f7-fde2-4897-8ef9-6ee2e49e61f4",
      "name": "Sticky Note27",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3824,
        2624
      ],
      "parameters": {
        "width": 1800,
        "height": 760,
        "content": "**Create Notion page** if it does not exist"
      }
    },
    {
      "id": "e393000a-a0a6-49d6-bc78-fafcc3a16630",
      "name": "Sticky Note28",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3824,
        3408
      ],
      "parameters": {
        "width": 1340,
        "height": 900,
        "content": "**Update Notion page** if it needs to be changed"
      }
    },
    {
      "id": "bc7f5877-5779-4a1e-9041-e1eae44509e7",
      "name": "Sticky Note29",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        3552
      ],
      "parameters": {
        "width": 440,
        "height": 280,
        "content": "Checking for a cached flag in Redis, to prevent overrides and endless loops."
      }
    },
    {
      "id": "e26c6f9f-8f71-4e97-b06f-733a01d01c8e",
      "name": "Sticky Note31",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3360,
        3408
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Retrieve Notion page, so it can be compared against"
      }
    },
    {
      "id": "70bbc817-bd35-47a9-8021-05974b312d97",
      "name": "Sticky Note32",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3840,
        3568
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Store more information, which was not available earlier"
      }
    },
    {
      "id": "23c61b3f-2ded-48b8-8149-7b1b7913321b",
      "name": "Sticky Note33",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        3552
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Store relevant information in highlighted execution data, in case of debugging"
      }
    },
    {
      "id": "55f88261-4e7b-4f45-ab46-dc6732a41693",
      "name": "Sticky Note35",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        2528
      ],
      "parameters": {
        "width": 5880,
        "height": 2160,
        "content": "## Trigger based synchronization from Todoist to Notion (part of bi-directional sync)"
      }
    },
    {
      "id": "ae1dd724-c252-4495-9a81-04e8321b5708",
      "name": "Sticky Note36",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        3552
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Following nodes reference to this node, so the trigger can easily be replaced"
      }
    },
    {
      "id": "745a227c-f7ba-4bd8-b0a5-7361ac472c15",
      "name": "Sticky Note37",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3840,
        3120
      ],
      "parameters": {
        "width": 660,
        "height": 240,
        "content": "This prevents the creation of duplicates in Notion, by storing a special flag in Redis containing the Todoist ID"
      }
    },
    {
      "id": "ab8ec957-de25-4781-84ce-57b86270264f",
      "name": "Requires completion change",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1408,
        3312
      ]
    },
    {
      "id": "7fe015f5-f570-4222-be21-e0308ff4cc52",
      "name": "Has been completed?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1200,
        3312
      ]
    },
    {
      "id": "d624e9df-af79-4cf3-9003-b828920c75e4",
      "name": "Differences exist",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1408,
        3008
      ]
    },
    {
      "id": "31a7d994-b88c-4b7a-977a-9b46ecd7adc6",
      "name": "Only continue if not locked1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -4320,
        3792
      ]
    },
    {
      "id": "603bf6fa-948c-4c57-9ff8-4442ba7f4e0c",
      "name": "Check if Notion ID is locked",
      "type": "n8n-nodes-base.redis",
      "position": [
        -4528,
        3792
      ]
    },
    {
      "id": "9c507809-43f7-4f3c-857a-cf3b881e17af",
      "name": "Get Notion task",
      "type": "n8n-nodes-base.notion",
      "position": [
        -4096,
        3792
      ]
    },
    {
      "id": "09a66ea3-2f4b-46f9-849b-9b29c684741e",
      "name": "Check if creating flag exists",
      "type": "n8n-nodes-base.redis",
      "position": [
        -1200,
        4144
      ]
    },
    {
      "id": "4f732b98-d9c3-409e-a599-6a7e4231e090",
      "name": "Only continue if flag does not exist",
      "type": "n8n-nodes-base.filter",
      "position": [
        -976,
        4144
      ]
    },
    {
      "id": "928cf849-8f7b-4305-943c-14c2d5dca80e",
      "name": "Set creating flag",
      "type": "n8n-nodes-base.redis",
      "position": [
        -752,
        4144
      ]
    },
    {
      "id": "c102e42e-f5e5-4f5b-867e-eb4c8b3f82cb",
      "name": "Todoist ID exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2992,
        3984
      ]
    },
    {
      "id": "8a1a4a6f-b62e-4deb-87a9-8b1cad2a8113",
      "name": "Get todoist ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -752,
        3312
      ]
    },
    {
      "id": "1d50b73d-6112-413e-917e-4fa8ffd3a305",
      "name": "Todoist ID exists",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1408,
        2752
      ]
    },
    {
      "id": "bafd5c1d-f31c-4ba3-aac1-6f707cacf544",
      "name": "Get todoist ID1",
      "type": "n8n-nodes-base.set",
      "position": [
        -752,
        2752
      ]
    },
    {
      "id": "ec289a95-eef7-4766-b6f0-8e4a6af08e69",
      "name": "Status changed but not empty",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1408,
        3648
      ]
    },
    {
      "id": "38e9f79a-90f6-44bc-aad7-66640bad7af4",
      "name": "Status is Obsolete?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3440,
        3792
      ]
    },
    {
      "id": "cd925504-d160-48c3-b32c-a51242045ea5",
      "name": "Status is not Done",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1408,
        3984
      ]
    },
    {
      "id": "f90cc083-dede-4a22-bc17-8979f21e5acc",
      "name": "Neither focussed nor planned",
      "type": "n8n-nodes-base.if",
      "position": [
        -3216,
        3888
      ]
    },
    {
      "id": "69ea9a28-fb41-464a-ab6f-9ace04b9fb8a",
      "name": "Notion trigger reference",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -4976,
        3792
      ]
    },
    {
      "id": "0ae6801f-5601-4e1f-903e-6e07e257e183",
      "name": "Notion Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -5856,
        3792
      ]
    },
    {
      "id": "3823b150-f046-4e7d-a1dd-e28def7426b1",
      "name": "Store Todoist ID1",
      "type": "n8n-nodes-base.notion",
      "position": [
        -320,
        4240
      ]
    },
    {
      "id": "047eaf3b-dda3-49be-8554-96d1937b41e3",
      "name": "Update task in Todoist1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -976,
        3008
      ]
    },
    {
      "id": "4faf9286-8503-48a5-9eb4-330b7cb1bede",
      "name": "Globals2",
      "type": "n8n-nodes-base.set",
      "position": [
        -4752,
        3520
      ]
    },
    {
      "id": "6cdcc99b-9b72-4686-aa1f-411643bed866",
      "name": "Generate UUID2",
      "type": "n8n-nodes-base.crypto",
      "position": [
        -1200,
        3648
      ]
    },
    {
      "id": "5e2c1fbe-4a3a-4d02-8c87-81ef5a748580",
      "name": "Update section (Sync API)2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -976,
        3648
      ]
    },
    {
      "id": "30d90ce3-01fe-4a06-869e-3f813076054d",
      "name": "Lock Todoist ID4",
      "type": "n8n-nodes-base.redis",
      "position": [
        -320,
        3328
      ]
    },
    {
      "id": "59d5f274-22f7-499b-8a98-a0a204f6fab3",
      "name": "Map Notion to Todoist2",
      "type": "n8n-nodes-base.code",
      "position": [
        -3872,
        3792
      ]
    },
    {
      "id": "a543f401-6cef-466e-9750-a3aa46921839",
      "name": "Create task in Todoist1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -528,
        4144
      ]
    },
    {
      "id": "8b9ee794-9393-4efd-bab3-277ae8d23e5c",
      "name": "Execution Data5",
      "type": "n8n-nodes-base.executionData",
      "position": [
        -4752,
        3792
      ]
    },
    {
      "id": "31d22239-04a3-4bb5-8d3c-a237956f52cb",
      "name": "Execution Data6",
      "type": "n8n-nodes-base.executionData",
      "position": [
        -3648,
        3792
      ]
    },
    {
      "id": "e7478750-dd49-4fea-9f4e-1f1f9d2aff19",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        3584
      ],
      "parameters": {
        "width": 440,
        "height": 220,
        "content": "Update section for in Todoist using the Sync API in full sync mode (**maximum of 100 requests within a 15 minute period!**)"
      }
    },
    {
      "id": "f4bc11bc-25e3-4fb8-94df-c0699d4bfecd",
      "name": "Sticky Note24",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        2624
      ],
      "parameters": {
        "width": 900,
        "height": 300,
        "content": "**Delete the task** if it does not fit into the filter anymore"
      }
    },
    {
      "id": "02a5f1ed-8fe8-4fb0-9e5d-9795baa1b7ac",
      "name": "Sticky Note25",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        2944
      ],
      "parameters": {
        "width": 900,
        "height": 880,
        "content": "**Update the task** if it needs to be changed"
      }
    },
    {
      "id": "6b6b061c-7a38-409a-81bf-2a83d7096b03",
      "name": "Sticky Note38",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4160,
        3680
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Notion tries to deliver webhooks again. To ensure the data is up to date, the payload must be retrieved again."
      }
    },
    {
      "id": "cc460728-f0e8-4983-a3b8-e5d9e713428f",
      "name": "Sticky Note39",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4816,
        3392
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "## Set Globals\nUse Sync Setup Helper Workflow to generate the JSON and paste it in every Globals Nodes"
      }
    },
    {
      "id": "75760ac8-20f4-448f-acb6-d4f6fe479b4b",
      "name": "Sticky Note41",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        2672
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Continues on error, so it is not necessary to retrieve task beforehand"
      }
    },
    {
      "id": "63951e16-a655-4b5f-bcbd-c4cb1a86fe85",
      "name": "Sticky Note42",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5040,
        3680
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Following nodes reference to this node, so the trigger can easily be replaced"
      }
    },
    {
      "id": "78adbf86-3a16-463e-af73-308e2af5bc52",
      "name": "Sticky Note43",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4816,
        3680
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Store relevant information in highlighted execution data, in case of debugging"
      }
    },
    {
      "id": "2fc80f2d-e129-47a3-811f-9f72a37e3efd",
      "name": "Sticky Note44",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3712,
        3680
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Store more information, which was not available earlier"
      }
    },
    {
      "id": "d7d6f090-739b-4702-a060-82af185e391c",
      "name": "Sticky Note45",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3488,
        3680
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Instead of deleting pages in Notion, it is a safer practice to mark them as obsolete instead."
      }
    },
    {
      "id": "e7faf2fc-8e29-4a68-8733-1bccb913146a",
      "name": "Sticky Note46",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        4064
      ],
      "parameters": {
        "width": 660,
        "height": 260,
        "content": "In rare cases Notion fires multiple webhooks within a short period of time, when creating a new task. This prevents the creation of duplicates in Todoist."
      }
    },
    {
      "id": "f720ffee-118c-4403-8fa8-080a652c1369",
      "name": "Sticky Note47",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3936,
        3680
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "The mapping is more advanced and also includes fall-back values for edge-cases"
      }
    },
    {
      "id": "636920c8-26b4-4cb0-8e71-1504de6f2509",
      "name": "Sticky Note48",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4592,
        3680
      ],
      "parameters": {
        "width": 440,
        "height": 280,
        "content": "Checking for a cached flag in Redis, to prevent overrides and endless loops."
      }
    },
    {
      "id": "b537e6a8-ee78-4cba-b53e-2479849a8923",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5984,
        2528
      ],
      "parameters": {
        "width": 5880,
        "height": 1960,
        "content": "# Trigger based synchronization from Notion to Todoist (part of bi-directional sync)"
      }
    },
    {
      "id": "8656bef8-f892-4b52-8fb5-0838ce116e9d",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5920,
        3568
      ],
      "parameters": {
        "width": 220,
        "height": 400,
        "content": "## Configure Webhook\nGrab the webhook URL and use it in the Notion automation. If using the NotionWebhookEmulator instead, replace this node with the nodes shown below."
      }
    },
    {
      "id": "98e18263-7eb7-4cfb-9cd2-92e6839eb4c1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3280,
        3792
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Only sync focussed & planned tasks for efficiency reasons"
      }
    },
    {
      "id": "2c9c1297-2ea7-4e2a-b643-4fcc3fe67ccd",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3056,
        3872
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "The mapping between the Notion and Todoist tasks is stored in Notion"
      }
    },
    {
      "id": "f81777ea-c442-4043-96c8-362b09b4bcbd",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        3200
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "The Todoist ID is being cached in Redis for 15 seconds, so the other Diff sync does not get triggered."
      }
    },
    {
      "id": "b1beacba-9ced-4d65-8355-f65622bc3dec",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        3840
      ],
      "parameters": {
        "width": 1340,
        "height": 580,
        "content": "**Create task** if it does not exist (anymore)"
      }
    },
    {
      "id": "e122cda3-d660-43b2-a8c9-eafefe95f103",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        3904
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Edge case: the task has been moved from Obsolete to Done"
      }
    },
    {
      "id": "4750723e-3185-40b3-9ed4-27bef4ce01ef",
      "name": "Sticky Note49",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        3920
      ],
      "parameters": {
        "width": 1020,
        "height": 700,
        "content": "## Todoist Webhook Router Example (optional)\nSince Todoist sends the updates of all projects to a single webhook, the requests need to be routed accordingly.\nTo do so, create a separate workflow, each"
      }
    },
    {
      "id": "432f4e35-5715-42cc-89d5-4574686479cb",
      "name": "Sticky Note51",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        3552
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Using the event type from Todoist is the only option to actually recognize, if a task was deleted"
      }
    },
    {
      "id": "f954da6d-1315-42c5-a06c-78852a57dc94",
      "name": "Sticky Note52",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2928,
        3408
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "The mapping is more advanced and also includes fall-back values for edge-cases"
      }
    },
    {
      "id": "7e676dd4-f84e-44ed-9425-ad09c4343419",
      "name": "Sticky Note53",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3584,
        3408
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "Previous node always returns output data, since it uses a filter to retrieve a matching item"
      }
    },
    {
      "id": "15acbd0d-27d9-43a5-b546-fb9a3dd87ec0",
      "name": "Sticky Note54",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4512,
        3120
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Reverse mapping the Section/Status"
      }
    },
    {
      "id": "507f7bb9-3542-4916-b232-aac13d717b36",
      "name": "Sticky Note55",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4720,
        3120
      ],
      "parameters": {
        "width": 440,
        "height": 240,
        "content": "Update section for in Todoist using the Sync API in full sync mode (**maximum of 100 requests within a 15 minute period!**)"
      }
    },
    {
      "id": "a2a62fb0-4d0a-48cc-9262-06078bed797a",
      "name": "Sticky Note56",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4944,
        2880
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Store more information, which was not available earlier"
      }
    },
    {
      "id": "4d7d5f6b-d755-4e0c-9a95-8d395331263c",
      "name": "Sticky Note57",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5600,
        3664
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "The Notion ID is being cached in Redis for 15 seconds, so the other Diff sync does not get triggered."
      }
    },
    {
      "id": "201a6afa-5cc0-4d0c-a486-f94966d511e3",
      "name": "Sticky Note58",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3824,
        4320
      ],
      "parameters": {
        "width": 1340,
        "height": 320,
        "content": "**Delete Notion page** if Todoist task has been deleted"
      }
    },
    {
      "id": "f29de393-4c36-4b9f-8f3f-cd480dee79f3",
      "name": "Sticky Note59",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4512,
        4368
      ],
      "parameters": {
        "width": 220,
        "height": 260,
        "content": "Store more information, which was not available earlier"
      }
    },
    {
      "id": "e29872eb-0ad9-440e-9ad1-5f1d08fb3270",
      "name": "Todoist Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        128,
        3648
      ]
    },
    {
      "id": "896918a9-436c-4bd3-b06c-c49a9bd084cd",
      "name": "Sticky Note60",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        112
      ],
      "parameters": {
        "width": 1980,
        "height": 860,
        "content": "Handle tasks **only found in Notion**. This can still mean, that the task exists in Todoist, but does not match the filter, since it has been completed. In that case the Todoist task is being retrieve"
      }
    },
    {
      "id": "45619cb1-747b-4ec3-8ca6-9d4b775edd3c",
      "name": "Sticky Note61",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        992
      ],
      "parameters": {
        "width": 1760,
        "height": 640,
        "content": "Handle tasks which show **differences** between both systems. If there are differences, the Todoist task will be overwritten by all properties from Notion. Also the status is being updated in the foll"
      }
    },
    {
      "id": "033fca22-3bc8-4ede-af74-03f3a3c390c0",
      "name": "Sticky Note62",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        1648
      ],
      "parameters": {
        "width": 1760,
        "height": 720,
        "content": "Handle tasks **only found in Todoist**. This can still mean, that the task exists in Notion, but does not match the filter, since it has been completed. In that case the Notion page is being retrieved"
      }
    },
    {
      "id": "52178e09-fc7b-4bbd-b319-0cc8d8b5fdeb",
      "name": "Sticky Note63",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        1104
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "## Set Schedule\nSet the preferred period. Usually once a day, likely outside working hours should be a solid option."
      }
    },
    {
      "id": "1a9e7108-d21f-41ee-b5bd-56d255709f5b",
      "name": "Sticky Note64",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        1312
      ],
      "parameters": {
        "width": 220,
        "height": 200,
        "content": "Preparing data for comparing"
      }
    },
    {
      "id": "3539875a-6423-45e8-a25a-879174a18e15",
      "name": "Sticky Note65",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4512,
        1312
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "## Set mail address\nProvide the email address where the report should be sent to. This node can also be replaced by an SMTP or similar node."
      }
    },
    {
      "id": "1046c22a-6fb5-43fa-b643-c734d827a61b",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        880,
        4192
      ]
    },
    {
      "id": "39d1ed20-0d82-4e2d-b666-c56ce758e396",
      "name": "Extract IDs",
      "type": "n8n-nodes-base.set",
      "position": [
        -5200,
        3680
      ]
    },
    {
      "id": "90657662-9859-479e-ab43-266ab5e61663",
      "name": "Split out Notion changes",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -5424,
        3680
      ]
    },
    {
      "id": "fd86fb08-1c1e-4739-a0d6-340cd94c2826",
      "name": "Body is array?",
      "type": "n8n-nodes-base.if",
      "position": [
        -5648,
        3792
      ]
    },
    {
      "id": "dacc6aff-d1ea-4067-ba1a-bb26139c3d63",
      "name": "Sticky Note66",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5696,
        3632
      ],
      "parameters": {
        "width": 660,
        "height": 340,
        "content": "If consuming data from the Notion Webhook Emulator instead of a regular Notion Webhook, the data is structured differently and can contain multiple items. This section makes the workflow compatible wi"
      }
    },
    {
      "id": "224abae7-7f16-4d23-ab39-2f8e6483e91a",
      "name": "Switch by project",
      "type": "n8n-nodes-base.switch",
      "position": [
        352,
        3648
      ]
    },
    {
      "id": "8e53da07-fac8-476f-b71c-a7a885ed4c47",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        3424
      ],
      "parameters": {
        "width": 220,
        "height": 400,
        "content": "## Register Webhook in Todoist App\nGrab the URL from here and add it to the Todosit developer app as described in the setup instructions"
      }
    },
    {
      "id": "f6e35198-401c-4188-bfcc-bae81a4c7342",
      "name": "Sticky Note67",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        3424
      ],
      "parameters": {
        "width": 220,
        "height": 400,
        "content": "## Set project ID and name\nThe ID can be copied from JSON in Globals Node.\nIf syncing multiple Todoist projects, use the router described below."
      }
    },
    {
      "id": "80e2f3d3-1c84-41fc-b19d-20994f67062f",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        448,
        4288
      ]
    },
    {
      "id": "cb2ce69f-3e42-4f4f-9c1e-6fc632af4123",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        672,
        4288
      ]
    },
    {
      "id": "b1d5957a-0953-4bdd-a6b3-e9d412d93021",
      "name": "Execute Workflow1",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        880,
        4384
      ]
    },
    {
      "id": "4042fdad-090c-4d3b-9d5c-4fd8e51471af",
      "name": "Sticky Note50",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        4192
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "### Replace trigger\nUse this trigger in the sub-workflows instead"
      }
    },
    {
      "id": "696ae398-9ac4-47ad-9ba8-bead3547713f",
      "name": "Sticky Note68",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        4160
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "### Register Webhook\nConfigure this webhook in the Todoist App as mentioned above"
      }
    },
    {
      "id": "c5f8284c-221f-423a-878b-137ca529752e",
      "name": "Sticky Note69",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        4128
      ],
      "parameters": {
        "width": 220,
        "height": 340,
        "content": "### Set project IDs and names\nCopy each project ID from the JSON of the different Globals Nodes and name the branches by the projects."
      }
    },
    {
      "id": "37fb4c43-86ca-4e49-a16e-af00e8583832",
      "name": "Sticky Note70",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        4064
      ],
      "parameters": {
        "width": 220,
        "height": 500,
        "content": "### Select sub-workflows\nChoose the sub-workflows based on the branch of the Switch Node"
      }
    },
    {
      "id": "e40c0dbb-49fb-4cd0-82c5-b6230f713d79",
      "name": "Sticky Note72",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4560,
        160
      ],
      "parameters": {
        "width": 980,
        "height": 560,
        "content": "# 0. Start here\n### Notion\n- A database must already exist (get a basic template [here](https://steadfast-banjo-d1f.notion.site/17682b476c848086b002de766879aa71)) with the following properties (case m"
      }
    },
    {
      "id": "3256dd01-270a-447d-a44f-27f528c0c97a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4560,
        752
      ],
      "parameters": {
        "width": 2780,
        "height": 460,
        "content": "# 1. Generate config JSON for Globals Nodes\nThe sync workflows have a Node named \"Globals\", which contain mapping information for both Notion and Todoist. This flow helps to generate the config, using"
      }
    },
    {
      "id": "1dc10915-f379-413d-a68f-373c527d0a4e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4560,
        1232
      ],
      "parameters": {
        "width": 800,
        "height": 680,
        "content": "# 2. Setup Todoist Webhook\n- In the Todoist App open Settings > Integrations > Developer > App Management\n- Click \"Create new integration\"\n  - App name: \"Notion-Todoist Sync\" / Name of your n8n instan"
      }
    },
    {
      "id": "31843995-c220-4953-b7cd-6c7545e8853e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2576,
        1232
      ],
      "parameters": {
        "width": 800,
        "height": 680,
        "content": "# 4. Setup Notion Webhook\nYou can choose from two options and also choose different options for different workspaces, e.g. optionA for a business related workspace and option B for a private workspace"
      }
    },
    {
      "id": "530afac1-8e17-4ed0-baf8-a0765a482426",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3728,
        1232
      ],
      "parameters": {
        "width": 1140,
        "height": 680,
        "content": "# 3. Activate Todoist Webhook\nWebhooks are a bit different in Todoist then usual. A Developer App needs to be created and once be connected to via OAuth, to activate the webhook functionality.\nThis fl"
      }
    },
    {
      "id": "fa571b6b-8212-4393-b1ac-2162103d3618",
      "name": "Due date empty",
      "type": "n8n-nodes-base.filter",
      "position": [
        4784,
        3568
      ]
    },
    {
      "id": "29e871fa-f8ca-466d-a3c9-9e138590e94f",
      "name": "Has not been completed?",
      "type": "n8n-nodes-base.if",
      "position": [
        4560,
        3840
      ]
    },
    {
      "id": "b657dad7-6dd6-4b32-97b0-94692cf22a85",
      "name": "End here",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2544,
        3600
      ]
    },
    {
      "id": "b6d3ce41-5ccb-444a-8743-d85123bff642",
      "name": "Retry limit reached",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        1680,
        768
      ]
    },
    {
      "id": "3577ec40-3231-4bd2-8337-7fbbff7354cd",
      "name": "Set tries",
      "type": "n8n-nodes-base.set",
      "position": [
        1680,
        464
      ]
    },
    {
      "id": "68ece70a-189e-4d70-98cd-f96a79b03afe",
      "name": "Update tries",
      "type": "n8n-nodes-base.set",
      "position": [
        2560,
        768
      ]
    },
    {
      "id": "9c78f1a0-13a7-4be4-90d1-c62c81112dcb",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2352,
        768
      ]
    },
    {
      "id": "5fc6c9f6-81c4-4b58-8242-160301609230",
      "name": "Catch known error",
      "type": "n8n-nodes-base.if",
      "position": [
        2128,
        560
      ]
    },
    {
      "id": "9adc29ac-5f62-4c50-9fdd-d9e92a021543",
      "name": "If tries left",
      "type": "n8n-nodes-base.if",
      "position": [
        1472,
        768
      ]
    },
    {
      "id": "6a274ab4-0bc7-412f-a3c4-5e3f79a729de",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2832,
        3760
      ],
      "parameters": {
        "width": 1320,
        "height": 528,
        "content": "Retrieve Todoist task, which can be completed or deleted at this point.\nUsing advanced retry logic, since the \"Get many tasks\" endpoint does not return completed tasks."
      }
    },
    {
      "id": "7b8ad4da-1af7-417f-81db-c0e47df5dcad",
      "name": "Retry limit reached1",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -2560,
        4080
      ]
    },
    {
      "id": "02070645-b9ee-411b-952d-866fc8d4b54a",
      "name": "Set tries1",
      "type": "n8n-nodes-base.set",
      "position": [
        -2560,
        3888
      ]
    },
    {
      "id": "9def9654-bdc7-485b-8b91-0e079925c3a7",
      "name": "Update tries1",
      "type": "n8n-nodes-base.set",
      "position": [
        -1680,
        4080
      ]
    },
    {
      "id": "a0891352-4f20-4e2b-a13f-ababd4494d1f",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1888,
        4080
      ]
    },
    {
      "id": "33beb0db-eb8a-4202-aaf4-260d1eea562c",
      "name": "Catch known error1",
      "type": "n8n-nodes-base.if",
      "position": [
        -2112,
        3984
      ]
    },
    {
      "id": "8b869c9e-492e-4b0e-9c04-dab94a01ed2c",
      "name": "If tries left1",
      "type": "n8n-nodes-base.if",
      "position": [
        -2768,
        4080
      ]
    },
    {
      "id": "0396e7f7-d7cf-440d-a126-638939ce44a9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        3408
      ],
      "parameters": {
        "width": 1320,
        "height": 600,
        "content": "Todoist webhooks can arrive late. To ensure the data is up to date, the payload must be retrieved again. Triggers on deletion can overlap, thus try 3 times, then just stop.\nUsing advanced retry logic,"
      }
    },
    {
      "id": "139b065c-e616-415e-bfe8-8c107940aa69",
      "name": "Set tries2",
      "type": "n8n-nodes-base.set",
      "position": [
        1888,
        3504
      ]
    },
    {
      "id": "aa4015c9-8e7e-454f-b07c-a9e090a40633",
      "name": "Update tries2",
      "type": "n8n-nodes-base.set",
      "position": [
        2768,
        3808
      ]
    },
    {
      "id": "bc7e487d-2a83-4e76-9856-43298b8e12d5",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        2544,
        3808
      ]
    },
    {
      "id": "247c47ee-5c5b-4f05-ab23-fb7297d83f8b",
      "name": "Catch known error2",
      "type": "n8n-nodes-base.if",
      "position": [
        2320,
        3600
      ]
    },
    {
      "id": "7d6ccb7e-9e22-445c-b860-98287ecc3313",
      "name": "If tries left2",
      "type": "n8n-nodes-base.if",
      "position": [
        1664,
        3808
      ]
    },
    {
      "id": "ae19dffe-ba0f-4804-b945-49e7c72b21f2",
      "name": "Retry limit reached2",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        1888,
        3808
      ]
    },
    {
      "id": "50bab390-2462-4958-bc66-009dab7766bb",
      "name": "Sticky Note30",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5168,
        2880
      ],
      "parameters": {
        "width": 220,
        "height": 240,
        "content": "Overwrite description with Notion URL"
      }
    },
    {
      "id": "b6c4f5b4-26a5-45a1-aab4-ae46337e23f1",
      "name": "Turn Markdown into Notion Blocks",
      "type": "n8n-nodes-base.code",
      "position": [
        5008,
        2704
      ]
    },
    {
      "id": "e1d130f2-f4ba-4976-869f-b362e40046bd",
      "name": "Handle each block separately",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        5232,
        2704
      ]
    },
    {
      "id": "b54e529d-a481-49ce-9c55-756300d6b13f",
      "name": "Append Notion Block",
      "type": "n8n-nodes-base.notion",
      "position": [
        5440,
        2704
      ]
    },
    {
      "id": "62dc5971-102a-4e78-ac3b-6320317bfb98",
      "name": "Sticky Note34",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4944,
        2640
      ],
      "parameters": {
        "width": 660,
        "height": 240,
        "content": "Copy task description initially to Notion, before it get's replaced in Todoist by the Notion URL"
      }
    },
    {
      "id": "170f4766-57a0-46cf-9e9d-1e4180637027",
      "name": "Sticky Note40",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2576,
        1920
      ],
      "parameters": {
        "width": 800,
        "height": 380,
        "content": "# 5. Finishing Touches\n\n### Cleanup\nNow technically everything is ready, but it is missing better usability and maintainability. So start by moving (cut & paste) the 3 big flows (outlined in blue) to "
      }
    },
    {
      "id": "22318b07-aeb6-4a10-9d8f-23761569379a",
      "name": "Get projects",
      "type": "n8n-nodes-base.todoist",
      "position": [
        -3328,
        1008
      ]
    },
    {
      "id": "0415a1bb-ebe6-407b-8045-66906b99be06",
      "name": "Get sections",
      "type": "n8n-nodes-base.todoist",
      "position": [
        -2448,
        1008
      ]
    },
    {
      "id": "71f42674-83ea-43a7-8f15-703959a4ad71",
      "name": "Todoist",
      "type": "n8n-nodes-base.todoist",
      "position": [
        352,
        1344
      ]
    },
    {
      "id": "f6da510e-c923-483b-b106-940d71bdf2da",
      "name": "Mark as Incomplete in Todoist",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2352,
        272
      ]
    },
    {
      "id": "9d2a6cda-d149-4c25-9582-169a0986bf71",
      "name": "Get Todoist Task",
      "type": "n8n-nodes-base.todoist",
      "position": [
        1904,
        464
      ]
    },
    {
      "id": "7f429d6a-0bb5-4fae-b35c-c3812337d613",
      "name": "Mark as Completed in Todoist",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2352,
        1872
      ]
    },
    {
      "id": "e4536351-2566-4024-ba28-40037683c913",
      "name": "Delete Task in Todoist",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2352,
        2064
      ]
    },
    {
      "id": "b235cd8e-db4c-43eb-9c0b-a0a884a628f9",
      "name": "If not deleted",
      "type": "n8n-nodes-base.if",
      "position": [
        2128,
        368
      ]
    },
    {
      "id": "1b3ca0cc-0e87-4b9a-b73a-1199b378b874",
      "name": "Get Todoist Task2",
      "type": "n8n-nodes-base.todoist",
      "position": [
        -2336,
        3888
      ]
    },
    {
      "id": "5982f63b-0320-4cac-bddb-6c49e0f13fd5",
      "name": "Delete Task in Todoist2",
      "type": "n8n-nodes-base.todoist",
      "position": [
        -976,
        2752
      ]
    },
    {
      "id": "f4d89f48-039a-4463-9ef0-91e3cf419035",
      "name": "Mark as Completed in Todoist1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        -976,
        3216
      ]
    },
    {
      "id": "c4c016ea-8fd8-4a94-8a47-0889b830a505",
      "name": "Mark as Incomplete in Todoist1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        -976,
        3408
      ]
    },
    {
      "id": "5008bed3-ffa4-4a46-924a-2355e1b61f91",
      "name": "Update Description in Todoist1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        4560,
        3664
      ]
    },
    {
      "id": "e29590cb-dad4-4d78-b845-52ff08344933",
      "name": "Update Description in Todoist",
      "type": "n8n-nodes-base.todoist",
      "position": [
        5232,
        2960
      ]
    },
    {
      "id": "1222ff47-1afc-470a-85c1-cbe8bb103cba",
      "name": "Get Todoist Task1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2096,
        3504
      ]
    },
    {
      "id": "d6691ee1-a229-4753-a6fe-9c006b0a0320",
      "name": "If not deleted1",
      "type": "n8n-nodes-base.if",
      "position": [
        -2112,
        3792
      ]
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Update tries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Update tries1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Update tries2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion": {
      "main": [
        [
          {
            "node": "Map Notion to Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Execute Workflow1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Todoist": {
      "main": [
        [
          {
            "node": "Pick Todoist Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Update section (Sync API)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set tries": {
      "main": [
        [
          {
            "node": "Get Todoist Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set tries1": {
      "main": [
        [
          {
            "node": "Get Todoist Task2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set tries2": {
      "main": [
        [
          {
            "node": "Get Todoist Task1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract IDs": {
      "main": [
        [
          {
            "node": "Notion trigger reference",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get projects": {
      "main": [
        [
          {
            "node": "Prep Dropdown1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get sections": {
      "main": [
        [
          {
            "node": "Generate config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update tries": {
      "main": [
        [
          {
            "node": "If tries left",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate UUID": {
      "main": [
        [
          {
            "node": "Prepare Batching Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get variables": {
      "main": [
        [
          {
            "node": "Verify security token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If tries left": {
      "main": [
        [
          {
            "node": "Set tries",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Retry limit reached",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge summary": {
      "main": [
        [
          {
            "node": "Filter out status changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Dropdown": {
      "main": [
        [
          {
            "node": "Choose Notion Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update tries1": {
      "main": [
        [
          {
            "node": "If tries left1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update tries2": {
      "main": [
        [
          {
            "node": "If tries left2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add project ID": {
      "main": [
        [
          {
            "node": "If Todoist ID exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Body is array?": {
      "main": [
        [
          {
            "node": "Split out Notion changes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notion trigger reference",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Due date empty": {
      "main": [
        [
          {
            "node": "Mark as Focussed in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data": {
      "main": [
        [
          {
            "node": "Check if Todoist ID is locked",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate UUID1": {
      "main": [
        [
          {
            "node": "Update section (Sync API)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate UUID2": {
      "main": [
        [
          {
            "node": "Update section (Sync API)2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get todoist ID": {
      "main": [
        [
          {
            "node": "Lock Todoist ID4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If not deleted": {
      "main": [
        [
          {
            "node": "Mark as Incomplete in Todoist",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create task in Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If tries left1": {
      "main": [
        [
          {
            "node": "Set tries1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Retry limit reached1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If tries left2": {
      "main": [
        [
          {
            "node": "Set tries2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Retry limit reached2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion Webhook": {
      "main": [
        [
          {
            "node": "Body is array?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OAuth redirect": {
      "main": [
        [
          {
            "node": "Get variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Dropdown1": {
      "main": [
        [
          {
            "node": "Choose Todoist Project",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status changed": {
      "main": [
        [
          {
            "node": "Get mapped item1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status is Done": {
      "main": [
        [
          {
            "node": "Mark as Completed in Todoist",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete Task in Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Exchange Tokens": {
      "main": [
        [
          {
            "node": "Respond with success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond with error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data1": {
      "main": [
        [
          {
            "node": "Get Notion Task1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data2": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Description in Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data3": {
      "main": [
        [
          {
            "node": "Switch by Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data4": {
      "main": [
        [
          {
            "node": "Mark as Obsolete in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data5": {
      "main": [
        [
          {
            "node": "Check if Notion ID is locked",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execution Data6": {
      "main": [
        [
          {
            "node": "Status is Obsolete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate config": {
      "main": [
        [
          {
            "node": "Return config JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Notion Task": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Notion task": {
      "main": [
        [
          {
            "node": "Map Notion to Todoist2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get mapped item": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get todoist ID1": {
      "main": [
        [
          {
            "node": "Lock Todoist ID4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If not deleted1": {
      "main": [
        [
          {
            "node": "Differences exist",
            "type": "main",
            "index": 0
          },
          {
            "node": "Requires completion change",
            "type": "main",
            "index": 0
          },
          {
            "node": "Status changed but not empty",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Status is not Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Exists/Completed in Notion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Notion Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store variables": {
      "main": [
        [
          {
            "node": "Redirect to Auth Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch by Event": {
      "main": [
        [
          {
            "node": "Differences exist1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Description has changed in Todoist",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Requires completion change1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Requires completion change1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Todoist Webhook": {
      "main": [
        [
          {
            "node": "Switch by project",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Datasets": {
      "main": [
        [
          {
            "node": "Handle empty dates2",
            "type": "main",
            "index": 0
          }
        ],
        [],
        [
          {
            "node": "Handle empty dates",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Notion Task1": {
      "main": [
        [
          {
            "node": "Notion Task not found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Notion Task2": {
      "main": [
        [
          {
            "node": "Notion Task found1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Todoist Task": {
      "main": [
        [
          {
            "node": "If not deleted",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Catch known error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get mapped item1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get mapped item2": {
      "main": [
        [
          {
            "node": "Merge summary",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [],
        [
          {
            "node": "Generate UUID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Notion",
            "type": "main",
            "index": 0
          },
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Todoist ID": {
      "main": [
        [
          {
            "node": "Get mapped item2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Catch known error": {
      "main": [
        [
          {
            "node": "Create task in Todoist",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Differences exist": {
      "main": [
        [
          {
            "node": "Update task in Todoist1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Todoist Task1": {
      "main": [
        [
          {
            "node": "Map Todoist to Notion1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Catch known error2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Todoist Task2": {
      "main": [
        [
          {
            "node": "If not deleted1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Catch known error1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set creating flag": {
      "main": [
        [
          {
            "node": "Create task in Todoist1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch by project": {
      "main": [
        [
          {
            "node": "Todoist trigger reference",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Todoist ID exists": {
      "main": [
        [
          {
            "node": "Delete Task in Todoist2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Catch known error1": {
      "main": [
        [
          {
            "node": "Status is not Done",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Catch known error2": {
      "main": [
        [
          {
            "node": "End here",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Differences exist1": {
      "main": [
        [
          {
            "node": "Update task in Notion",
            "type": "main",
            "index": 0
          },
          {
            "node": "Due date empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle empty dates": {
      "main": [
        [
          {
            "node": "Update Task in Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map summary fields": {
      "main": [
        [
          {
            "node": "Convert to HTML Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion Task found1": {
      "main": [
        [
          {
            "node": "Execution Data4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set creating flag1": {
      "main": [
        [
          {
            "node": "Get Backlog Section ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status is not Done": {
      "main": [
        [
          {
            "node": "Check if creating flag exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Todoist ID exists?": {
      "main": [
        [
          {
            "node": "Set tries1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check if creating flag exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Notion Block": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate email body": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle empty dates1": {
      "main": [
        [
          {
            "node": "Update task in Todoist before closing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle empty dates2": {
      "main": [
        [
          {
            "node": "Add project ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has been completed?": {
      "main": [
        [
          {
            "node": "Mark as Completed in Todoist1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark as Incomplete in Todoist1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick Todoist Fields": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Status is Obsolete?": {
      "main": [
        [
          {
            "node": "Todoist ID exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Neither focussed nor planned",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Notion Databases": {
      "main": [
        [
          {
            "node": "Prep Dropdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Todoist ID exists": {
      "main": [
        [
          {
            "node": "Set tries",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create task in Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare summary data": {
      "main": [
        [
          {
            "node": "Merge summary",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Convert to HTML Table": {
      "main": [
        [
          {
            "node": "Generate email body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create task in Notion": {
      "main": [
        [
          {
            "node": "Execution Data2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Turn Markdown into Notion Blocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Notion to Todoist": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Todoist to Notion": {
      "main": [
        [
          {
            "node": "Map summary fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion Task not found": {
      "main": [
        [
          {
            "node": "Check if creating flag exists1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Execution Data3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare summary data1": {
      "main": [
        [
          {
            "node": "Merge summary",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Prepare summary data2": {
      "main": [
        [
          {
            "node": "Merge summary",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "Update task in Notion": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify security token": {
      "main": [
        [
          {
            "node": "Exchange Tokens",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond with error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Choose Notion Database": {
      "main": [
        [
          {
            "node": "Get Notion Database ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Choose Todoist Project": {
      "main": [
        [
          {
            "node": "Get Todoist Project ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create task in Todoist": {
      "main": [
        [
          {
            "node": "Store Todoist ID",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lock Todoist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Task in Todoist": {
      "main": [
        [
          {
            "node": "Prepare summary data2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Backlog Section ID": {
      "main": [
        [
          {
            "node": "Generate UUID1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create task in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Notion Database ID": {
      "main": [
        [
          {
            "node": "Get projects",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Todoist Project ID": {
      "main": [
        [
          {
            "node": "Get sections",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Notion to Todoist1": {
      "main": [
        [
          {
            "node": "Handle empty dates1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Notion to Todoist2": {
      "main": [
        [
          {
            "node": "Execution Data6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Todoist to Notion1": {
      "main": [
        [
          {
            "node": "Execution Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Done in Notion": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Batching Items": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Task in Todoist": {
      "main": [
        [
          {
            "node": "Status changed",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lock Todoist ID2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Prepare summary data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update task in Todoist": {
      "main": [
        [
          {
            "node": "Get mapped item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create task in Todoist1": {
      "main": [
        [
          {
            "node": "Store Todoist ID1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lock Todoist ID4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Task in Todoist2": {
      "main": [
        [
          {
            "node": "Get todoist ID1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate security token": {
      "main": [
        [
          {
            "node": "Store variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has not been completed?": {
      "main": [
        [
          {
            "node": "Mark as In Progress in Notion",
            "type": "main",
            "index": 0
          },
          {
            "node": "Neither focussed nor planned1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark as Done in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update task in Todoist1": {
      "main": [
        [
          {
            "node": "Get todoist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If event is not :deleted": {
      "main": [
        [
          {
            "node": "Set tries2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Notion Task2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion trigger reference": {
      "main": [
        [
          {
            "node": "Globals2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execution Data5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split out Notion changes": {
      "main": [
        [
          {
            "node": "Extract IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter out status changes": {
      "main": [
        [
          {
            "node": "Map Todoist to Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Todoist trigger reference": {
      "main": [
        [
          {
            "node": "Execution Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Globals1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update section (Sync API)": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Exists/Completed in Notion": {
      "main": [
        [
          {
            "node": "Map Notion to Todoist1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete Task in Todoist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Focussed in Notion": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Obsolete in Notion": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Requires completion change": {
      "main": [
        [
          {
            "node": "Has been completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update section (Sync API)2": {
      "main": [
        [
          {
            "node": "Get todoist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only continue if not locked": {
      "main": [
        [
          {
            "node": "If event is not :deleted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Requires completion change1": {
      "main": [
        [
          {
            "node": "Has not been completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Notion ID is locked": {
      "main": [
        [
          {
            "node": "Only continue if not locked1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle each block separately": {
      "main": [
        [
          {
            "node": "Append Notion Block",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Completed in Todoist": {
      "main": [
        [
          {
            "node": "Prepare summary data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Neither focussed nor planned": {
      "main": [
        [
          {
            "node": "Todoist ID exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Todoist ID exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only continue if not locked1": {
      "main": [
        [
          {
            "node": "Get Notion task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status changed but not empty": {
      "main": [
        [
          {
            "node": "Generate UUID2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Todoist Webhook Setup Helper": {
      "main": [
        [
          {
            "node": "Generate security token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Todoist ID is locked": {
      "main": [
        [
          {
            "node": "Only continue if not locked",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if creating flag exists": {
      "main": [
        [
          {
            "node": "Only continue if flag does not exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Completed in Todoist1": {
      "main": [
        [
          {
            "node": "Get todoist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as In Progress in Notion": {
      "main": [
        [
          {
            "node": "Lock Notion ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Incomplete in Todoist": {
      "main": [
        [
          {
            "node": "Update task in Todoist",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lock Todoist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Neither focussed nor planned1": {
      "main": [
        [
          {
            "node": "Mark as Focussed in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if creating flag exists1": {
      "main": [
        [
          {
            "node": "Only continue if flag does not exist1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Incomplete in Todoist1": {
      "main": [
        [
          {
            "node": "Get todoist ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion-Todoist Sync Setup Helper": {
      "main": [
        [
          {
            "node": "Get Notion Databases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Turn Markdown into Notion Blocks": {
      "main": [
        [
          {
            "node": "Handle each block separately",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Description has changed in Todoist": {
      "main": [
        [
          {
            "node": "Update Description in Todoist1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only continue if flag does not exist": {
      "main": [
        [
          {
            "node": "Set creating flag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only continue if flag does not exist1": {
      "main": [
        [
          {
            "node": "Set creating flag1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update task in Todoist before closing": {
      "main": [
        [
          {
            "node": "Status is Done",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lock Todoist ID1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}