{
  "name": "IntelliCall — Call log to Google Sheets",
  "nodes": [
    {
      "parameters": {
        "content": "## IntelliCall — Call log to Google Sheets\n\nEvery completed call appends a row to a spreadsheet.\n\n**Setup:**\n1. Activate this workflow, copy the Webhook node's **Production URL**, and paste it in IntelliCall under **Settings → Integrations → n8n**.\n2. In the *Append to sheet* node: connect your Google account, pick a spreadsheet and sheet with columns `Timestamp, From, To, Duration (s), Status`.\n3. Use the **Send test** button on the IntelliCall n8n card to verify.\n\nAll IntelliCall events arrive at this webhook — the IF node lets only `callCompleted` through. Duplicate this pattern for other events (leadCreated, appointmentBooked, …).",
        "height": 420,
        "width": 420
      },
      "id": "b2c3d4e5-0001-4000-8000-000000000001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-220, -100]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "intellicall-events",
        "options": {}
      },
      "id": "b2c3d4e5-0002-4000-8000-000000000002",
      "name": "IntelliCall events",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [260, 0],
      "webhookId": "b2c3d4e5-0002-4000-8000-000000000002"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "b2c3d4e5-0010-4000-8000-000000000010",
              "leftValue": "={{ $json.body.event }}",
              "rightValue": "callCompleted",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "b2c3d4e5-0003-4000-8000-000000000003",
      "name": "Is call completed?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [500, 0]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Timestamp": "={{ $json.body.timestamp }}",
            "From": "={{ $json.body.data.from }}",
            "To": "={{ $json.body.data.to }}",
            "Duration (s)": "={{ $json.body.data.duration }}",
            "Status": "={{ $json.body.data.status }}"
          },
          "matchingColumns": [],
          "schema": []
        },
        "options": {}
      },
      "id": "b2c3d4e5-0004-4000-8000-000000000004",
      "name": "Append to sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [760, -80]
    }
  ],
  "connections": {
    "IntelliCall events": {
      "main": [
        [
          {
            "node": "Is call completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is call completed?": {
      "main": [
        [
          {
            "node": "Append to sheet",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    }
  },
  "settings": {},
  "pinData": {}
}
