Data Viewer API Example: Using Zapier to create a site visit email alert

This feature is only available with the Connections Add-on

The Landscape Data Viewer API allows you to stream .json data out of Landscape for use in a third party platform. This article walks you through how you might set up and utilize this API with Zapier to send email alerts to the whole team when a site visit is performed. The email can contain a summary of the site visit as well as a link to the record in Landscape.

This article is intended as an example of what you can do with a third party app like Zapier. Please note that assisting with setup in third party apps is beyond the scope of what Landscape support can offer.

Step 1: Create the view and get the API url.

You probably want to create a view from scratch specifically for this purpose. The view should include any fields you want to use in the third party application. Since I want to send site visit details, I've include the record name, site visit name, 'summary' field, and the record id, as well as a form question: 'Did you see any issues?':

I'll be using the record ID field, as well as the site visit ID (which is included in the API output by default) to create a link to the site visit that the email recipient can use to quickly go to the visit.

Click on the three dots next to the save button and select 'Get Landscape API Url', then copy the data to your clipboard.

If you need to change the fields available to this view, that's fine, you can do so without needing to re-copy the url. Note that you would need to reconfigure your zap, however.


Step 2: Set up the 'Trigger' in Zapier (new Site Visit created)

In this example I'll use the 'Webhooks by Zapier' Zap to listen for an event. The event that it is listening for is a new site visit to be created in Landscape. So I added the Zap, then used the following configurations:


Setup:

Note: The 'Retrieve Poll' option of the Webhooks app does the work of looking at an existing data set (view) and detecting new data. It uses the 'Id' field to identify these new records.


Configure:


Step 3: Set up the 'Action' in Zapier (send an Email)

For this step I used the 'Email by Zapier' Zap.

The setup is simple - send an email. Then you'll need to configure the actual content of the email. Here's what I did. Note that the Form question appears as a series of numbers and letters (the form question Id in Landscape) so you'll need to identify it by using good test data in step 1. Also note that, to create the link, I used Landscape's predictable work link format to insert the record Id and the work Id in the relevant locations in the url.


Step 4: Publish and refine

Here's the resulting email. It's pretty basic, but would definitely be useful for senior staff to receive whenever a site visit is performed. Over time we can change the contents based on changes to the form or what we want to see.

Still need help? Contact Us Contact Us