Create tasks via incoming webhooks

Incoming Webhooks are a simple way to create tasks inside Workast from external sources. They make use of normal HTTP requests with a JSON payload that includes the task text and some additional details. 

The Webhooks extension

To get started, you need to add the Webhooks extension to the space where you want to be creating tasks.

1

Click on the arrow in the top right of your space to open the app menu and select "Manage extensions". If you have less than three extensions, click on the plus button.

2

Scroll down, and select "Add" next to "Webhooks".

3

Click the X in the top right-hand corner to return to your space. 

Incoming Webhooks

Creating an Incoming Webhook URL

1

Open the Webhooks extension. You can find the icon in the list of extensions in your space. If the icon is not there, click on the arrow to see all extensions.

2

A dialogue box will open. Select "+New” under Incoming.

Incoming Webhooks 1
3

In the new dialog that appears, enter the name of the Incoming Webhook. This has no impact in the functionality but it will help you keep your webhooks organized.

Incoming Webhooks 2
4

A new dialog will show up with your webhook details. From here, copy the webhook URL that was recently created (https://hooks.workast.app/...).

Incoming Webhooks 3

Security note: Keep this URL safe. Anyone that has access to the URL will be able to create tasks in your Space.

Creating your first task

The Webhook URL accepts the HTTP POST method with the header Content-Type: application/json with the task details as JSON body. If you are familiar with curl, you can try to create a task right away curl -XPOST -H "Content-type: application/json" -d '{"text": "A task from the new webhook URL"}' 'https://hooks.workast.app/your-token' 

More than just text

You can add a description, assign the task, set a start date and a due date. Here is the full payload that is accepted by the Webhook URL.

{ "text": "string", "description": "string", "assignedTo": [ "USERID" ], "assignedToEmail": [ "user@email" ], "startDate": "2019-03-20", "dueDate": "2019-03-20", "subListId": "5a9cf7219285..." // The list ID within the space }

Please note: dates should be in UTC

Was this article helpful?
/

Related articles