Automation

How to create automation from scratch in KSeFGPT?

Create an empty workflow, add a schedule and fetch KSeF invoices. Save your configuration and verify it after reloading.

Go to the procedureWatch the video
Module
Automation
Reading time
6 min
Difficulty
Intermediate

Follow the instructions carefully and you will succeed

Published
September 17, 2026
Author
Rafał Zeidler
Format
Written guide and video

Written procedure

What you will do

Build a workflow from an empty template: a schedule triggers an action that fetches incoming and outgoing KSeF invoices. The example uses a daily schedule.

The result of this guide is a saved, inactive workflow. Running it and checking the fetched data are the next stage, covered in a separate guide.

Requirements

Before you start

The screenshots and video show the current interface with demonstration data. Configuration and its reload in the UI were checked; this does not verify actual invoice retrieval or backend persistence.

ItemRequirement
AccessA signed-in account, selected company and access to Automations. The example uses the company owner; organization members need permission to manage automations.
KSeF connectionA working KSeF token for this company. The creation screen requires a credential; the fetch action shown here uses a token without a separate authentication-method selector.
Starting pointOpen Automations and select the company that will own the workflow.
Time and resultAbout 5 minutes. A saved schedule and action; the workflow is not run in this guide.

Process recording

0:61

Build and save a workflow with a schedule and an action to fetch KSeF invoices.

Automation from scratch
01Step

Create an empty workflow

Choose New Workflow; if the list is empty, click Create Your First Workflow. Enter “Daily invoice fetch” in Name.

Keep the Od zera template (its API-provided name can remain Polish) and click Create workflow. An empty editor opens with Choose a trigger.

Step 1
KSeFGPT: Create an empty workflow and give it a name.
02Step

Add the schedule trigger

Click Choose a trigger. Under Triggers, select Schedule.

The Schedule Trigger block appears. A trigger determines when a workflow run begins.

Step 2
KSeFGPT: Choose the Schedule trigger.
03Step

Set a daily schedule

Hover over Schedule Trigger and click Edit. Select Daily in Interval.

Custom Cron expression (optional) is filled automatically with 0 0 * * *. Keep it and click Save in the dialog. This selects a daily schedule; saving does not activate the workflow.

Step 3
KSeFGPT: Set a daily interval and save the block.
04Step

Add the invoice fetch action

Click Add step below the trigger. Under Actions, choose Fetch KSeF Invoices.

The Fetch Invoices block appears below the schedule. An action determines what the workflow does after the trigger starts it.

Step 4
KSeFGPT: Add the action to fetch KSeF invoices.
05Step

Choose both invoice types

Hover over Fetch Invoices and click Edit. In Invoice Type, first select Income, then Both. This explicitly stores the choice even when the field initially displays Both.

Leave Date From and Date To empty to avoid a fixed date range. Click Save in the dialog. Both directions are selected; an empty range does not promise retrieval of the entire KSeF archive.

Step 5
KSeFGPT: Choose both invoice types and leave the dates empty.
06Step

Save and check both blocks again

Click Save at the top right of the editor. Wait for “Workflow saved successfully.”. Saving an individual block does not save the entire workflow.

Reload the page. Edit Schedule Trigger, check Daily and the generated Cron, then close with Cancel. Edit Fetch Invoices, check Both and empty dates, then choose Cancel again.

Step 6
KSeFGPT: Save the entire workflow and check both blocks after reloading.
07Step

Check the workflow in the list

Use the back arrow to return to the automation list. Find “Daily invoice fetch” and check its Inactive status.

This is the expected result: your configuration is saved and is not running yet. Building the workflow from scratch is complete.

Step 7
KSeFGPT: Return to the list and check the saved, inactive workflow.

Final state

Check the result

Your inactive workflow is listed. Reopening it shows two connected blocks: Schedule Trigger and Fetch Invoices, with Daily, both invoice types and empty dates.

A saved configuration is not evidence that documents have been fetched. For the next stage, follow How to run an automation and check execution history.

Diagnostics

If something does not work

SymptomCauseWhat to do
An empty workflow name cannot be submittedThe name is required.Enter Name, then click Create workflow.
A block shows a missing-field messageA required block setting has not been saved.Open Edit, select the interval or invoice type and save the block.
Both is displayed but not storedA visual default is not necessarily a saved value.Select Income, then Both; save the block and the workflow.
A change disappears after CancelCancel keeps the previous block settings.To retain a change, click Save in the dialog and then in the editor.
The saved workflow does not fetch anythingA new workflow remains inactive.Configuration is complete. The linked guide explains activation and run history.

Next steps

How to run an automation and check execution history covers running the workflow and checking its result.

How to configure a KSeF connection in KSeFGPT helps you prepare KSeF access.

How to send a sales invoice PDF to a fixed team email address? shows another workflow from scratch: sending sales invoice PDFs to your team.

Build your own workflow

Sign in, select your company and connect a trigger to an action.

Open KSeFGPT

Related instructions

How to send a sales invoice PDF to a fixed team email address?

Configure an email with a PDF of each new outgoing KSeF invoice. Set a fixed team inbox, choose the language and verify the saved workflow.

Open instruction

How to send an invoice notification with a PDF

Send a separate email with a PDF for each new invoice received in KSeF. Choose the recipient and PDF language, save the workflow and check the result.

Open instruction

How to send a notification after a new KSeF event

Create a workflow for new incoming invoices, set the recipients of single and batch e-mails, activate it and check the result in history.

Open instruction

How to create an automation from a ready-made template

Choose the ready-made invoice fetch workflow, set its schedule and document scope, then save your first automation.

Open instruction