Skip to main content

Build a full REST-API with n8n webhooks

Workflow preview

Workflow preview
100%
Build a full REST-API with n8n webhooks preview
Open on n8n.io

1. Workflow Overview

What is it? A clean, extensible REST style API routing template for n8n webhooks with up to 3 path levels. How does it work? 1. Serves API routes via Webhooks with path variables 2. Normalizes inco...

Best for

  • Engineering automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.set, n8n-nodes-base.webhook, n8n-nodes-base.stickynote, n8n-nodes-base.code, n8n-nodes-base.respondtowebhook, n8n-nodes-base.noop, n8n-nodes-base.executeworkflow, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Christian Knoflach.

Original n8n.io source

1.1 Workflow description

Title
Build a full REST-API with n8n webhooks
Workflow name
Build a full REST-API with n8n webhooks

What is it?

A clean, extensible REST-style API routing template for n8n webhooks with up to 3 path levels.

How does it work?

  1. Serves API routes via Webhooks with path variables

  2. Normalizes incoming requests into "global" _REQUEST and _CFG nodes

  3. Flexible routing with Switch-nodes based on path segments & request method

Key features

  • No setup required
  • Supports multiple HTTP methods
  • Global config via code node
  • Separation of concern between config/request and implementation data flow
  • Easy to extend

Use cases

  • Prototyping backend APIs via JSON-responses
  • Serving interactive websites via HTML-nodes + TEXT responses

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - -> POST

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 2 - -> GET

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - -> PUT

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - -> DELETE

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - v1/seg1

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 6 - v1/seg2

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 7 - v1/seg3

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - _CFG

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - _REQUEST

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Respond to Webhook1

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 14 - Invalid Route

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 15 - Clear JSON

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Invalid Route1

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 17 - Invalid Route2

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 18 - Invalid Route3

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 19 - Respond to Webhook

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

Block 20 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Routing

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 23 - Check baz status

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 24 - Create new baz

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Showing the first 24 of 49 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Build a full REST-API with n8n webhooks
Complexity advanced
Nodes 49
Categories Engineering
Author Christian Knoflach
Published 18 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12789/12789.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a full REST-API with n8n webhooks do?

What is it? A clean, extensible REST style API routing template for n8n webhooks with up to 3 path levels. How does it work? 1. Serves API routes via Webhooks with path variables 2. Normalizes inco...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.