Create a trigger using REST Hook Trigger Type

Infinite Blue Platform recommends using REST Hook trigger type to create any trigger. In this method, Zapier generates a Webhook URL. The user can post any request to Webhook URL from Platform using Object Script or HTTP Post trigger. This method doesn’t impose any no extra load on the Platform server. 

  • Enter the required details and below content to Directions field as displayed in the below screenshot in the Settings tab of the Trigger form. When done, click Save and Continue.

    Copy

    Copy the below content to Directions field in the Settings tab of the Trigger form

    Copy the generated REST Hook URL and use it inside the Infinite Blue Platform trigger. 
    Example: Create an object script trigger for the desired object.  Use rbv_api.sendJSONRequest Server API to send the data to Zapier. 
    Sample object script trigger code: 
    url = "https://hooks.zapier.com/hooks/catch/7082424/or6p7tg/";  
    data = '{"lastName": "{!lastName}", "name": "{!name#text}" }';

    var zapierResponse = rbv_api.sendJSONRequest(url, data, "POST", "UTF-8", null, null, null,null);  

  • Now, navigate to API Configuration tab.

  • In the Configure your API Request section:

    • Select Trigger Type as REST Hook.
    • Switch to Code Mode in the Perform List section and paste the below code.

      • Modify the <HOST_NAME> value to your actual Host Name and click Save & Continue.
      • From the below example, replace the lead value, with the <OBJECT INTEGRATION NAME> value of the object where the Zapier trigger is configured.

      Copy
      const options = {  
        url: 'https://<HOST_NAME>/prod1/api2/data/lead',  
        method: 'GET',  
        headers: {  
          'content-type': 'application/json',  
          'accept': 'application/json',  
            'JWT': bundle.authData.JWT
        },  
        params: {  
          },  
        body: {  
        }  
      }  
      ;  
      return z.request(options)  
        .then((response) => {  
          response.throwForStatus();  
          const results = z.JSON.parse(response.content);  
          return results.results  
        ;});
  • In the Test your API Request section: 

    • Select Perform List from the Select a Request dropdown.

    • You are prompted to Sign in to Infinite Blue Platform account to test your Authentication. If you are already signed, select the existing account.

    • When done, click Test Your Request. On successful request, click Finish Testing & Continue.

  • In the Define your Output section

    • If needed, Generate Output Field Definitions and Add Output Fields

    • Or you can skip to click Save Output & Finish.

You have now successfully created a trigger using REST Hook trigger type.