Skip to main content
All CollectionsAPI Documentation
Wrkflows - Wrk API Reference
Wrkflows - Wrk API Reference

Interfacing with the Wrk Platform via APIs - Wrkflows

David Li avatar
Written by David Li
Updated this week

Wrkflows

This object represents an automation workflow (Wrkflow) in your account. Use it to get Launch parameters and launch it. You can use the Launch object to track the progress.

ENDPOINTS

GET

/v1/get-wrkflows

POST

/trigger/launch

The Wrkflow object

Attributes

Attributes

The Wrkflow object

  • wrkflow_uuid UUID
    The unique identifier of the Wrkflow

  • name string
    The name of the Wrkflow

  • last_updated unix date
    The unix date when it was last updated

  • launch_parameters JSON object
    A JSON object with properties containing the launch parameters required to launch the Wrkflow. The property required contains the minimum required properties to launch the Wrkflow.

  • meta dictionary

    • short_description string
      A short description of the Wrkflow

    • long_description string
      A long description of the Wrkflow. Usually used to provide instructions on how to use the Wrfklow.

    • avg_completion_time int
      The average launch completion time in seconds for past launches. Returns zero if not available.

    • webhook_url nullable url
      A URL to launch the Wrkflow via webhook

    • schedule_info nullable dictionary

      • schedule_description string
        A description of Wrkflow schedule

      • enabled boolean
        โ€‹true if the described schedule is enabled

{
"wrkflow_uuid": "d3cb5c8d-de4b-4a72-84b3-e529c444d842",
"name": "Use Apollo to Search Contact from an Email",
"last_updated": 1728673581,
"launch_parameters": {
"type": "object",
"properties": {
"Email": {
"type": "string",
"description": "Email address"
}
},
"required": ["Email"]
},
"meta": {
"avg_completion_time": 6,
"short_description": "Search an email in the Apollo system and provide the contact information back",
"long_description": "",
"webhook_url": "https://webhook.wrkapi.com/v1/webhooks-execute/b3622841-84b8-453f-939d-47961939e0b0",
"schedule_info": {
"schedule_description": "Every hour",
"enabled": false
}
}
}


Retrieve Wrkflows

Retrieves one or more Wrkflow object

Parameters

  • wrkflow_uuid UUID (optional)
    Retrieve a specific Wrkflow based on the UUID
    โ€‹

GET /v1/get-wrkflows

cURL

curl -G /v1/get-wrkflows/?page=0&per_page=10 \
-u "<token>"

Python

from wrk import Wrk
wrk_client = Wrk("sk_test_123")

# Get all Wrkflows
wrkflows = wrk_client.wrkflows

# Get one Wrkflow
wrkflow = wrk_client.get_wrkflows(
wrkflow_uuid = "abcd-123-1sfdd"
)

Returns

A dictionary with a wrkflow property that contains an array of Wrkflows. The totalCount property will give the number of Wrkflows returned. If there are no Wrkflows available, the resulting array will be empty

{
"wrkflows": [
{
"name": "Post News to Wrk Forum",
"wrkflow_uuid": "78a53c09-533c-46a9-977f-0e7163e84e16",
"last_updated": 1721424234,
"launch_parameters": {
"type": "object",
"properties": {
"Email": {
"type": "string",
"industry": "Industry to retrieve news for"
}
},
"required": ["industry"]
},
"meta": {
"avg_completion_time": 15,
"short_description": "",
"long_description": "",
"webhook_url": null,
"schedule_info": {
"schedule_description": "At 8am",
"enabled": true
}
}
},
{
"name": "Save the World",
"wrkflow_uuid": "9edf13a7-abfa-47bb-99bd-b5098d087082",
"last_updated": 1718295135,
"launch_parameters": {},
"meta": {
"avg_completion_time": 256,
"short_description": "When a user ask to save the world",
"long_description": "",
"webhook_url": null,
"schedule_info": null
}
}
],
"totalCount": 2
}


Launch Wrkflow

Given a Wrkflow, launch (start) the automation workflow.

This Additional documentation on launching a Wrkflow via API here.

Parameters

  • wrkflow_UUID UUID
    A unique identifier of the Wrkflow.

  • name string (optional)
    An optional name for the Launch. If no name is provided, the system will provide a default.

  • values dictionary
    A dictionary containing the values to pass as the Wrkflow Launch Parameters. If there are no parameters, an empty dictionary can be passed.

POST /trigger/launch

cURL

curl -P /trigger/launch/

x

Python

...

# Launch the Wrkflow. Only the launch parameter values need to be provided

wrkflow.launch(
{
"Email": "john.doe@email.com"
}
)

Returns

If successful, a dictionary with property launch_id containing a unique identifier of the Launch object.

{
"wrkflow_uuid": "78a53c09-533c-46a9-977f-0e7163e84e16",
"launch_id": 23143
}

Did this answer your question?