AutomationFlowsGeneral › Secure Webhook Handler with Authorization

Secure Webhook Handler with Authorization

Original n8n title: If Workflow

If Workflow. Webhook trigger; 16 nodes.

Webhook trigger★★★★☆ complexity16 nodes
General Trigger: Webhook Nodes: 16 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:08:01.723336",
    "updatedAt": "2025-09-29T07:08:01.723354",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "nodes": [
    {
      "id": "b374f136-0050-40ea-b889-03c1e20a161e",
      "name": "If Node",
      "type": "n8n-nodes-base.if",
      "position": [
        1000,
        300
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$(\"Determine\").item.json[\"Jira issue key\"]}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1,
      "notes": "This if node performs automated tasks as part of the workflow."
    },
    {
      "id": "52e85300-9a2f-45e9-973e-0fda49a50bf1",
      "name": "Create issue",
      "type": "n8n-nodes-base.jira",
      "position": [
        1180,
        400
      ],
      "parameters": {
        "project": "10000",
        "summary": "={{$(\"Get ticket\").item.json[\"subject\"]}}",
        "issueType": "10003",
        "additionalFields": {
          "description": "=See Zendesk issue at: {{ $env.WEBHOOK_URL }}{{$(\"Get ticket\").item.json[\"id\"]}}"
        }
      },
      "credentials": {
        "jiraSoftwareCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "notes": "This jira node performs automated tasks as part of the workflow."
    },
    {
      "id": "85c93002-95d3-434d-b9e9-10ef714432b1",
      "name": "Update ticket",
      "type": "n8n-nodes-base.zendesk",
      "notes": "Update the Zendesk ticket by adding the Jira issue key to the \"Jira Issue Key\" field.",
      "position": [
        1360,
        400
      ],
      "parameters": {
        "id": "={{$(\"On new Zendesk ticket\").item.json[\"body\"][\"id\"]}}",
        "operation": "update",
        "updateFields": {
          "customFieldsUi": {
            "customFieldsValues": [
              {
                "id": 6689934837021,
                "value": "={{$(\"Create issue\").item.json[\"key\"]}}"
              }
            ]
          }
        }
      },
      "credentials": {
        "zendeskApi": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "3aa0dff6-f4a5-47c1-9843-271b78bfbf36",
      "name": "Get ticket",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        640,
        300
      ],
      "parameters": {
        "id": "={{$(\"On new Zendesk ticket\").item.json[\"body\"][\"id\"]}}",
        "operation": "get"
      },
      "credentials": {
        "zendeskApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "notes": "This zendesk node performs automated tasks as part of the workflow."
    },
    {
      "id": "efd1f838-226f-4869-83f8-086d31f8a9bc",
      "name": "Determine",
      "type": "n8n-nodes-base.code",
      "notes": "if issue was created already in Jira",
      "position": [
        820,
        300
      ],
      "parameters": {
        "jsCode": "/* configure here =========================================================== */\n/*  Zendesk field ID which represents the \"Jira Issue Key\" field.\n*/\nconst ISSUE_KEY_FIELD_ID = 6689934837021;\n\n/* ========================================================================== */\nnew_items = [];\n\nfor (item of $items(\"Get ticket\")) {\n    \n    // instantiate a new variable for status\n    var custom_fields = item.json[\"custom_fields\"];\n    var jira_issue_key = \"\";\n    for (var i = 0; i < custom_fields.length; i++) {\n        if (custom_fields[i].id == ISSUE_KEY_FIELD_ID) {\n            jira_issue_key = custom_fields[i].value;\n            break;\n        }\n    }\n\n    // push the new item to the new_items array\n    new_items.push({\n        \"Jira issue key\": jira_issue_key\n    });\n}\n\nreturn new_items;"
      },
      "notesInFlow": true,
      "typeVersion": 2
    },
    {
      "id": "41a1c04b-561b-41e3-be6e-fc953319abc1",
      "name": "Create comment to existing issue",
      "type": "n8n-nodes-base.jira",
      "position": [
        1180,
        200
      ],
      "parameters": {
        "comment": "={{$(\"On new Zendesk ticket\").item.json[\"body\"][\"comment\"]}}",
        "options": {},
        "issueKey": "YOUR_CREDENTIAL_HERE",
        "resource": "issueComment"
      },
      "credentials": {
        "jiraSoftwareCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "notes": "This jira node performs automated tasks as part of the workflow."
    },
    {
      "id": "33e0121e-703d-4c60-b257-a89a99db771a",
      "name": "On new Zendesk ticket",
      "type": "n8n-nodes-base.webhook",
      "position": [
        460,
        300
      ],
      "parameters": {
        "path": "your-webhook-path",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1,
      "notes": "This webhook node performs automated tasks as part of the workflow."
    }
  ],
  "connections": {
    "On new Zendesk ticket": {
      "main": [
        [],
        [],
        [],
        [],
        [],
        [],
        [],
        [],
        []
      ]
    }
  },
  "name": "If Workflow",
  "description": "Automated workflow: If Workflow. This workflow processes data and performs automated tasks.",
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "notes": "Excellent quality workflow: If Workflow. This workflow has been optimized for production use with comprehensive error handling, security, and documentation.",
  "id": "wf01ee6e4e4f7c"
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

If Workflow. Webhook trigger; 16 nodes.

Source: https://github.com/fsebbah/n8n-workflows/blob/a282cd21b0d0e618a64a2bf1dd2ac6da8b4592f4/workflows/If_Workflow.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

A production-ready authentication workflow implementing secure user registration, login, token verification, and refresh token mechanisms. Perfect for adding authentication to any application without

Crypto, Data Table, Execute Workflow Trigger
General

Portfolio Orchestrator. Uses httpRequest. Webhook trigger; 59 nodes.

HTTP Request
General

This n8n template demonstrates how a simple Multi-Layer Perceptron (MLP) neural network can predict housing prices. The prediction is based on four key features, processed through a three-layer model.

General

github code Try yourself

Google Calendar
General

This workflow receives new consult bookings via webhook (Calendly v2 or a generic scheduling tool), generates timed confirmation and reminder messages, runs each SMS through a separate compliance work

Twilio, Email Send