{
  "name": "Analyze health data from Patient record and send to CRM",
  "nodes": [
    {
      "id": "trigger-patient-record",
      "name": "Incoming Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -600,
        193600
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "analyze-health-data-from-patient-record-and-send-to-crm",
        "responseCode": 200,
        "responseMode": "onReceived"
      }
    },
    {
      "id": "fetch-patient-record",
      "name": "Fetch data from Patient record",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        -300,
        193600
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.example.com/patient-record",
        "responseFormat": "json"
      }
    },
    {
      "id": "ai-analyze-health-data",
      "name": "AI: Analyze Health Data",
      "type": "n8n-nodes-base.openAIApi",
      "typeVersion": 1,
      "position": [
        0,
        193600
      ],
      "parameters": {
        "model": "gpt-4",
        "operation": "complete",
        "prompt": "Perform the following action on the incoming data: analyze health data"
      }
    },
    {
      "id": "send-crm",
      "name": "Send to CRM",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        300,
        193600
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.example.com/crm",
        "responseFormat": "json",
        "options": {}
      }
    },
    {
      "id": "error-handler-600-193600",
      "name": "Send Error to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        600,
        193600
      ],
      "parameters": {
        "resource": "message",
        "operation": "post",
        "channel": "#automation-alerts",
        "text": "={{ $json.get('error_message', 'An error occurred') }}"
      }
    }
  ],
  "connections": {
    "Incoming Trigger": {
      "main": [
        [
          {
            "node": "Fetch data from Patient record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch data from Patient record": {
      "main": [
        {
          "node": "AI: Analyze Health Data",
          "type": "main",
          "index": 0
        }
      ]
    },
    "AI: Analyze Health Data": {
      "main": [
        [
          {
            "node": "AI: Analyze Health Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send to CRM": {
      "main": [
        [
          {
            "node": "Send Error to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "active": false
}