{
  "name": "Update HubSpot when a new invoice is registered in Stripe",
  "nodes": [
    {
      "id": null,
      "name": "When Invoice Paid",
      "type": "n8n-nodes-base.stripeTrigger",
      "position": [
        400,
        460
      ]
    },
    {
      "id": null,
      "name": "Update Deal to Paid",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1240,
        500
      ]
    },
    {
      "id": null,
      "name": "Find Deal based on PO Number",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        820,
        480
      ]
    },
    {
      "id": null,
      "name": "If no PO Number",
      "type": "n8n-nodes-base.if",
      "position": [
        600,
        460
      ]
    },
    {
      "id": null,
      "name": "If no deal found for PO",
      "type": "n8n-nodes-base.if",
      "position": [
        1020,
        480
      ]
    },
    {
      "id": null,
      "name": "Send invoice paid message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1420,
        500
      ]
    },
    {
      "id": null,
      "name": "Send no PO Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        800,
        240
      ]
    },
    {
      "id": null,
      "name": "Send Deal not found message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1180,
        240
      ]
    }
  ],
  "connections": {
    "If no PO Number": {
      "main": [
        [
          {
            "node": "Send no PO Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Find Deal based on PO Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Invoice Paid": {
      "main": [
        [
          {
            "node": "If no PO Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Deal to Paid": {
      "main": [
        [
          {
            "node": "Send invoice paid message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If no deal found for PO": {
      "main": [
        [
          {
            "node": "Send Deal not found message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Deal to Paid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Deal based on PO Number": {
      "main": [
        [
          {
            "node": "If no deal found for PO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}