Advanced Workflows are currently only available for Enterprise customers. To upgrade, get in touch with our sales team.

The Kadoa Advanced Workflow API provides endpoints to manage workflows efficiently. In this guide, you’ll learn how to:

  • Fetch workflow data
  • Fetch workflow configuration
  • Update an existing workflow
  • Delete a workflow

Create an Advanced Workflow

Creation of new advanced workflows is currently only possible via our Chrome Extension or our Workflow Builder in the Kadoa Dashboard. Please refer to the Setup Guide for more information.

Fetch Workflow Data

Use the following endpoint to retrieve details about a specific workflow:

GET /v4/workflows/{workflowId}/data

See API Reference

The response will include the result data and some additional metadata about the workflow run.

{
  "workflowId": "123456789",
  "runId": "987654321",
  "executedAt": "2024-11-07T07:24:14.317Z",
  "data": [
    ...
  ],
  "pagination": {
    "totalCount": 1,
    "page": 1,
    "totalPages": 1,
    "limit": 25
  }
}

Fetch Workflow Configuration

Use the following endpoint to retrieve the configuration of an advanced workflow:

GET /v4/advanced-workflows/{workflowId}

Request Parameters

  • workflowId (string, required): The ID of the workflow to fetch.
  • Authorization (header, required): API key for authorization.

Example Request

curl -X GET "https://api.kadoa.com/v4/advanced-workflows/123456789" \
  -H "x-api-key: YOUR_API_KEY"

Response

The response will include the workflow configuration.

{
  "_id": "672ca6901bbb07110098eb1a",
  "name": "Test",
  "limit": 1,
  "state": "RUNNING",
  "userId": "a0198564-fb30-4186-ab69-27547c0552a1",
  "updateInterval": "only once",
  "createdAt": "2024-11-07T11:40:21.237Z",
  "isAdvanced": true,
  "startedAt": "2024-11-07T11:40:21.237Z",
  "steps": [
    {
      "id": "step_1",
      "version": 1,
      "name": "CSVLoader",
      "type": "input",
      "modifiedAt": "2024-11-07T11:37:50.626Z",
      "params": {
        "url": "mycsv.csv",
        "outputFields": [
          "url"
        ],
        "outputType": "application/pdf",
        "maxRecords": 100
      }
    },
    {
      "id": "step_2",
      "name": "ExtractPDF",
      "type": "action",
      "inputs": [
        {
          "id": "step_1"
        }
      ],
      "params": {
        "schema": [
          {
            "name": "revenue",
            "example": "$123121",
            "description": "Annual revenue number listed at the top of the document"
          }
        ]
      }
    }
  ]
}

Update Workflow Steps

To update the steps in an existing workflow, use the following endpoint:

POST /v4/advanced-workflows/{workflowId}/steps

Request Parameters

  • workflowId (string, required): The ID of the workflow to update.
  • Authorization (header, required): API key for authorization.
  • steps (array body, required): An array containing the all steps.

This endpoint requires the complete array of workflow steps. Partial updates are not supported yet - you must include all existing steps even if you’re only modifying one.

Example Request

curl -X POST "https://api.kadoa.com/v4/workflows/123456789/steps" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "steps": [
      {
        "id": "step_1",
        "version": 1,
        "name": "CSVLoader",
        "type": "input",
        "modifiedAt": "2024-11-07T11:37:50.626Z",
        "params": {
          "url": "mycsv.csv",
          "outputFields": [
            "url"
          ],
          "outputType": "application/pdf",
          "maxRecords": 100
        }
      },
      {
        "id": "step_2",
        "name": "ExtractPDF",
        "type": "action",
        "inputs": [
          {
            "id": "step_1"
          }
        ],
        "params": {
          "schema": [
            {
              "name": "revenue",
              "example": "$123121",
              "description": "Annual revenue number listed at the top of the document"
            },
            {
              "name": "costs",
              "example": "$999",
              "description": "Annual costs listed at the top of the document"
            }
          ]
        }
      }
    ]
  }'

You can now test the updated workflow by using the /run endpoint and fetch the result data.

Response

The response will indicate whether the steps were successfully updated, along with the new version of the workflow.

Delete Workflow

To delete a workflow, use the following endpoint:

DELETE /v4/workflows/{workflowId}

See API Reference