Skip to main content

Make an API call: how to get a response back in NetHunt

In this article we explain how to use Make an API call in Workflows if you want to receive a response back to NetHunt

Updated over 2 years ago

In NetHunt there is an option to make API calls via Workflows - this is a process of an application submitting a request to an API and that API retrieving the requested data from the external server or program and delivering it back to NetHunt.

In this article, we'll take a webform submission as an example: after the webform is submitted, NetHunt sends a request to other service/external program and is awaiting a response back in the CRM with some additional piece of data that you can further use in the automation.

Let's take a look at this example step by step.

  1. Trigger: webform is submitted, we have only three fields in the form to fill out (first name, last name, ID):

2. Make an API call action: you can choose between POST and GET request depending on what you need to be completed, we'll take a GET request as an example:

3. You have your own database that you need NetHunt to interact with and send requests to, we'll take a "fake" database as an example. First, you need to insert the receiving web hook URL - this is a link to where you are basically making a request...

... except from the webhook URL we'll add an ID macros that came from initially submitted webform by a user (watch step 1). By this piece of data, we are making a request and get more data by this ID number in our own database:

4. Hit Save once you've added the proper macros. This is the pop-up window you'll get:

This allows you to test your API request and see the data that will come back into NetHunt. Click Send test request and input test data, please run this test based on already existing data:

Here is a response we received from our database on this very specific person:

5. Once we've successfully tested your API call request, we'll add another action - create a contact based on the data from the webform and the data received from our database. So we mapped first/last name with the data from the webform, but the email address came from the API call and our external database. Obviously, you can include more fields here:

6. That's it, your workflow is ready now. This automation helped you to receive the data that initially was not filled out in your webform, but was retrieved from your external server:

⚠️ In Workflows, all API calls are being sent from a designated static IP address: 34.71.154.86 for enhanced security. If your system uses a whitelist for filtering IP addresses that can reach its endpoints, you can include this IP address in the whitelist configuration.


Haven’t found the answers you’re looking for? Ask our Users Community.

Did this answer your question?