HTTP requests
Webhooks are really useful ways to perform data updates and operations that you might have to do otherwise by logging into the system. Without a webhook, you might have to go and manually remove an employee’s data from every system they’re a part of once they leave. It’s a simple operation with a webhook.
Learn more about knowing when to use a webhook vs a Call API action
What you need
-
The link to the API documentation of the app you want to send requests to
-
The subdomain (if any) used to access your account. A lot of apps give you a subdomain when you sign up for an account, like https://mycompany.bamboohr.com.
-
The authentication mechanism. The other app needs to know who has authorized the requests Atomicwork is sending on your behalf. Some apps don’t need an authentication mechanism. Some apps need an API key, and others require you to send your username and password every time. So please make sure to look this up in the documentation.
-
The API URL to which you’ll be sending your requests. This is usually in the documentation as well. For example, the API URL to use for BambooHR is: https://api.bamboohr.com/api/gateway.php/{companyDomain}/v1/employees/{id}/
Setting up credentials
HTTP request actions authenticate using saved credentials from the credential store. You can add credentials while creating the action, or manage them ahead of time at Settings > Organization > Security > Credential store. Atomicwork supports three authentication types: API key, username/password, and no authentication.
We’d recommend saving credentials with descriptive names and setting allowed hosts on each one to prevent accidental misuse. For the full details on creating, managing, and rotating credentials, see Managing credentials.
[!NOTE] These credentials are used when Atomicwork calls out to another system. They’re separate from your public API token (Settings > My account > Credential store), which authenticates calls made in to Atomicwork’s own API.
Add a webhook action to a workflow
-
Go to Settings > Enterprise automation > Workflow library. Select Organization to apply this across the organization, or select a workspace to apply it to that workspace only.
-
Create a new workflow or choose the workflow you want to edit.
-
Click Add action, then select Make an HTTP request.
-
Enter the URL to which the receiving app would like us to send information. Make sure to include the subdomain if there is one.
-
Choose the operation you’d like us to perform i.e. the Request Method, to the left of the URL.
-
POST sends new data to the app
-
GET receives data from an app
-
PUT is used to send an update. PUT is what you should use when you want to update all the fields of an employee.
-
PATCH is for when you want to update only certain fields
-
DELETE is for when you want to delete data
-
-
Choose the credentials you’d like us to use.
-
Headers: Some APIs require you to send particular headers along with requests, typically to provide more metadata about the operation you are performing like cached resource details or content type. You can add these in the Headers textbox.
-
Body: Atomicwork supports JSON formatting for body content.
We’d recommend you build and test your webhook out on a platform like Postman before adding it as an action here. We’d also recommend you go through their comprehensive getting started guide if you encounter some obstacles.
You can use the output of an action (we call this a data pill) as input for other actions.
