{
  "name": "Replicate line items on new deal in HubSpot and notify with Slack",
  "nodes": [
    {
      "id": "6f938c83-45fd-4189-b9ec-c7a6de4beb2d",
      "name": "Retrieve deals Ids",
      "type": "n8n-nodes-base.set",
      "position": [
        660,
        440
      ]
    },
    {
      "id": "abc534f2-03b4-4f34-8292-bc8011c62c44",
      "name": "Get deal won line items",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        920,
        440
      ]
    },
    {
      "id": "eb5ae93e-3b52-4a92-9506-5379bbca8e0b",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1740,
        440
      ]
    },
    {
      "id": "d18841d0-a270-4db5-9256-17026985c13b",
      "name": "Get batch SKUs from line items",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        440
      ]
    },
    {
      "id": "58a9ae81-26d5-47fb-9de7-bf108cb41f8d",
      "name": "Get Batch Product IDs by SKUs",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        440
      ]
    },
    {
      "id": "27b2619a-af84-475a-9bdc-c86462ea57d3",
      "name": "Create Batch line items based on productId and associate to deals",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1540,
        440
      ]
    },
    {
      "id": "f6776d74-c818-4f2b-b05a-5e6b53c2ad5f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        200
      ],
      "parameters": {
        "width": 565.8142732633208,
        "height": 838.7224568543345,
        "content": "# Replicate Line Items on New Deal in HubSpot Workflow\n\n## Use Case\nThis workflow solves the problem of manually copying line items from one deal to another in HubSpot, reducing manual work and minimi"
      }
    },
    {
      "id": "eefcd96e-c182-4362-bc60-6b5bca42e8a4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        300
      ],
      "parameters": {
        "width": null,
        "height": 393.4378126446013,
        "content": "**Step 1.**\nTriggered by HubSpot Workflow"
      }
    },
    {
      "id": "9fedd8cf-6d97-428e-8391-aedff191ba5d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        300
      ],
      "parameters": {
        "width": null,
        "height": 393.4378126446013,
        "content": "**Step 2.**\nSet the Ids of the deal won and the deal created"
      }
    },
    {
      "id": "b00a8849-0a13-40d3-a714-49f0afc54cea",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        300
      ],
      "parameters": {
        "width": 819.2253746903481,
        "height": 393.4378126446013,
        "content": "**Step 3.**\n- Get line items IDs from the deal won\n- Retrieve the SKUs from those line items\n- Get product based on SKUs\n- Create new line items from Product IDs and associate to the new deal\n"
      }
    },
    {
      "id": "8dc60064-83a1-488e-b1a5-7be57d734e88",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        420,
        440
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Retrieve deals Ids",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve deals Ids": {
      "main": [
        [
          {
            "node": "Get deal won line items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get deal won line items": {
      "main": [
        [
          {
            "node": "Get batch SKUs from line items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Batch Product IDs by SKUs": {
      "main": [
        [
          {
            "node": "Create Batch line items based on productId and associate to deals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get batch SKUs from line items": {
      "main": [
        [
          {
            "node": "Get Batch Product IDs by SKUs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Batch line items based on productId and associate to deals": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}