Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Make website webhooks and integrations reliable

    An integration needs more than receipt of a notification. It must distinguish valid events, duplicates, delays and interrupted processing to avoid repeating business operations.

    Go to the method

    Network cables and tablet displaying a workflow
    AI-generated illustration

    Write the event contract

    Document the producer, expected event types, required fields and triggered operation. Describe results for creation, change and deletion where applicable. A notification should not implicitly authorise every possible action.

    Choose a tracking identifier and an authoritative source to consult when uncertain. Describe how failures at the producer or receiver are detected. Integration documentation holds rules and owners; secrets belong in the project’s secure mechanism.

    In n8n, test and production webhook URLs serve different purposes. Listening for a test event does not prepare ongoing reception: the production URL is registered when the workflow is published. Check the URL configured at the sender and review production runs in Executions.

    The response mode changes what an acknowledgement means. With Immediately, the response reports workflow startup; it does not confirm that an order or customer record was updated. Link the event identifier, execution and final state in the destination before reporting business success.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    n8n example: receipt, execution and outcome
    CheckpointPossible observationExpected evidence
    Test URLEvent visible while listening for a testURL and environment used for the trial
    Production URLPublished workflow and recorded executionExecution identifier linked to the received event
    Immediately responseThe workflow startedFinal state and expected operation in the destination service

    Verify before triggering an operation

    GitHub documents delivery signature validation using the configured secret and received payload. Follow the actual provider’s documented mechanism; headers, algorithms and formats should not be copied from another service by analogy.

    Separate origin verification, schema validation and operation authorisation. Test altered content, an unexpected event type and a missing field. Business processing should begin only after the controls required for the use case.

    Plan repeats and interruptions

    Define idempotent handling: a recognised repeated delivery should not create two orders or two final notifications. Test repetition before, during and after processing and an interruption between steps. The mechanism depends on the operation and storage involved.

    Check the provider’s ordering and redelivery guarantees rather than assuming immediate, one-time arrival. Keep a queue of work requiring review and a way to reconcile it with the source. A positive technical response should correspond to a defined processing state.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test events beyond the ideal case
    Situation or settingWhat it meansUseful check
    The same event arrives twiceApply one business operation under the deduplication strategy.Keep the event identifier and check final state, not only the HTTP code.
    Events arrive out of orderReconstruct the useful state without assuming delivery order.Test an update arriving before the expected notification and consult the source if needed.
    Invalid signatureNo business effect should be triggered.Check rejection, then the ability to process a valid event after the failure.

    Arrange monitoring and recovery

    Record an event identifier, state and useful error while minimising data. Define who monitors failures, how authorised events are retried and how retries avoid duplicating completed work.

    Interrupt the receiver in a test environment and restore it. Check catch-up and reconcile expected business results. Deliver an event contract, test batch, processing history and recovery procedure that the team can use.

    Primary documentation : GitHub : Validating webhook deliveries.

    Fictional example: DEMO-E41 triggers one business write in a database. The contract groups that write and marking the event processed in the same transaction; a unique key combining producer and identifier controls concurrent processing. Test interruption before and after COMMIT. Recovery after commit finds the completed work instead of adding another effect. Recording “received” in a separate log does not provide that guarantee.

    GitHub redelivery retains the X-GitHub-Delivery value, so a retry must not be treated as a new event merely because it is another attempt. Check each other producer’s behaviour separately. DEMO-E42 illustrates a different boundary: a call to an external service times out without a response. A local transaction cannot establish whether that service acted; reconcile its reference and documented retry guarantees before repeating the action.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Four fictional recovery checkpoints for an integration
    Test caseEstablished business effectExpected recovery
    DEMO-E41 before COMMIT, transaction rolled back0 committed effectsRecover using the transactional record
    DEMO-E41 after COMMIT1 effect and event marked processedRetrieve the already committed result
    DEMO-E41 delivered againStill 1 effect in totalRecognize the key; do not reapply the write
    DEMO-E42: external call without a responseUnknown outcome: 0 or 1 effect possibleReconcile with the service; avoid blind repetition
    • GitHub : Webhook Best Practices

      GitHub, consulted 22 October 2026: identifier retained on redelivery. The abbreviated DEMO-E41 and DEMO-E42 events are fictional.

    • PostgreSQL : Transactions

      PostgreSQL, consulted 22 October 2026: database transactions; no global guarantee for an external call.

    Reference documents

    Content updated on

    Documented reference points for this topic

    Documented reference points for this topic
    ReferenceValue or syntaxScope
    RFC 8259 · JSON
    application/json · UTF-8Standard JSON permits neither comments nor trailing commas; strings use double quotes.
    RFC 3339 · Date-time
    2026-10-22T09:00:00+02:00The explicit offset relates local time to UTC; this example is not an appointment.

    Dates indicate when references were consulted. These facts are neither a site audit nor an overall compliance statement.

    Read an integration acknowledgement

    Examine what is accepted, what is confirmed and what still needs monitoring. The receiving endpoint’s response does not describe every downstream action.

    These excerpts are incomplete and use demonstration addresses. The trial creates a Response in memory: it contacts no server and simulates neither network, cache nor business processing.

    202Accepted, processing still pending
    What it means
    202 indicates acceptance for processing, not completion. The fictional body reports queued.
    What to check
    Keep reference DEMO-42 and follow its state under the API contract, including access rights and retry limits.
    Watch out for
    Response.ok is true for this status. Neither that value nor readable JSON proves completion. The excerpt’s fields and monitoring address are fictional conventions.
    Fictional exchange excerpt
    POST /demo/jobs
    
    HTTP/1.1 202 Accepted
    Location: /demo/jobs/DEMO-42
    Content-Type: application/json
    
    {"job":"DEMO-42","status":"queued"}

    204Request fulfilled, no response body
    What it means
    204 indicates that the server fulfilled the request without response content. This excerpt transmits no JSON.
    What to check
    Handle the absent body according to the contract. Establish exactly what the receiving endpoint confirms before reporting an outcome to the visitor.
    Watch out for
    Parsing the empty body as JSON fails even though Response.ok is true. For a webhook, the confirmed operation may be receipt; subsequent business actions still need reconciliation.
    Fictional exchange excerpt
    POST /demo/events
    
    HTTP/1.1 204 No Content

    Technical references : RFC 9110 §15 · MDN · Response.ok · MDN · Response.json() · .

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Valid deliveryThe allowed event triggers an expected action that can be traced.Delivery identifier, signature-validation result and identifier of the business effect created during testing.
    Changed body or invalid signatureBusiness processing never begins for the refused event.Observed refusal using a fully synthetic notification and test-only verification material.
    Same delivery received twiceRepetition creates no unwanted additional business operation.Number and identifiers of recorded operations after both controlled attempts.
    Delayed or reversed eventsThe ordering rule prevents older information replacing a newer state.Controlled chronology and documented final state, including any ordering limitations.

    Frequently asked questions

    Why send the same event more than once in a test?

    To ensure a repetition does not trigger duplicate business operations. Providers may support or produce redelivery; receivers need to understand the rules and retain appropriate processing state.

    Is a valid signature sufficient?

    It contributes to origin and integrity checks according to the mechanism used. Event type, required data, permitted actions and processing state still need checking before a business operation.