{
  "name": "Sync Linear issues to Todoist tasks automatically (create, update, close)",
  "nodes": [
    {
      "id": "eaefa5e3-2158-4804-b3ff-aad4a8f9dcc6",
      "name": "Update task",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2300,
        120
      ]
    },
    {
      "id": "41a03ae9-a7a9-4a0d-95f4-2851c7c99dab",
      "name": "New issue or updated issue",
      "type": "n8n-nodes-base.linearTrigger",
      "position": [
        -960,
        -100
      ]
    },
    {
      "id": "cda5c4d5-d3a4-4e24-aaad-b6e3a42c1bb1",
      "name": "Check if task already exists1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        60,
        -120
      ]
    },
    {
      "id": "81272e61-dd97-4042-a7d3-4a9c84369aea",
      "name": "if task already exists1",
      "type": "n8n-nodes-base.if",
      "position": [
        280,
        -120
      ]
    },
    {
      "id": "40e5429d-ed52-4834-86a7-7757f4fc673b",
      "name": "Remove task",
      "type": "n8n-nodes-base.todoist",
      "position": [
        780,
        20
      ]
    },
    {
      "id": "4c66f3de-dc6c-4dd4-bbb3-4c48089c397e",
      "name": "Do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        780,
        220
      ]
    },
    {
      "id": "714ed999-ac53-49a7-8039-bb0e30551404",
      "name": "Switch based on action",
      "type": "n8n-nodes-base.switch",
      "position": [
        -440,
        -100
      ]
    },
    {
      "id": "d2135dd7-f692-4327-a1bc-678456eb1b8c",
      "name": "If action's due date is not empty and assignee is me",
      "type": "n8n-nodes-base.if",
      "position": [
        780,
        400
      ]
    },
    {
      "id": "442647f1-94c0-41b2-8577-dca92294316b",
      "name": "Task finished ?",
      "type": "n8n-nodes-base.switch",
      "position": [
        2020,
        20
      ]
    },
    {
      "id": "a89acbf6-ddcb-4143-95f9-07e3c1101b65",
      "name": "Close task",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2300,
        -80
      ]
    },
    {
      "id": "8582c2e8-85c2-46c1-8b86-c989f1646851",
      "name": "If it's a sub-issue",
      "type": "n8n-nodes-base.if",
      "position": [
        1240,
        280
      ]
    },
    {
      "id": "9cbe3218-9a39-4f1f-8f4a-d3135c69c1b4",
      "name": "Get parent issue",
      "type": "n8n-nodes-base.linear",
      "position": [
        1460,
        20
      ]
    },
    {
      "id": "54d7de2b-e8fb-42cc-b345-f15e4a18aa42",
      "name": "Set title with parent and sub-issue",
      "type": "n8n-nodes-base.set",
      "position": [
        1680,
        20
      ]
    },
    {
      "id": "de878754-5b40-409a-a776-b9f4848693b7",
      "name": "Update task1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2300,
        600
      ]
    },
    {
      "id": "53686909-20d4-449c-81c6-363b6a42cc28",
      "name": "Task finished ?1",
      "type": "n8n-nodes-base.switch",
      "position": [
        2020,
        300
      ]
    },
    {
      "id": "f30f4fa7-06c0-43d2-9e15-b19acc0cdee0",
      "name": "Close task1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2300,
        300
      ]
    },
    {
      "id": "aaa5377c-cfe7-43ab-8331-b8b4e7de4798",
      "name": "Check if task already exists3",
      "type": "n8n-nodes-base.todoist",
      "position": [
        60,
        420
      ]
    },
    {
      "id": "2d167171-2980-4494-96ee-595891a1bef3",
      "name": "if task already exists3",
      "type": "n8n-nodes-base.if",
      "position": [
        280,
        420
      ]
    },
    {
      "id": "d5f9f91b-3374-4937-9c78-a31e82b9cf7d",
      "name": "Do nothing2",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1240,
        900
      ]
    },
    {
      "id": "8421b381-0fb8-44a7-91e4-1d421eb841b1",
      "name": "If action's due date is not empty and assignee is me1",
      "type": "n8n-nodes-base.if",
      "position": [
        780,
        800
      ]
    },
    {
      "id": "8f07bede-8ae7-430b-b7e2-4a7f97e75ecd",
      "name": "If it's a sub-issue1",
      "type": "n8n-nodes-base.if",
      "position": [
        1240,
        700
      ]
    },
    {
      "id": "155f6e76-9f3f-48d0-b523-7379f0356ed0",
      "name": "Remove task1",
      "type": "n8n-nodes-base.todoist",
      "position": [
        1240,
        500
      ]
    },
    {
      "id": "64308a06-b0d2-4e69-bf96-fda3ace090ae",
      "name": "Get parent issue1",
      "type": "n8n-nodes-base.linear",
      "position": [
        1460,
        600
      ]
    },
    {
      "id": "b7375565-e771-4997-86ff-d8dd50ccdcd7",
      "name": "Set title with parent and sub-issue1",
      "type": "n8n-nodes-base.set",
      "position": [
        1680,
        600
      ]
    },
    {
      "id": "cbe53d00-6983-4eb2-83d5-c316ee42b0d0",
      "name": "Create task2",
      "type": "n8n-nodes-base.todoist",
      "position": [
        1460,
        800
      ]
    },
    {
      "id": "54799714-af97-4c7f-bc7e-68cc17234779",
      "name": "Create task3",
      "type": "n8n-nodes-base.todoist",
      "position": [
        2020,
        600
      ]
    },
    {
      "id": "c2bd8e00-4d06-4800-aa02-bbad49183b8d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        -280
      ],
      "parameters": {
        "width": 440,
        "height": 1520,
        "content": "## ✨ Try It Out!\nSync your **Linear issues to Todoist** automatically with this n8n workflow. When an issue is created, updated, or completed in Linear, a corresponding task is created, updated, or cl"
      }
    },
    {
      "id": "9b496a22-c2d2-4fff-964d-6c86c022fd11",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -280
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "## 1. Listen for Linear Issue Events\n[Learn more about the Linear Trigger node](https://docs.n8n.io/integrations/linear/)\n\nThis node captures events from Linear like issue creation, update, or removal"
      }
    },
    {
      "id": "e1b9cd74-bd3a-4024-886e-914fb3c6cf62",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -280
      ],
      "parameters": {
        "width": 540,
        "height": 400,
        "content": "## 2. Route by Action: Create, Update or Remove\n[See how Switch nodes work](https://docs.n8n.io/nodes/n8n-nodes-base.switch/)\n\nBased on the type of action (`create`, `update`, or `remove`), we branch "
      }
    },
    {
      "id": "b98a335c-4d60-4464-8d94-0b832801878b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -280
      ],
      "parameters": {
        "width": 600,
        "height": 900,
        "content": "## 3. Check for Existing Task in Todoist\n[Explore Todoist Node Docs](https://docs.n8n.io/integrations/todoist/)\n\nBefore creating or updating anything, we check if a task for the Linear issue already e"
      }
    },
    {
      "id": "a6aa24be-dadb-46b0-b75f-03b1f13b1390",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        -280
      ],
      "parameters": {
        "width": 720,
        "height": 1340,
        "content": "## 5. Handle Sub-Issues with Context\n[Example: Fetching Parent Data](https://docs.n8n.io/nodes/n8n-nodes-base.linear/)\n\nIf the Linear issue is a sub-task, we fetch the parent issue's title and combine"
      }
    },
    {
      "id": "8c91d12a-2fd8-44b3-aa49-76eca5327ef4",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -280
      ],
      "parameters": {
        "width": 560,
        "height": 1340,
        "content": "## 4. Conditional Logic for Updates or Completion\n[Learn about IF & Switch nodes](https://docs.n8n.io/workflows/expressions/conditions/)\n\nWe make sure the issue:\n- Has a due date\n- Is assigned to *you"
      }
    },
    {
      "id": "65157739-1dbb-4828-b4f6-48ea21a675bc",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        -280
      ],
      "parameters": {
        "width": 720,
        "height": 1080,
        "content": "## 6. Create, Update or Close Todoist Tasks\n[Todoist Integration Guide](https://docs.n8n.io/integrations/todoist/)\n\nFinally, based on the logic above, we either:\n- Create a new task in your Todoist pr"
      }
    }
  ],
  "connections": {
    "Task finished ?": {
      "main": [
        [
          {
            "node": "Close task",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get parent issue": {
      "main": [
        [
          {
            "node": "Set title with parent and sub-issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Task finished ?1": {
      "main": [
        [
          {
            "node": "Close task1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update task1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get parent issue1": {
      "main": [
        [
          {
            "node": "Set title with parent and sub-issue1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If it's a sub-issue": {
      "main": [
        [
          {
            "node": "Get parent issue",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Task finished ?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If it's a sub-issue1": {
      "main": [
        [
          {
            "node": "Get parent issue1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create task2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch based on action": {
      "main": [
        [
          {
            "node": "Check if task already exists1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check if task already exists3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check if task already exists3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if task already exists1": {
      "main": [
        [
          {
            "node": "Remove task",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if task already exists3": {
      "main": [
        [
          {
            "node": "If action's due date is not empty and assignee is me",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If action's due date is not empty and assignee is me1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New issue or updated issue": {
      "main": [
        [
          {
            "node": "Switch based on action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if task already exists1": {
      "main": [
        [
          {
            "node": "if task already exists1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if task already exists3": {
      "main": [
        [
          {
            "node": "if task already exists3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set title with parent and sub-issue": {
      "main": [
        [
          {
            "node": "Task finished ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set title with parent and sub-issue1": {
      "main": [
        [
          {
            "node": "Create task3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If action's due date is not empty and assignee is me": {
      "main": [
        [
          {
            "node": "If it's a sub-issue",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Remove task1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If action's due date is not empty and assignee is me1": {
      "main": [
        [
          {
            "node": "If it's a sub-issue1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Do nothing2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}