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 over 2 weeks ago

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

/wrkflow/

POST

/wrkflow/{wrkflow_uuid}/launch

The Wrkflow object

Attributes

Attributes

The Wrkflow object

  • wrkflow_id UUID
    The unique identifier of the Wrkflow

  • name string
    The name of the Wrkflow

  • launch_parameters_json_schema 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.

  • 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",
"launch_parameters_json_schema": {
"type": "object",
"properties": {
"Email": {
"type": "string",
"description": "Email address"
}
},
"required": ["Email"]
},
"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 /wrkflow/{wrkflow_uuid}

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",
"launch_parameters_json_schema": {
"type": "object",
"properties": {
"Email": {
"type": "string",
"industry": "Industry to retrieve news for"
}
},
"required": ["industry"]
},
"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",
"launch_parameters": {},
"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 /wrkflow/{wrkflow_uuid}/launch

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?