{
  "name": "ClickUp AI Agent - Anthropic Working",
  "nodes": [
    {
      "parameters": {
        "path": "clickup-agent-v2",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "user_id",
              "value": "={{ $json.body.user_id || 'andrew' }}"
            },
            {
              "name": "agent_mode",
              "value": "={{ $json.body.agent_mode || 'task_manager' }}"
            }
          ],
          "object": [
            {
              "name": "payload",
              "value": "={{ $json.body.payload || {} }}"
            }
          ]
        }
      },
      "id": "parse-request",
      "name": "Parse Request",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://api.anthropic.com/v1/messages",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "anthropic-version",
              "value": "2023-06-01"
            },
            {
              "name": "content-type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "body": "={\n  \"model\": \"claude-3-sonnet-20240229\",\n  \"max_tokens\": 1024,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Create a ClickUp task based on this request: \" + JSON.stringify($('Parse Request').item.json.payload) + \". User: \" + $('Parse Request').item.json.user_id\n    }\n  ]\n}",
        "options": {}
      },
      "id": "ai-processor",
      "name": "AI Processor (Claude)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        680,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "status",
              "value": "success"
            },
            {
              "name": "message",
              "value": "AI processing complete"
            }
          ],
          "object": [
            {
              "name": "ai_response",
              "value": "={{ $json }}"
            },
            {
              "name": "original_request",
              "value": "={{ $('Parse Request').item.json }}"
            }
          ]
        }
      },
      "id": "final-response",
      "name": "Final Response",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}"
      },
      "id": "webhook-response",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1120,
        300
      ]
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Parse Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Request": {
      "main": [
        [
          {
            "node": "AI Processor (Claude)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Processor (Claude)": {
      "main": [
        [
          {
            "node": "Final Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Response": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "timezone": "America/New_York"
  },
  "versionId": "1",
  "id": "clickup-agent-anthropic-working"
}