Launch and schedule a workflow with the API

Head over to the API Reference and take a look at "Launch a Workflow".

Payload

This is the standard payload you need to use to launch a workflow:

{
    "inputs": []
    "job_name": "New job to launch",
    "steps": [{
        "accounts": [],
        "parameters": {},
        "step_uid": "",
    }]
We strongly encourage you to use the API Playground (available on any workflow) to help you build the payload.

Inputs

Inputs are using mapping, it's important you respect the keys:

{
    "inputs": [{ "mapping_key": "value" }]
}

This way an input can have multiple keys, for example to find an email you'll generally get asked the following:

{
    "inputs": [
        { "first_name": "value" },
        { "last_name": "value" },
        { "company_name": "value" }
    ]
}

Steps

The most important thing is going to be to correctly configure steps.

Again, the most simple to do this is to head over the API Playground and get a default payload to get the step's UID.

At the moment there's no easy way to get the step's UID, the best way is to run a simple job to test things out.

Once you do, you'll be able to get to the job's detail and checkout the step's UID in your browser URL under "?step=":

Again, using the API Playground is going to be way easier!

Integration Accounts

Starting with the 2nd version of the API, now using the 3rd version since July 2022, you can use accounts you previously synchronized.

On an account, you can get its UID using the following:

Once you have this UID, you can use it to schedule a workflow with the account, using the following in the payload (refer to the API Reference for the full payload):

"accounts": ["UID_YOU_JUST_GOT"]

You can also modify the value of the account before-hand, if need be, using the " Add or Update Integration Account" endpoint.

For example if you're using a Google Account, it would look like this:

"account": {
    "uid": "UID_YOU_JUST_GOT",
    "api_key": "" // or cookies, password etc. depending on the integration you're updating
    ...
}

You don't need to specify "Google" anywhere because we obviously already know it :)

If you need to update a cookie, for example with LinkedIn, use the following:

"account": {
    "uid": "YOUR_UID",
    "cookies": {
        "li_at": "YOUR_NEW_VALUE",
        "li_a": "YOUR_NEW_VALUE",
    }
}

Parameters

Again, the API Playground is going to be your best friend here, since every parameters will be correctly mapped!

Each parameter is specific to a step, make sure to respect and match parameters with their respective step.

Help

Should you need any help, make sure to reach us on the support 😀

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.