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.
- Module
- Automation
- Reading time
- 6 min
- Difficulty
- Intermediate
Follow the instructions carefully and you will succeed
- Published
- September 15, 2026
- Author
- Rafał Zeidler
- Format
- Written guide and video
Written procedure
What you will do
Create an automation that emails a PDF visualization of each newly detected incoming invoice to a specified address. Each invoice gets its own email. The PDF is generated from the invoice in KSeF; you do not choose a local file.
The example sends invoices to accounting. This action uses email delivery provided by KSeFGPT and does not require your own SMTP server.
Requirements
Before you start
The video and screenshots show the real interface with demonstration data. The history shown does not verify actual email delivery or PDF generation. Complete the final check in your inbox after a new event.
| Item | Requirement |
|---|---|
| Access | Select a company with Automation available on the account and permission to manage workflows. Organization members need automation:manage. |
| KSeF connection | A working KSeF token with access to the company’s invoices. The current attachment generation flow uses a token; a certificate alone does not cover this procedure. |
| Recipient | The inbox that should receive the invoices. Replace the demonstration address accounting@example.test with your own. |
| Starting point | Sign in, open Automations and select the correct company. |
| Time and effect | About 5 minutes to configure, plus waiting for a new invoice. An active workflow automatically sends documents to the specified recipients. |
Process recording
0:64Create a workflow that emails a separate PDF for each new invoice.
Create an empty workflow
In the automation list, select New Workflow. If the list is empty, use Create Your First Workflow. Enter a name such as “Invoice PDFs for accounting” in Name.
Keep the Od zera template and click Create workflow. The template name can appear in Polish. The empty workflow editor opens.

Set the event and disable batch mode
Click Choose a trigger, choose KSeF Event, then hover over KSeF Event Trigger and click Edit.
Choose Invoice Received. Leave Batch mode off and click Save in the dialog. Each detected invoice will trigger a separate run carrying its KSeF number. A batch containing several invoices does not carry the single invoice number required for an attachment.

Add the email action
Click Add step below the trigger and choose Send email under Actions.
Choose this exact action. Send Notification uses a separate integration, while Send batch email summarizes multiple invoices. They do not have the attachment switch described here.

Add the recipient and subject
Hover over Send email and click Edit. Enter the recipient in E-mail addresses and click the plus button Add recipient. The address should appear as a separate label above the input.
Enter a subject such as “New invoice with PDF” in Subject. Always add at least one recipient, even if the hint mentions a default company address. Add further addresses the same way; each receives the same PDF.

Enable the attachment and choose its language
Turn on Attach the invoice PDF. In Invoice PDF language, select English or choose Polish, German or Ukrainian.
This selects the PDF visualization language independently of the interface language. Your typed subject stays unchanged. No additional file upload is needed: KSeFGPT retrieves the invoice using its KSeF number and prepares the PDF. Click Save in the dialog.

Save and verify the workflow
Click Save at the top right of the editor. Wait for “Workflow saved successfully.”. Saving a block dialog does not save the whole workflow.
Reload the page and reopen Send email. Check the recipient, subject, enabled attachment and language. Close with Cancel. The editor should show two connected blocks: the KSeF trigger and email.

Activate the automation
Use the back arrow to return to the list. Open the three-dot menu for your workflow and choose Activate. Check that its status is Active.
Wait for a newly received invoice to be detected for this company. The Run button alone does not verify a KSeF event and its invoice attachment. To stop future sends, select Deactivate in the workflow menu.

Check the history after a new invoice
Choose Run history in the workflow menu. Expand the new run with status Completed and check both the trigger and Send email.
Open the recipient’s inbox, find the subject and open the PDF. Compare the invoice number, KSeF number, parties and amount with the correct invoice. Check the PDF language too. An “ok” result in history alone does not prove inbox delivery.

Final state
Check the result
The workflow is active, a new invoice has a completed run, and the recipient has received an email with an opening PDF of the correct invoice. Checking the file in the inbox confirms the full result.
Two new invoices should produce two separate emails with attachments. Multiple recipients in one action receive the same PDF language.
Diagnostics
If something goes wrong
| Symptom | Cause | Action |
|---|---|---|
| No PDF attachment option | You selected an integration notification or a batch email. | Add Send Email and open its configuration. |
| Recipient was not added | The address is invalid or already on the list. | Correct the address and check its recipient label. Do not leave the list empty. |
| Error mentioning missing ksefNumber | The action did not receive a single invoice, for example after a multi-invoice batch event or manual run. | Turn off Batch mode, save the workflow and check a run after a new Invoice Received event. |
| PDF retrieval or generation error | The KSeF token could not access the invoice or the visualization could not be generated. | Read the error details and check the token’s invoice access. Contact support for a PDF service error. The block does not confirm sending an email without the attachment. |
| Successful history, but no email | Success confirms that the delivery service accepted the send, not inbox delivery. | Check the saved address, subject and spam. If it is still missing, give support the workflow name and run time. |
Next steps
To change recipients or the PDF language, edit the same block and save the whole workflow again.
See the execution history guide for checking runs. For a summary of several invoices, see notifications after a KSeF event.
Set up PDF notifications
Sign in, select a company and create a workflow for your recipients.
Open KSeFGPT