{
  "name": "Start an AI coding agent from Linear issues with CloudCLI",
  "nodes": [
    {
      "id": "ef4b2323-2cdd-4f5e-98af-2400f64d15c3",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        9120,
        2816
      ],
      "parameters": {
        "width": 480,
        "height": 700,
        "content": "## Start an AI Coding Agent (Claude Code, Gemini or Codex) from Linear Issues with CloudCLI\n\n### When a Linear issue is created, this workflow sends it to a CloudCLI cloud dev environment where an AI "
      }
    },
    {
      "id": "2e788329-1b2f-47d5-a813-56612580bae4",
      "name": "Sticky Note - Step 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        9664,
        2976
      ],
      "parameters": {
        "width": 500,
        "height": 360,
        "content": "## 1. Capture New Linear Issues\n\nThe Linear Trigger fires on all issue events (create and update). The IF node filters for newly created issues only by checking that the action equals \"create\".\n\nThis "
      }
    },
    {
      "id": "0b304b18-5ca4-4512-aa9a-b54eff825c8d",
      "name": "Sticky Note - Step 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        10208,
        2976
      ],
      "parameters": {
        "width": 300,
        "height": 360,
        "content": "## 2. Compose Agent Prompt\n\nThe issue title and description are formatted into a prompt for the AI agent. Customize this to include your project's coding standards, conventions, or any context the age"
      }
    },
    {
      "id": "67968123-acc7-4d32-8d58-db7496e2eb89",
      "name": "Sticky Note - Step 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        10544,
        2976
      ],
      "parameters": {
        "width": 560,
        "height": 360,
        "content": "## 3. Get Environment & Run Agent\n[CloudCLI Docs](https://developer.cloudcli.ai)\n\nThe Get Environment node fetches your environment's details including its live access URL. The agent then runs the tas"
      }
    },
    {
      "id": "c75da46c-6c6b-4f15-b164-b13ef3840666",
      "name": "Sticky Note - Step 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        11152,
        2976
      ],
      "parameters": {
        "width": 560,
        "height": 360,
        "content": "## 4. Post Results to Linear\n\nThe agent's result text, session duration, cost, and multiple ways to continue the session are extracted and posted back to the Linear issue as a comment:\n\n- **Web UI** l"
      }
    },
    {
      "id": "4f61c581-35b2-463a-b781-4ae3df824b58",
      "name": "Sticky Note - Community Node",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        9120,
        3696
      ],
      "parameters": {
        "width": 480,
        "height": 140,
        "content": "### Community Node\nThis workflow uses the **CloudCLI** verified community node (`@cloudcli-ai/n8n-nodes-cloud-cli`). Install it from the n8n nodes panel. [Learn more](https://docs.n8n.io/integrations/"
      }
    },
    {
      "id": "d21cfed3-0fe5-441e-9d56-b6969546fce6",
      "name": "Linear Trigger",
      "type": "n8n-nodes-base.linearTrigger",
      "position": [
        9728,
        3280
      ]
    },
    {
      "id": "a2121813-5861-451d-8cc5-7e9fd828971d",
      "name": "Is New Issue?",
      "type": "n8n-nodes-base.if",
      "position": [
        9984,
        3280
      ]
    },
    {
      "id": "6d0ac61b-467b-4238-a29a-62024374a41a",
      "name": "Compose Agent Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        10272,
        3280
      ]
    },
    {
      "id": "e5b1491d-58f1-4d43-b3e2-a6df5afbb21a",
      "name": "Get Environment Details",
      "type": "@cloudcli-ai/n8n-nodes-cloud-cli.cloudCli",
      "position": [
        10608,
        3280
      ]
    },
    {
      "id": "829f92d2-91bd-45fa-93b8-2b5edd7344e4",
      "name": "Run AI Coding Agent",
      "type": "@cloudcli-ai/n8n-nodes-cloud-cli.cloudCli",
      "position": [
        10880,
        3280
      ]
    },
    {
      "id": "7cffb369-621a-48af-9107-3603e3f77fca",
      "name": "Extract Agent Result",
      "type": "n8n-nodes-base.set",
      "position": [
        11200,
        3280
      ]
    },
    {
      "id": "fa4c475d-7023-431a-bb8a-f7a412affa76",
      "name": "Post Results to Linear",
      "type": "n8n-nodes-base.linear",
      "position": [
        11488,
        3280
      ]
    }
  ],
  "connections": {
    "Is New Issue?": {
      "main": [
        [
          {
            "node": "Compose Agent Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Linear Trigger": {
      "main": [
        [
          {
            "node": "Is New Issue?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run AI Coding Agent": {
      "main": [
        [
          {
            "node": "Extract Agent Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compose Agent Prompt": {
      "main": [
        [
          {
            "node": "Get Environment Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Agent Result": {
      "main": [
        [
          {
            "node": "Post Results to Linear",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Environment Details": {
      "main": [
        [
          {
            "node": "Run AI Coding Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}