AutomationFlowsGeneral › Secure JWT Booking Handler with MongoDB

Secure JWT Booking Handler with MongoDB

Original n8n title: Bookings

Bookings. Uses jwt, mongoDb. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexity5 nodesJwtMongoDB
General Trigger: Webhook Nodes: 5 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
{
  "name": "Bookings",
  "nodes": [
    {
      "parameters": {
        "path": "bookings-list",
        "authentication": "jwtAuth",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -340,
        -40
      ],
      "id": "6a49b655-b040-44b7-bdf1-0663319cd30c",
      "name": "Webhook",
      "credentials": {
        "jwtAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "decode",
        "token": "={{ $('Webhook').first().json.headers.authorization.split(' ').pop() }}",
        "options": {
          "complete": true
        }
      },
      "type": "n8n-nodes-base.jwt",
      "typeVersion": 1,
      "position": [
        -100,
        -40
      ],
      "id": "437041f7-2dbb-45fb-bab1-6d0d624fa888",
      "name": "JWT",
      "credentials": {
        "jwtAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "collection": "users",
        "options": {},
        "query": "={\n  \"email\": \"{{$('JWT').first().json.payload.email}}\"\n}"
      },
      "type": "n8n-nodes-base.mongoDb",
      "typeVersion": 1.2,
      "position": [
        160,
        -40
      ],
      "id": "e25892bd-e2bc-4748-ba47-04e4302f5448",
      "name": "MongoDB",
      "credentials": {
        "mongoDb": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "collection": "bookings",
        "options": {
          "sort": "={\n  \"created_at\": -1\n}"
        },
        "query": "={\n  \"user_id\": \"{{ $('MongoDB').first().json._id }}\"\n}"
      },
      "type": "n8n-nodes-base.mongoDb",
      "typeVersion": 1.2,
      "position": [
        380,
        -40
      ],
      "id": "b20d5acb-1158-4d21-92b5-85ffbe037a9c",
      "name": "MongoDB1",
      "credentials": {
        "mongoDb": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "allIncomingItems",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.3,
      "position": [
        600,
        -40
      ],
      "id": "f81b4406-50ea-4613-822b-fe0a81aabb68",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "JWT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JWT": {
      "main": [
        [
          {
            "node": "MongoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB": {
      "main": [
        [
          {
            "node": "MongoDB1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB1": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "664575fa-ae2e-4837-aaf0-2c4a7fce91d2",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "UqJXdHite2tsxJUv",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Bookings. Uses jwt, mongoDb. Webhook trigger; 5 nodes.

Source: https://github.com/albreis/manycure/blob/dd0ca71f23c3995b45f0572c4a7a9498a431ff47/workflows/Bookings.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

Register. Uses respondToWebhook, mongoDb. Webhook trigger; 7 nodes.

MongoDB
General

n8nCal · /auth. Uses jwt. Webhook trigger; 6 nodes.

Jwt
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.