Skip to main content

Webhook actions

R
Written by Riya Sebastian
Updated over 3 weeks ago

Webhooks are a way for apps that are not natively connected with Atomicwork to communicate with each other. For example, you can create a webhook to remove an employee in HiBob when you assign an offboarding journey. 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.

What you need

  • The link to the API documentation of the app for which you want to create a webhook

  • 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}/

Adding and saving credentials

We’d recommend you save credentials to our credential store so that your teammates don’t have to keep adding in credentials for the same systems over and over again. Please ensure that the person adding the credentials has the right access permissions in the app you want to send data. If they do not have the right permissions, we will not be able to perform certain actions (Eg. the user might not have permission to delete data in the system).

  • You can add credentials while creating a webhook, or you can navigate to Settings > Security > Webhook credentials to add credentials.

  • Use a naming convention for credentials so that your teammates can immediately grasp what app the credentials are for.

  • Choose the authentication method.

    • As mentioned above, the receiving app needs to know who has authorized the requests Atomicwork is sending. You can find out the authentication method required in the receiving app’s documentation.

    • You can find an API key in the receiving app’s profile settings. Please enter it here.

    • If the receiving app does not support API keys, please enter your username and password.

Add a webhook action to a workflow

  • Navigate to Settings > Your workspace > Workflows.

  • Create a new workflow or choose the workflow you want to edit.

  • Click on Perform action > Create a webhook.

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

    1. POST sends new data to the app

    2. GET receives data from an app

    3. PUT is used to send an update. PUT is what you should use when you want to update all the fields of an employee.

    4. PATCH is for when you want to update only certain fields

    5. 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.

Did this answer your question?