n8n Webhook Workflow: Sequential Invoice & Ticket Numbers
n8n Webhook Workflow: Sequential Invoice & Ticket Numbers
Regular price
£18.99
Regular price
£18.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Webhook Workflow: Sequential Invoice & Ticket Numbers
Regular price
£18.99
Regular price
£18.99
Sale price
Unit price
/
per
Generate gapless sequential invoice & ticket numbers via an n8n POST webhook
This n8n Webhook Workflow: Sequential Invoice & Ticket Numbers issues the next gapless sequential number on demand. It reads and updates a counter in an n8n Data Table, then returns a properly formatted number (optional prefix + zero padding) as a JSON response.
What this workflow does
When you call the workflow with a POST request, it:
- Accepts a request on the webhook endpoint with a required
sequence_key, plus optionalprefixandpadparameters. - Validates and normalizes inputs, applying safe defaults when values are missing or malformed.
- Looks up the matching counter row in the n8n Data Table
number_sequencesusingsequence_key. - Calculates the next counter value, applies the requested (or stored) prefix, and formats the output using the requested zero-padding width.
- Upserts the updated counter back into the
number_sequencesData Table keyed bysequence_key. - Returns a JSON response including:
- the issued formatted number,
- the updated counter value, and
- a timestamp.
Use cases
- SaaS billing: generate invoice numbers that are consistent and sequential across your system.
- Support operations: assign ticket numbers in a gapless order for every new request.
- Multi-sequence systems: use different
sequence_keyvalues (e.g.,invoice,ticket) with the same webhook.
Technical details
- Webhook (POST) endpoint exposed by n8n
-
Data Table named
number_sequenceswith columns:sequence_key,current_value,prefix,updated_at - Code node for validation, incrementing, and formatting logic
- Respond to Webhook to return JSON (formatted number, counter, timestamp)
- Sticky Note for workflow documentation
Ideal for automation engineers and n8n users who need reliable, sequential numbering without manual tracking.
