{
  "id": "x9VXeBrmzjjGqAx6",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Webhook for Leads from Landing Page \u2192 Jira Lead Task \u2192 Slack Hunter Bot",
  "tags": [],
  "nodes": [
    {
      "id": "ebe98592-e9c0-48ad-84ad-1edbae249d0f",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -32,
        0
      ],
      "parameters": {
        "path": "73983463-2dbc-47a7-889d-0873939c2805",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "b51b0788-95c2-4496-9bca-92be1310d4aa",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        208,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2b876b51-6cdb-4676-87eb-8e79781c529a",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.body.last_name }}",
              "rightValue": ""
            },
            {
              "id": "60913151-48cc-4f0f-ac77-648c6e6e8679",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.body.company_name }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2c69ba43-42a7-4cd4-a7e5-a4983cf78ebb",
      "name": "Create a lead",
      "type": "n8n-nodes-base.zohoCrm",
      "position": [
        464,
        -176
      ],
      "parameters": {
        "Company": "={{ $json.body.company_name }}",
        "lastName": "={{ $json.body.last_name }}",
        "resource": "lead",
        "additionalFields": {
          "Email": "={{ $json.body.email }}",
          "Phone": "={{ $json.body.phone }}",
          "Industry": "={{ $json.body.referrer }}",
          "First_Name": "={{ $json.body.first_name }}",
          "Description": "={{ $json.body.description }}"
        }
      },
      "credentials": {
        "zohoOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "da80beae-44e9-4f5a-914c-cc9680cdbdef",
      "name": "Create an issue",
      "type": "n8n-nodes-base.jira",
      "position": [
        704,
        -176
      ],
      "parameters": {
        "project": {
          "__rl": true,
          "mode": "list",
          "value": "10000",
          "cachedResultName": "n8n sample project"
        },
        "summary": "=New lead generated",
        "issueType": {
          "__rl": true,
          "mode": "list",
          "value": "10003",
          "cachedResultName": "Task"
        },
        "additionalFields": {
          "assignee": {
            "__rl": true,
            "mode": "list",
            "value": "712020:9fe0da7f-b88e-404e-b973-5428ffe53eab",
            "cachedResultName": "Mobile1 Mobile1"
          },
          "priority": {
            "__rl": true,
            "mode": "list",
            "value": "2",
            "cachedResultName": "High"
          },
          "description": "=Company Name : {{ $('If').item.json.body.company_name }}\nName: {{ $('If').item.json.body.first_name }} {{ $('If').item.json.body.last_name }}\nEmail: {{ $('If').item.json.body.email }}\nPhone: {{ $('If').item.json.body.phone }}\nTitle: {{ $('If').item.json.body.title }}\nDescription: {{ $('If').item.json.body.description }}\nReferrer: {{ $('If').item.json.body.referrer }}"
        }
      },
      "credentials": {
        "jiraSoftwareCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dde75e9c-d208-47eb-a2fe-370933f30156",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        944,
        -176
      ],
      "parameters": {
        "text": "=New lead created!! \n\nCompany Name : {{ $('If').item.json.body.company_name }}\nName: {{ $('If').item.json.body.first_name }} {{ $('If').item.json.body.last_name }} \nEmail: {{ $('If').item.json.body.email }} \nPhone: {{ $('If').item.json.body.phone }} \nTitle: {{ $('If').item.json.body.title }} \nDescription: {{ $('If').item.json.body.description }} \nReferrer: {{ $('If').item.json.body.referrer }}\n\nNew Jira task created\nTask id: {{ $json.key }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09EV0SGCE5",
          "cachedResultName": "team-n8n-workflow"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7861ab37-3d46-4826-b3bf-2c2190ff375e",
      "name": "Send a message1",
      "type": "n8n-nodes-base.slack",
      "position": [
        464,
        192
      ],
      "parameters": {
        "text": "=New lead processed but company name or last name is missing. Below are availabled details:\nName: {{ $('Webhook').item.json.body.first_name }} {{ $('Webhook').item.json.body.last_name }}\nCompany name: {{ $('Webhook').item.json.body.company_name }}\nEmail: {{ $('Webhook').item.json.body.email }}\nPhone: {{ $('Webhook').item.json.body.phone }}\nTitle: {{ $('Webhook').item.json.body.title }}\nDescription: {{ $('Webhook').item.json.body.description }}\nRefferer: {{ $('Webhook').item.json.body.referrer }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09EV0SGCE5",
          "cachedResultName": "team-n8n-workflow"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "be41773d-5aaa-4639-95a4-e10acc609103",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -304
      ],
      "parameters": {
        "width": 368,
        "height": 688,
        "content": "## How it works\n\n\u2022\tWebhook receives lead data (name, company, email, phone, title, description, referrer).\n\u2022\tCheck if company_name and last_name are present.\n\u2022\tIf either field is missing \u2192 send Slack message:\n\u2022\t\u201cEither last name or company name missing\u201d\n\u2022\tInclude all other submitted details.\n\u2022\tIf both fields are present \u2192 create Zoho CRM Lead using webhook data.\n\u2022\tAfter creating lead \u2192 create Jira Task with lead information.\n\u2022\tAfter Jira task creation \u2192 send Slack message:\n\u2022\t\u201cNew lead created!!\u201d\n\u2022\tDisplay all submitted details.\n\u2022\tInclude the newly created Jira task ID.\n\u2022\tWorkflow ends.\n\n## Setup Steps\n\u2022\tWebhook expects: first_name, last_name, company_name, email, phone, title, description, referrer\n\u2022\tZoho CRM \u2192 Create Lead \u2192 map all webhook fields\n\u2022\tJira \u2192 Create Issue \u2192 select project \u2192 choose issue type\n\u2022\tSlack \u2192 choose channel or user \u2192 send message with details and Jira task ID"
      },
      "typeVersion": 1
    },
    {
      "id": "068970fb-e033-4015-b063-673d29851508",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 384,
        "content": "Receives incoming JSON data containing the lead information.\n\nTriggers the workflow whenever valid data is posted to the endpoint."
      },
      "typeVersion": 1
    },
    {
      "id": "df79aa00-a641-41bf-97dc-76f7ba95727b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -368
      ],
      "parameters": {
        "color": 7,
        "width": 704,
        "height": 448,
        "content": "Sends a message indicating missing required fields.\nIncludes all submitted lead details for quick review.\n\nSends a message indicating missing required fields.\nIncludes all submitted lead details for quick review.\n\nSends a message indicating missing required fields.\nIncludes all submitted lead details for quick review."
      },
      "typeVersion": 1
    },
    {
      "id": "54ec153f-2bc6-4095-be26-3532bffbc9ae",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        112
      ],
      "parameters": {
        "color": 7,
        "width": 704,
        "height": 320,
        "content": "Sends a message indicating missing required fields.\n\nIncludes all submitted lead details for quick review."
      },
      "typeVersion": 1
    },
    {
      "id": "aa5e3a8c-6249-4bdd-9a28-830ef89c6d7b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 384,
        "content": "Checks whether company_name and last_name are provided.\n\nIf either is missing, the workflow follows the error path."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bcf3a6cd-11d6-40fb-9cc5-85cf568335f7",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create a lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a lead": {
      "main": [
        [
          {
            "node": "Create an issue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an issue": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}