{
  "name": "Drive-to-store lead generation (with coupon) with Google Sheets & SuiteCRM",
  "nodes": [
    {
      "id": "53342c2a-f707-4ed0-9054-7928e6832745",
      "name": "Token SuiteCRM",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1560,
        920
      ]
    },
    {
      "id": "18d04094-1ced-4431-9ba2-b9b33d76c453",
      "name": "Create Lead SuiteCRM",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1800,
        920
      ]
    },
    {
      "id": "59b9c124-f6eb-457d-b3cb-2c831b66db85",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        440,
        1020
      ]
    },
    {
      "id": "75d6f561-754d-4153-8a85-12cb135a555c",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        440,
        820
      ]
    },
    {
      "id": "e9eac3a2-0351-4457-ae1d-44d42974ab20",
      "name": "Duplicate Lead?",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        820
      ]
    },
    {
      "id": "a5ae5f5a-7028-495b-ad27-192561ce88d5",
      "name": "Form Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        680,
        820
      ]
    },
    {
      "id": "9edb0d07-b4fb-42f8-9555-1d3caf8998c7",
      "name": "Get Coupon",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1340,
        920
      ]
    },
    {
      "id": "9469dd95-04ac-4c74-abb3-674fec277f6e",
      "name": "Respond OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2300,
        920
      ]
    },
    {
      "id": "5b81c406-d70b-4a36-b4f4-8941373958b9",
      "name": "Respond KO",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1320,
        700
      ]
    },
    {
      "id": "5fdf0eca-d1f6-4c9e-8e77-84d8e71bdb0e",
      "name": "Is Duplicate?",
      "type": "n8n-nodes-base.if",
      "position": [
        1080,
        820
      ]
    },
    {
      "id": "e9cba682-bf5b-4efa-9d10-4fab5d02610a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        20
      ],
      "parameters": {
        "width": 540,
        "height": 380,
        "content": "## STEP 1\n\nCreate a Google Sheet like this (Fill only the column \"COUPON\")\n\n[![2mXGVwB.md.png](https://iili.io/2mXGVwB.md.png)]\n\nThis is the basic Google Sheet used in [this Workflow](https://docs.goo"
      }
    },
    {
      "id": "1c304620-368d-42bf-b0d2-de3f9d552e51",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        440
      ],
      "parameters": {
        "width": 540,
        "height": 260,
        "content": "## STEP 2 - MAIN FLOW\n\nThis workflow is ideal for businesses looking to automate lead generation and management, especially when integrating with CRM systems like SuiteCRM and using Google Sheets for "
      }
    },
    {
      "id": "6248c920-02f4-4407-881a-376d2a9dd904",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        740
      ],
      "parameters": {
        "width": 340,
        "height": 240,
        "content": "Check if the lead has already received the coupon"
      }
    },
    {
      "id": "0c07d1b7-b12f-4cf7-8d0c-1dd905365534",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        860
      ],
      "parameters": {
        "width": 180,
        "height": 220,
        "content": "Find the first available unassigned coupon"
      }
    },
    {
      "id": "34167626-9041-4cce-baaf-e1ed2efe8378",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        700
      ],
      "parameters": {
        "width": 400,
        "height": 380,
        "content": "Enter the lead with the relative coupon on Suite CRM. Change SUITECRMURL, CLIENTSECRET and CLIENTID\n\nTo create the CLIENTSECRET and CLIEDID go to Admin -> Oauth2 Client and Token -> and click on \"New "
      }
    },
    {
      "id": "50f65f6b-8045-4cb1-9e3d-489f27cdb038",
      "name": "Update Lead",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2040,
        920
      ]
    }
  ],
  "connections": {
    "Get Coupon": {
      "main": [
        [
          {
            "node": "Token SuiteCRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form Fields": {
      "main": [
        [
          {
            "node": "Duplicate Lead?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Duplicate?": {
      "main": [
        [],
        [
          {
            "node": "Get Coupon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Token SuiteCRM": {
      "main": [
        [
          {
            "node": "Create Lead SuiteCRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Duplicate Lead?": {
      "main": [
        [
          {
            "node": "Is Duplicate?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Form Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Lead SuiteCRM": {
      "main": [
        [
          {
            "node": "Update Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}