{
  "name": "Gary Club — Call Completed → Slack Notification",
  "nodes": [
    {
      "parameters": {
        "content": "## ⚡ After import — 3 steps\n\n**1. Set your Slack credential**\nClick the **Notify Slack** node → set a Slack OAuth2 credential or Incoming Webhook URL. Create one at https://api.slack.com/apps.\n\n**2. Register this webhook in Gary Club**\nCopy the **Production URL** from the **Call Completed** node. In Gary Club → Settings → Webhooks → add the URL for the `call.completed` event.\n\n**3. Set your Slack channel**\nIn the **Notify Slack** node, update **Channel** to your target channel (e.g. `#sales-calls` or `#team-alerts`).\n\n📋 **Notes**\n- `data.contact_phone` — caller's E.164 number.\n- `data.duration` — call duration in seconds.\n- `data.summary` — AI-generated call summary (if transcription enabled on the agent).\n- `data.contact_id` — Gary Club contact UUID (if the number matched a CRM contact).\n- The **Format Message** node uses an expression — edit it to add/remove fields.\n\n📚 Docs: https://docs.gary.club/api/webhooks | https://docs.gary.club/api/calls",
        "height": 420,
        "width": 400,
        "color": 5
      },
      "id": "55000000-0000-4000-8000-000000000000",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-220, 60]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "gary-call-completed",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "55000000-0001-4000-8000-000000000001",
      "name": "Call Completed",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [260, 300],
      "webhookId": "55000000-webhook-4000-8000-000000000001"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "f1", "name": "phone", "value": "={{ $json.body.data.contact_phone }}", "type": "string" },
            { "id": "f2", "name": "duration_min", "value": "={{ Math.round(($json.body.data.duration || 0) / 60) }}", "type": "number" },
            { "id": "f3", "name": "summary", "value": "={{ $json.body.data.summary || '_No summary available_' }}", "type": "string" },
            { "id": "f4", "name": "slack_text", "value": "={{ '📞 *Call completed* — ' + $json.body.data.contact_phone + '\\n*Duration:* ' + Math.round(($json.body.data.duration || 0) / 60) + ' min\\n*Summary:* ' + ($json.body.data.summary || '_No summary_') }}", "type": "string" }
          ]
        },
        "options": {}
      },
      "id": "55000000-0002-4000-8000-000000000002",
      "name": "Format Message",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [500, 300]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "message",
        "operation": "post",
        "channel": "#sales-calls",
        "text": "={{ $json.slack_text }}",
        "otherOptions": {}
      },
      "id": "55000000-0003-4000-8000-000000000003",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [740, 300]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ ok: true }) }}",
        "options": { "responseCode": 200 }
      },
      "id": "55000000-0004-4000-8000-000000000004",
      "name": "Respond 200",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [980, 300]
    }
  ],
  "connections": {
    "Call Completed": { "main": [[{ "node": "Format Message", "type": "main", "index": 0 }]] },
    "Format Message": { "main": [[{ "node": "Notify Slack", "type": "main", "index": 0 }]] },
    "Notify Slack": { "main": [[{ "node": "Respond 200", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "tags": [{ "name": "gary-club-api" }]
}
