Running Workflows
Executing complex multi-step workflows
Running workflows
POST /workflows/{workflow_permanent_id}/run
You can see the generic endpoint definition below. We’ll go into the specifics of the invoice retrieval workflow in the next section.
Body
Response
Sample Request & Response - Invoice retrieval
Retrieving workflow runs
GET /workflows/runs/{workflow_run_id}
Response
Sample response
Webhooks
Skyvern always sends webhooks when a workflow run is executed. The status for an executed workflow run can be: completed, failed, terminated
.
The webhook body is the same as the get workflow run endpoint.
Webhook Headers
We’ll be using the same strategy slack uses, as defined here: https://api.slack.com/authentication/verifying-requests-from-slack#making__validating-a-request |
Explaining outputs
If you checked out the sample response, you probably thought “What the heck is this field right here?”.
We previously went over that workflows are essentially a list of building blocks. outputs
field has the output for every single block that a workflow has. Before we start analyzing the outputs
from the sample above, let’s go over the building blocks for the invoice retrieval workflow.
Building blocks of invoice retrieval workflow:
⚠️ Still in development, not a blocker
- The blocks within the ForLoop show up twice: within the ForLoop output and as a root block.
- UploadToS3Block output is S3 URIs at the moment. They’ll be updated with signed urls instead.
- Add block type to each object in
outputs
, define the output structure for each block for easier integration.