Integrations

How to add a webhook in KSeFGPT

Enter an HTTPS address, configure headers, run a controlled test and save the webhook for the selected company.

Go to the procedureWatch the video
Module
Integrations
Reading time
5 min
Difficulty
Easy

You could do this with your eyes closed :)

Published
August 28, 2026
Author
Rafał Zeidler
Format
Written guide and video

Written procedure

What you will do

You will add a Webhook integration to the selected company. It can pass messages from the Send Notification action to your own endpoint.

You will run a real browser POST test in the form. After saving, the Active card confirms only that the configuration was stored, so production behavior must also be checked in a controlled workflow and at the receiving endpoint.

Requirements

Before you start

Prepare a controlled HTTPS endpoint. It should accept a POST request and return a 2xx status. For the form test, it must also allow browser CORS requests, including OPTIONS and the headers you use.

Never show real tokens or secrets in screenshots, recordings or support requests.

ItemDescription
AccessThe company owner or an organization member with the integrations:manage scope.
PlanA plan with the Automation and Integrations features enabled, currently Trial, Pro or Enterprise.
EndpointA controlled HTTPS address that accepts POST. The form test requires a valid CORS configuration.
HeadersAn optional JSON object in which every value is a string.
Starting pointAfter signing in, select Integrations in the Automation navigation group.
Time requiredAbout 4 minutes.

Process recording

PT19.36S

The recording shows Webhook selection, address and header configuration, a controlled test and saving the integration.

How to add a webhook in KSeFGPT - video guide
01Step

Open integrations

In the side navigation, select Integrations in the Automation group. Select Add first integration, or Add integration if the list already contains other connections.

A dialog with the available integration types will open.

Step 1
Integrations list in KSeFGPT with the Add integration button
02Step

Select Webhook

In the Add integration dialog, select Webhook. Its card describes a connection that sends notifications to your own endpoint.

The Configure Webhook form will appear.

Step 2
Add integration dialog with the Webhook card visible
03Step

Enter a name and HTTPS address

Enter a recognizable integration name in Name. In Webhook URL, enter the full address of your controlled endpoint, preferably beginning with https://.

The test form accepts HTTP and HTTPS addresses, but HTTPS protects data in transit. KSeFGPT stores the webhook URL without encryption, so do not put a secret in the address itself.

Step 3
Configure Webhook form with a name and demonstration HTTPS address
04Step

Add headers and test the connection

If the endpoint requires authentication, enter it in Additional headers as a JSON object, for example `{"X-Webhook-Secret":"test-value"}`. Every value must be a string. Headers are encrypted when saved.

The current separate Secret field adds X-Webhook-Secret only to the form test. The backend does not store this value, so do not use that field as the only security configuration. Add a secret needed by a workflow to the headers JSON.

Select Test connection. The browser sends a POST with Content-Type application/json and a payload containing `test: true`, the message `Test połączenia z KSeFGPT` and the current timestamp. A 2xx status shows success. A CORS or network failure, or a response outside the 2xx range, shows a test error.

Step 4
Webhook form with an authentication header and a successful test result
05Step

Save the integration

Select Save. The button is available after you enter a name and URL. Saving does not require a successful test first.

After the dialog closes, the new card should show the entered name, the Webhook type and the Active status. The status means that the configuration was saved. It does not confirm that the endpoint received a message.

Step 5
Saved Webhook integration card with the Active status

Final state

Check the result

Find the card with the entered name in Integrations. It should show the Webhook type and the Active status.

In the automation editor, select the integration in a Send Notification action, run a controlled workflow and inspect Execution history and the endpoint logs. Runtime sends the raw message text from the backend with POST and the stored headers. Browser CORS does not apply, and Content-Type is not added automatically.

The Test button on a saved card does not currently send a request. Runtime also does not mark an HTTP 4xx or 5xx response as a failure, so confirmation at the receiving endpoint is essential.

Diagnostics

If something does not work

Compare the symptom with the table below.

SymptomLikely causeWhat to do
Test connection is disabledWebhook URL is empty.Enter the complete HTTP or HTTPS endpoint address. Use HTTPS in production.
Invalid URL formatThe address is incomplete or uses a protocol other than HTTP or HTTPS.Correct the address and include the protocol, host name and required path.
Invalid JSON headers formatThe field is not a JSON object or its syntax is invalid.Use an object such as `{"Header-Name":"value"}` and enter every value as a string.
The test ends with Failed to fetch or a CORS messageThe endpoint does not allow the KSeFGPT origin, POST, OPTIONS or the entered headers.Configure CORS at the endpoint or verify the connection with a controlled backend workflow.
The test shows HTTP 4xx or 5xxThe endpoint rejected the request or returned an error.Review the first 200 response characters, authentication rules and endpoint logs.
The secret works in the test but not in a workflowIt was entered only in the separate Secret field, which the backend does not currently store.Add X-Webhook-Secret to Additional headers and save the integration again.
The integration does not appear in the listSaving failed or the integrations:manage scope is missing.Check the save notification and ask the organization owner for the required permission.

What next

Adapt the endpoint to the content sent by the selected workflow. The form test sends a JSON object, but Send Notification passes raw message text, so these are two different payloads.

After every header change, run a controlled workflow and inspect the receiver logs. Do not treat the Active status or the Test button on the card as delivery confirmation.

Add a webhook to KSeFGPT

Sign in, configure a controlled endpoint and save the integration for the selected company.

Sign in to KSeFGPT

Related instructions

How to delete an integration in KSeFGPT

Select the correct connection, verify its name in the warning and safely remove an unused integration from the company.

Open instruction

How to send KSeF invoices to Fakturownia.pl in KSeFGPT

Select sales or purchase invoices from KSeF, send them through a saved integration and check the result for every document.

Open instruction

How to configure email sending in KSeFGPT

Enter the SMTP server, sign-in details and sender address, then save the email integration for the selected company.

Open instruction

How to add a Telegram integration in KSeFGPT

Enter the bot token and chat ID, send a test message and save the active connection for the selected company.

Open instruction