Werkabots was designed to make it easy to build workflows that integrate multiple web services that are based on RESTful or simple HTTP web APIs.
There's a simple API for adding tasks to the system, these tasks can be attached to a workflow which automatically creates a new task on the close of the previous. Each task can optionally run an action when it is closed, an action will call an external API.
The payload of each task, including the results of any external API calls, is passed on in the workflow, allowing for information to be passed through the workflow and from one system to another.
A workspace holds together related tasks, actions, workflows and endpoints. Once a workspace is created, the system is ready for use. Users can be added as members of a workspace and optionally be made additional admins of the workspace.
Users only have access to workspaces that they are members of and, within a workspace, there is no visibility of items in other workspaces, whether or not you are member of those other workspaces.
A task is a unit of work, it can be read and closed manually by a person, or it can be an automated task. A task can optionally have an action and a workflow attached. On closing of a task, if there is an action this will be fired. An automated task will auto close and therefore automatically fire an action.
An action is where you setup the configuration of an API call to another system. Within an action, along with the endpoint that is being called, there are also sections for headers, authentication and data. A combination of these should be sufficient to work with majority of RESTful or simple HTTP web APIs.
All the fields in the content of the task can be accessed in this setup, so the task information can be selectively passed onto the system being called.
A workflow is a serious of steps. Each step is defined with a task template.
When a task is created with a workflow, the action defined in the first step's task template is assigned to the task. On the close of the task, after firing the action, a new task will be created if there is a next step.
An endpoint is an alternative way of getting tasks into the workspace. It's designed for use where it is not possible to script a call to the Werkabot API. It is unique url specific for that workspace and endpoint.
The endpoint definition includes a section where specific fields from the payload coming in from the external system can be assigned to data fields in the task. Making it easy to read on the task page or used as data to be passed onto another system.
Upon first sign in you are presented with a blank start page where you can start creating workspaces.
Click ADD WORKSPACE to add a new workspace and give it a name
From the workspace you can start working on tasks, actions, workflows and endpoints.
From the Open Tasks screen you can add new tasks or watch tasks coming in, which an be either added by aother user or added via automation (API/endpoint/workflow).
To manually add a task, simply click the '+' button at the top right. Give it a description, then optionally select an action or a workflow.
To close a task, click the empty box to the left of the task list, there is a 5 sec delay that you can override where you can click Undo to stop the closing. Then the task will momentariy go grey before disappearing.
Closed tasks can be tracked via the Closed Task screen.
From the Actions screen you can add a new action by clicking the '+' button at the top right. Give it a description and click Add. The action will then appear on the list, click on it to drill down to the details.
This is the unique database key for the action, it cannot be changed. It is used for referencing this action when adding a task via the API.
This is the description of the action, it is up to you to keep this unique if this is required, as it's uniqueness is not checked.
This is the data type that we be posted to the endpoint can be JSON or FORM.
This is the URL for the endpoint of the API service being called.
This will default to POST and majority of the time this will be POST, otherwise it can be any of the accepted request methods.
This is the data that will be sent, in the type as defined above. Key value pairs that can be static or variables referring to the current task.
Variables from the task can be added like this ${task.data.fieldname} where fieldname can be any of the fields that exists under the data section of the task. The data section of a task holds all the custom user data.
This is usually used for adding extra headers that may be required by the endpoint.
This is used for endpoints requiring HTTP authentication.
This is an example action for the Mailerlite service. The service provides a specific URL to the account and requires an email field which we pickup using ${task.data.email}. The api key is added to the Headers
From the Workflows screen you can add a new workflow by clicking the '+' button at the top right. Give it a description and click Add. The workflow will then appear on the list, click on it to drill down to the details.
This is the unique database key for the workflow, it cannot be changed. It is used for referencing this workflow when adding a task via the API.
This is the description of the workflow, it is up to you to keep this unique if this is required, as it's uniqueness is not checked.
Add one or many steps to this workflow. Each step is a task template. Define a description which will be appended to the task description. Define an action from the dropdown. Specify if the action should autofire or not.
From the Endpoints screen you can add a new enpoint by clicking the '+' button at the top right. Give it a description and click Add. The endpoint will then appear on the list, click on it to drill down to the details.
This is the unique id generated for the endpoint. It forms part of the endpoint URL. It can be regenerated if required.
The endpoint URL format is https://werkabots.com/hook/<workspace-uuid>/<endpoint-uuid>
This is the unique database key for the endpoint, it cannot be changed.
This is the description of the endpoint, it is up to you to keep this unique if this is required, as it's uniqueness is not checked.
This is the template of the task that will be created when the endpoint is hit. The description will be the description of the task created. You can use parameters to pick up information from the post body. You can assign an workflow, when the endpoint is called, it will then pick up the workflow and behave the same way as if the task was added manually through the screen.
Extra fields can also be added, each one can pickup specific data from the post body. e.g. if there was a recipient field in the post body of the endpoint call then you can refer to it as ${body.recipient}.
The WerkaBots API is based on REST. All responses from the API are returned in JSON format.
https://werkabots.com/api
Authentication for the WerkaBots API is done using Bearer authentication (also called token authentication), it is an HTTP authentication scheme that involves security tokens called bearer tokens. A workspace owner can find its unique API key (the bearer token) in the workspace settings page.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate for all requests.
Authorization: Bearer <Workspace API Key>
POST /v1/tasks
Parameters
desc : description of task, displayed on all screens
workflow : workflow id (optional)
data : key/value pairs of additional parameters
The additional arbitory parameters is added as the task's payload. They can then be used in steps the workflow to call external APIs or just read as information on the task screens.
$ curl https://workerdroids.com/api/v1/tasks \
-H "Authorization: Bearer <Key>" \
-H "Content-Type: application/json" \
-X POST \
-d '{"desc":"this is a test", "workflow":"<workflowId>"}'
POST /v1/task/<taskId>
$ curl https://workerdroids.com/api/v1/task/<taskId> \
-H "Authorization: Bearer <Key>" \
-H "Content-Type: application/json" \
-X POST \
-d '{"desc":"changing this"}'
GET /v1/task/<taskId>
$ curl https://workerdroids.com/api/v1/task/<taskId> \
-H "Authorization: Bearer <Key>" \
-X GET