Using Webhooks

Avatar

By Jehrome Griffiths

updated 25 days ago

To show how webhooks work, we will be using Zapier as an example of how to get them setup.

If you have a specific request on how to use webhooks using a different platform or method, please contact our support at support@atarim.io and we'll help you get setup asap (please remember that this feature is still in beta, please also let us know if you are experiencing any bugs by contacting support).


Outgoing Webhook (Triggers/PULL)

To get started, you need to create a "Webhook" trigger inside Zapier and choose "Retrieve Poll":

Once that is selected, you need to setup the trigger. First though, you need to head to your webhook settings inside your Agency Dashboard and turn on the webhook you would like to start using.

In this example, we are going to turn on the "New Task" webhook. First, we need to copy the link from the webhook:

Once we've got that copied, we need to paste this in the "URL" field of the trigger:

For the "Key", we just need to write "data":

And lastly, we need to add the "Header", which is your webhook token inside your Agency Dashboard:

And we need to add this here, and name the "Header",  webhook-token, like this:

And you're ready to go! Simply click on test and it should find entries for new tasks in this example, like so:

Please keep in mind that if you do not have any tasks created, this will not work (check out this documentation item on how to create tasks).


Incoming Webhook (Actions/PUSH)

To get started with incoming webhooks, you need to create an action inside Zapier and choose the "POST" option:

Now let's set up the action.
First we need to choose which one we are going to use, and turn it on:

In this example, we are using the "New Priority Change".

Now this is turned on, we need some specific data for each action, here is the table for each one:

S/NActionsBody parameter (Sample Data)
1.New Task
{
"site" : "demo.wpfeedback.co",
"page" : "Brizy",
"urgency" : "low",
"status" : "open",
"message" : "testing general task creation using webhook actions",
"users" : "Support"
}
2.New Comment
{
"complete_task" : "no",
"comment_content" : "webhook comment testing"
}
3.New Status Change
4.New Priority Change
(This is the one we are using in this example)
{
"value" :"critical"
}
5.New Tag
{
"value" :"testing tag"
}
6.Assign User
{
"users" :"Tyler"
}
7.New Time Entry
{
"user" : "Vito Peleg",
"start_time": "22:07",
"end_time" : "23:07",
"billable" : "yes",
"description" : "Testing add time entry for webhook",
"complete_task" : "yes"
}
8.New Note
{
"comment_content" :"webhook note tested",
"complete_task" : "no"
}


Notes for Actions (Incoming webhook body parameters)

  1. complete_task: This is used to specify if a task should be marked complete or not. It can either have the value "yes" or "no"
  2. billable: This specify if the log entry should be marked as bill or non-bill, it can either be "yes" or "no"
  3. value for status: This is use to specify the new task status. It has be "
    open",  "in-progress" ,"pending-review", "complete"
  4. value for priority: This is use to specify the new task status. It has be 
    "low", "high", "medium", "critical"

Once you've chosen the action you want to use, you'll need the data in the table above. In this example, we are looking at the "Priority Change". Let's look at what this looks like if we want to change a task to critical once the trigger of this zap happens:

This is the webhook that you can copy from your Agency Dashboard here:

Next, we need to choose the "Payload Type". Here is the type to choose per webhook:

Webhook
Payload Type
New Taskjson
New Commentjson
New Note
form
New Status Changejson
New Priority Changejson
New Assigned Userform
New Tagjson
New Time Entryform


As we are using the "New Priority Change" for this example, we need to choose "json":

Now we need to enter the "Data", this can be found in the table above which for priority change is:

{
"value" :"critical"
}


The specific task we want to change needs to be found in the Agency Dashboard, and added as the task URL. In this example, the link we are using is here:

For the value, we have a few options that can be found above, here we are going to change this task to critical once this trigger happens.

And finally, for "Wrap Request In Array" we need to choose "No" and for Unflatten we choose "Yes". This is the same for every webhook.

Lastly, we need to add our webtoken from your Agency Dashboard to the "Headers":

And insert this here with the header "webhook-token":

Now when we test, we should see the priority of the task URL change.

If you need help setting up any type of webhook, please do not hesitate to reach out to support@atarim.io and we'll get back to you asap.


Did this answer your question?