What is a Workflow?
A workflow in Invopop is a sequence of steps executed for each incoming job. Each step is powered by the provider of a service. Examples of services include:- Generating PDFs
- Forwarding invoices to tax agencies
- Modifying documents
- Sending emails
- Posting webhooks
- Sending documents to ERPs or other systems
Anatomy of a Workflow

-
Main flow: defines the standard sequence of steps that the workflow follows under normal conditions. It represents the intended execution path, showing how tasks progress when the steps execute correctly (
OK
) and when exceptions or errors are handled within conditions. - Error handling flow defines the sequence of steps when an unhandled error or exception occurs. It allows you to specify alternative actions, recovery logic, or notifications to ensure the process can handle unexpected conditions gracefully. Keep in mind the error handling flow is executed if a step does not handle its own error through a condition.
- Steps are action performed with the entry being processed, such as sending the document to a tax authority, generating a PDF, or sending a notification to the customer or issuer.
- Conditions determine the logic that directs how a workflow proceeds. They evaluate the status and code outcome of a given step, and if there’s a match, it will execute the steps contained within that condition. If the status of a condition is
KO
, the error handling flow won’t be executed as this would be a handled error.
How to create a Workflow
Although workflows can be created via the API, we strongly recommend using the Invopop Console for an easier set up. In the Workflows section click on + Create workflow. You will see a template selection screen. The first two items are blank workflows for each document type:
- Empty Invoice workflow: for sales or expenses.
- Empty Party workflow: for suppliers or customers.

Creating conditions
Conditions create blocks that execute when a given status and code (optional) match the response of a workflow step. There are two status signals (OK
and KO
) plus Any
, which matches regardless of the status.
- OK: when a workflow step completes as expected.
- KO: when there was an error in the step’s execution.
- Any: will match both
OK
andKO
.
KO
status signal. Since GOBL already handles many of the validations in tax authorities lists, we recommend only implementing conditions which happen in your workflow with certain regularity and which should be handled automatically.
As an example, we will handle the case where a supplier is not registered in the taxpayer census by the AEAT:
1
Add a condition on the step
On the desired step, click on the menu button 
...
and select Add condition.
2
Configure the condition

- Status:
KO
. - Code:
4107
(Tax ID not identified in the taxpayer census). - End workflow here:
✔
(the workflow will stop executing after this block).
3
Add an action to the condition block

Running a Workflow
Workflows in Invopop can be executed through the following methods:- Manually via the Invopop Console
- Via API calls to the create job endpoint
- Automatically by an embedded application.
Error Handling
Any step that causes an error (KO
) from which the job can’t recover, and is not handled through a condition, will trigger the error handling flow. To enable this section, tap on Handle Errors at the bottom of the workflow creation screen, then add steps into this area which you want to execute when the job fails (often times setting the entry’s state to Error
and possibly sending a notification).
FAQ
How do I update deprecated workflow steps?
How do I update deprecated workflow steps?
If your step conditions displays a This step contains deprecated conditions warning, your workflow will continue working normally, but we recommend updating your workflow so that you can modify it without unexpected behavior.Steps under deprecated conditions will display with a warning symbol ⚠️ with the label “Go to [action name]”. Click on the menu button
...
and select “Replace”, and then select the replacement action from the sidebar. So, for example, if the deprecated step is labelled “Go to Set State”, replace this step with “Set State” and choose the same configuration as the original step (which you should find further down within the same workflow).Once all deprecated steps are replaced, locate the the referenced action(s) and delete.