Skip to content

How to Use Custom Triggers with a Greenhouse Integration in BetterCloud

BetterCloud

September 3, 2021

6 minute read

CustomTriggerDeepDive FeatureImage

BetterCloud recently released Custom Triggers, which enable IT to create workflows that include applications and actions for which there isn’t native support. This gives admins greater flexibility to build more powerful workflows that support a wider range of use cases. 

Last month, we explored how you can leverage this new tool to trigger workflows from a ticketing system like Jira. Today, we’ll take a closer look at how you can use Custom Triggers to initiate a workflow from a Greenhouse hiring software integration.

Events in Greenhouse can trigger workflows for hired and unhired candidates based on conditions like candidate status changes, job status, and offers. In the example below, we’ll create a custom trigger based on a candidate that has been hired.

This process requires an existing Action Only Integration for Greenhouse, which you can set up using these instructions.

Setting up your Custom Trigger in app.bettercloud.com

Navigate to your existing Greenhouse Integration in the Integration Center and select “Modify.”

Navigate to the “Extensions” menu and select “Get Started.”

Select “Create a Trigger for Workflows” and then click “Next.”

Name your Custom Trigger.  If you’d like, add a description. Then, click “Next: Inbound Request.

Take note of your new Inbound Request URL and proceed to the next section of this article to configure your Web Hook in Greenhouse.

Setting up your Greenhouse Webhook

Navigate to your Greenhouse instance and select the gear icon in the top right corner.

Go to “Dev Center” > “Web Hooks.”

Select Web Hooks again.

The next screen is where you can create your new Web Hook and edit existing Web Hooks. 

To create a new Web Hook:

  • Enter a name for your Web Hook
  • Select a “When” event and paste the BetterCloud endpoint URL generated in the first part of this article
  • Enter any value into the “Secret Key” field 
  • Optionally, fill out the “Error recipient email” field if you want to receive emails when a payload fails to send BetterCloud

Note: the Secret Key field must be filled out by Greenhouse. It does not matter what value you enter.

Once everything is filled out, select “Create Webhook.” This will send a test payload to your BetterCloud endpoint URL. 

Confirm the event was received in app.bettercloud.com

If the above steps were successful, BetterCloud will display the test as “Request Received“. Click “Next: Configure Workflow Options.” 

Click the “View Raw Data Response” field to view the format of the data that was sent to BetterCloud. String values will be displayed as “Test Values.”

Here are a few things to keep in mind at this stage:

  • You will notice that the parameters listed in the “View Raw Data Response” field do not show all of the nested properties of a normal Greenhouse event. This is expected behavior.
  • Greenhouse does not initially send the full payload for their events, requiring you to go through the process of triggering your selected event in Greenhouse (ie: hiring a candidate) after your Web Hook is published in Greenhouse. This will re-trigger your Custom Trigger and surface the expected payload properties.

First, select a “Trigger” for your Workflow and click “Save and Publish“. We will come back to this section and select a new Trigger later on. 

Creating and hiring a dummy candidate in Greenhouse

Navigate back to your Greenhouse instance and select “All Candidates,” then select “Add Candidate.”

Fill out the following required information, and fill out any additional information you want to have sent to BetterCloud (ie: Phone Number, Email Address, Title, etc). Then select “Add this Candidate.

On the newly created candidates page, select “Manage Offer” > “Mark Candidate As Hired.”

Select their Start Date and select “Full-Time” as their Employee Type, then press “Save.”

This will kick off a new event that will be sent to app.bettercloud.com. 

Note: Testing shows that Greenhouse can be delayed in sending the Web Hook. Check the “Web Hook Log” in Greenhouse to see a list of all requests Greenhouse has tried to send. Navigate to the gear icon in the top right corner > Dev Center > Web Hooks > Web Hook Log to view these requests.

 

Confirm the new payload has been received in app.bettercloud.com

Navigate back to your Custom Trigger in app.bettercloud.com and refresh your Integration page, then navigate to your Custom Trigger’s “Configure Workflow Options” page. 

The “View Raw Data Response” dropdown should show the new fields received from Greenhouse.

Now that all of the fields have been added, select the new target of your Custom Trigger. Typically a username or email makes sense in this target field. The easiest way to think about {target} is “My Workflow just ran on {target}.”

Select any parameters that should be exposed as If Conditions or Dynamic Fields in the Workflow by checking the box next to the parameter. See our Custom Workflow Triggers article for a list of caveats related to If Conditions and Dynamic Fields.

Click into a parameter to rename it and give it a description. For any data points that should be required for the Workflow to trigger, click the parameter and check the “Input is required” box. If a trigger that is missing a required field is sent to BetterCloud, it will be rejected and an audit log will be generated. 

Why make fields required? If a ticket is missing the user’s name, for example, it’s easier to catch missing data upfront than it is to execute a full Workflow worth of actions, only to have them all fail because a critical data point is missing.

See our Custom Triggers article for more in-depth details on the Input is Required field.

Once you have your parameters configured, Save and Publish your Custom Trigger and head over to Workflows builder to begin using your Trigger! 

Once you’ve built a Workflow around this new Custom Trigger, you can begin to run a full test from Greenhouse!

What’s Next 

BetterCloud customers with the Platform API can leverage Custom Triggers now. Keep an eye out for future use case deep-dives and other articles to help you continue to learn how to leverage Custom Triggers to enhance the flexibility and extensibility of BetterCloud. 

To learn how your peers are leveraging Custom Triggers, join over 5,000 other IT pros in the largest SaaSOps Community to see how other organizations are implementing Custom Triggers—and to discuss more SaaSOps practices.

BetterCloud is the leading SaaS Management Platform (SMP), helping leading IT organizations discover, manage, and secure their SaaS applications. To learn more, request a demo.

Categories