{
  "name": "Pipedrive deal stage -> WhatsApp message (WbizTool)",
  "nodes": [
    {
      "id": "72843874-bcc2-4a21-991a-08ffd2289037",
      "name": "Pipedrive: deal changed",
      "type": "n8n-nodes-base.pipedriveTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "webhookId": "45adafe1-6a84-47a5-82dd-1a6b6b37ec14",
      "parameters": {
        "authentication": "apiToken",
        "action": "change",
        "entity": "deal"
      }
    },
    {
      "id": "c5785763-ddcf-4001-b102-bebe127132db",
      "name": "Moved into your stage?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        240,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "27d64483-1e8a-4d12-8ba6-f279daefbb24",
              "leftValue": "={{ String($json.data.stage_id) }}",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "rightValue": "YOUR_STAGE_ID"
            },
            {
              "id": "3ae33827-2a12-4674-9b95-a276f5cb96ac",
              "leftValue": "={{ $json.previous.stage_id }}",
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              },
              "rightValue": ""
            },
            {
              "id": "f73c9d6f-449c-47de-8088-863fc9135e70",
              "leftValue": "={{ $json.data.person_id }}",
              "operator": {
                "type": "number",
                "operation": "exists",
                "singleValue": true
              },
              "rightValue": ""
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "a1c337c5-96ca-4eab-b0df-291e79b65383",
      "name": "Get the deal's person",
      "type": "n8n-nodes-base.pipedrive",
      "typeVersion": 2,
      "position": [
        480,
        -100
      ],
      "parameters": {
        "authentication": "apiToken",
        "resource": "person",
        "operation": "get",
        "personId": "={{ $json.data.person_id }}"
      }
    },
    {
      "id": "2e228053-8f43-4e98-97dd-137f3bf8e539",
      "name": "WbizTool Send Message",
      "type": "n8n-nodes-wbiztool.wbizToolSendMessage",
      "typeVersion": 1.1,
      "position": [
        720,
        -100
      ],
      "parameters": {
        "targetType": "phone",
        "phone": "={{ $json.phones[0].value }}",
        "countryCode": "",
        "messageType": "0",
        "message": "=Hi {{ $json.first_name || $json.name }}, your proposal is in your inbox. Reply here on WhatsApp if you have any questions.",
        "whatsappClientId": 0,
        "additionalOptions": {}
      }
    }
  ],
  "connections": {
    "Pipedrive: deal changed": {
      "main": [
        [
          {
            "node": "Moved into your stage?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Moved into your stage?": {
      "main": [
        [
          {
            "node": "Get the deal's person",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Get the deal's person": {
      "main": [
        [
          {
            "node": "WbizTool Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "tags": [],
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
