{
  "name": "Payment Received to Client Onboarding",
  "nodes": [
    {
      "parameters": {
        "events": [
          "payment_intent.succeeded"
        ]
      },
      "type": "n8n-nodes-base.stripeTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "79452246-b710-4209-813b-c067d799d8a7",
      "name": "Payment Stripe",
      "webhookId": "57d548f4-ec53-4119-a2be-b5db34af03cf"
    },
    {
      "parameters": {
        "operation": "getAll",
        "team": "YOUR_TEAM",
        "space": "YOUR_SPACE",
        "folderless": true,
        "list": "YOUR_LIST",
        "filters": {}
      },
      "type": "n8n-nodes-base.clickUp",
      "typeVersion": 1,
      "position": [
        220,
        0
      ],
      "id": "c6c45aca-27c4-450d-91fb-4a3be81298ab",
      "name": "Get Leads"
    },
    {
      "parameters": {
        "operation": "update",
        "id": "={{ $json.id }}",
        "updateFields": {
          "status": "won"
        }
      },
      "type": "n8n-nodes-base.clickUp",
      "typeVersion": 1,
      "position": [
        660,
        0
      ],
      "id": "c43908ae-43aa-44f4-93dd-5f2fec6ec4c3",
      "name": "Mark as Won"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "7f42c914-e745-420a-ab29-0927c553274d",
              "leftValue": "={{ $('Payment Stripe').item.json.data.object.receipt_email }}",
              "rightValue": "={{ $json.custom_fields[19].value }}",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        440,
        0
      ],
      "id": "76177263-79b8-453e-b9ac-6370dd99a0d4",
      "name": "Match by Email"
    },
    {
      "parameters": {
        "resource": "board",
        "name": "={{ $json.name }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.trello",
      "typeVersion": 1,
      "position": [
        880,
        0
      ],
      "id": "2cfdde60-c844-429c-92e2-a71ec1b8fb6d",
      "name": "Create Client Board"
    },
    {
      "parameters": {
        "resource": "list",
        "operation": "getAll",
        "id": "={{ $json.id }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.trello",
      "typeVersion": 1,
      "position": [
        1100,
        0
      ],
      "id": "d5db8677-0c10-42b7-b748-bbdc83e8a357",
      "name": "Get Lists"
    },
    {
      "parameters": {
        "listId": "={{ $json.data[0].id }}",
        "name": "Send them a swag box",
        "description": "Log into swag.com, enter the client information, and ship their swag box (type A).",
        "additionalFields": {
          "due": "={{ $now.plus(2, 'days') }}",
          "pos": "top"
        }
      },
      "type": "n8n-nodes-base.trello",
      "typeVersion": 1,
      "position": [
        1540,
        0
      ],
      "id": "eb3f4355-2259-4366-9010-1e39c216e322",
      "name": "Create Swag Task"
    },
    {
      "parameters": {
        "listId": "={{ $('Aggregate').item.json.data[0].id }}",
        "name": "Record a video introduction",
        "description": "Salesperson to record a brief, customized 3min Loom introduction to welcome them aboard and improve consolidation/reduce churn.",
        "additionalFields": {
          "due": "={{ $now.plus(2, 'days') }}",
          "pos": "bottom"
        }
      },
      "type": "n8n-nodes-base.trello",
      "typeVersion": 1,
      "position": [
        1760,
        0
      ],
      "id": "a7b58568-9678-4f5f-943d-791ab83a986e",
      "name": "Create Intro Task"
    },
    {
      "parameters": {
        "team": "YOUR_TEAM",
        "space": "YOUR_SPACE",
        "folderless": true,
        "list": "YOUR_LIST",
        "name": "={{ $('Get Leads').item.json.name }}",
        "additionalFields": {
          "customFieldsJson": "=[\n    {\n        \"id\": \"YOUR_CLICKUP_DATE_FIELD_ID\",\n        \"value\": \"{{ $now.toMillis() }}\"\n    },\n    {\n        \"id\": \"YOUR_CLICKUP_AMOUNT_FIELD_ID\",\n        \"value\": \"{{ $('Payment Stripe').item.json.data.object.amount / 100 }}\"\n    }\n]"
        }
      },
      "type": "n8n-nodes-base.clickUp",
      "typeVersion": 1,
      "position": [
        1980,
        0
      ],
      "id": "43c99118-7f42-4327-835b-933acf0dde07",
      "name": "ClickUp"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        1320,
        0
      ],
      "id": "9fadc2df-441b-4418-848a-2e67db0c8f1e",
      "name": "Aggregate"
    }
  ],
  "connections": {
    "Payment Stripe": {
      "main": [
        [
          {
            "node": "Get Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Leads": {
      "main": [
        [
          {
            "node": "Match by Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Match by Email": {
      "main": [
        [
          {
            "node": "Mark as Won",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Won": {
      "main": [
        [
          {
            "node": "Create Client Board",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Client Board": {
      "main": [
        [
          {
            "node": "Get Lists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Lists": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Swag Task": {
      "main": [
        [
          {
            "node": "Create Intro Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Intro Task": {
      "main": [
        [
          {
            "node": "ClickUp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Create Swag Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false
}
