Sometimes you want to take a different action in your error workflow based on the data that was flowing through it. This template illustrates how you can do that (more specifically, how you can retrieve the data of a webhook node). How it works Use the 'n8n' node to fetch the data of the failed execution Parse that data to find webhook nodes and extract the data of the one that was executed
Tags
Related workflows
See all General Automation→Upload CSV test cases to Qase and send completion alerts to Slack
Quick overview This workflow upload test cases from a CSV file into Qase App and sends a confirmation message to your Slack channel. How it works Receives a form submission containing a public CSV URL and a selected Qase project option. Downloads the CSV file from the provided URL and extracts its rows into individual test-case items. Maps each row into the JSON payload Qase expects (including project code, fields like severity/priority/type, and optional parsed steps). Creates the test cases in Qase by sending a POST request per item to the Qase Cases API for the mapped project. Aggregates the upload responses into a single result. Sends a Slack incoming-webhook message confirming the test case upload is complete. Setup Create a Qase API token and add it to the Qase HTTP Header Auth credentials used for the Qase API request. Create a Slack Incoming Webhook, paste the webhook URL into the Slack notification HTTP request node, and customize the message text if needed. Ensure the uploaded CSV is publicly accessible via URL and uses the expected columns (for example: title, description, preconditions, postconditions, severity, priority, type, layer, behavior, automation, and optional
Poll and download received invoice PDFs with KSeF Gateway to disk storage
Quick overview This workflow runs every 20 minutes to poll a self-hosted KSeF Gateway for newly received KSeF invoices, maintains a cursor checkpoint in n8n static data, downloads each new invoice PDF via the gateway API, and saves the files to local disk. How it works Runs every 20 minutes on a schedule. Reads the last successful polling checkpoint from the workflow’s static data and calls the KSeF Gateway /ksef/invoices/received/new endpoint with the since cursor. If the gateway response is unsuccessful, records the error details for alerting and leaves the checkpoint unchanged so the next run retries the same window. If the response is successful, stores the returned nextSince value as the new checkpoint. If new invoices are returned, processes each invoice summary individually. Downloads each invoice PDF from the KSeF Gateway /ksef/invoice/{ksefNumber}/pdf endpoint and saves it to the configured local folder. Outputs invoice metadata (number, seller, amount, and saved file path) as a placeholder where you can plug in notifications (Slack, email, or Discord). Setup Deploy and configure a self-hosted KSeF Gateway (https://github.com/jurczykpawel/ksef-gateway) with a token or cert
Create KSeF invoices from completed Sellf purchases via KSeF Gateway
Quick overview This workflow receives signed Sellf purchase webhooks, validates the HMAC signature, and when the buyer requests an invoice with a NIP it builds a KSeF-ready invoice and submits it to a self-hosted KSeF Gateway, capturing the returned KSeF number or an error. How it works Receives a POST webhook from Sellf with the raw request body and the X-Sellf-Signature header. Verifies the webhook signature using HMAC-SHA256 and rejects the request with a 401 response if the signature is invalid. Responds immediately with a JSON OK response and continues processing in the background. Filters the event to purchase.completed and extracts the customer, order, and invoice details from the webhook payload. Continues only if the customer requested an invoice and provided a non-empty NIP. Builds a KSeF invoice payload using your seller details and the purchase data, then posts it to your KSeF Gateway /ksef/invoice endpoint with an X-Api-Key header. Stores the KSeF submission result by extracting the ksefNumber and status on success, or capturing the returned error details on failure. Setup Set up Sellf webhooks to send purchase.completed events to this workflow’s production webhook URL