You must have administrator rights to access this feature.
This feature may not be available in every package. Not sure if you have this feature or you want to learn more about it? Send us a message at email@example.com.
This example will walk you through rescheduling street sweeping tasks in Cartegraph depending on today's weather.
- Go to https://zapier.com/ and set up a free account or access your existing account.
- Click Make a Zap.
- In the When this happens dialog box, start to type the word weather and select Weather by Zapier.
- In the Choose Trigger Event dialog box, select Today's Forecast and click Continue.
- Enter the latitude and longitude for your location and click Continue.
If the longitude is XX.XXX West, you would add a negative sign.
- Click Test & Continue.
- In the field near the top of the Do this dialog box, start typing webhook and select Webhooks by Zapier.
- In the Choose an Event list, select Custom Request and click Continue.
At this point, we will switch to a different browser tab and start to create an automation in Cartegraph. This new automation will have an incoming webhook as its trigger.
- In another browser, click >Automation Manager.
- Click the Create Automation button.
- Start typing incoming and select the Incoming Webhook trigger.
- The trigger will begin our new automation. Our automation will be triggered when an external application calls the URL shown in the URL property on the right side of the screen. Whenever you create a new incoming webhook automation, a unique URL is automatically generated.
- Click to the right of the URL to copy the path to the clipboard.
- Switch back to the browser tab with Zapier. Set the http method to Post and paste the URL from your clipboard into the URL text box.
- In the Data field, carefully enter the following text and make it look like this:
- Click and select each of these weather values next to the appropriate property:
- Precip Probability
- Temperature Max
- Temperature Min
When you have the detail section set up correctly, it should look like the following. Notice how the first two properties are followed by commas, but the third is not.
- Scroll to the bottom of the page and click Continue.
- The following page displays. Do not click the blue button yet.
We will need to coordinate sending a test message to Cartegraph. To do this, we will need to click a button in two different browser pages in fairly quick succession. Before continuing, would be easiest if you first arrange the browsers on your monitor or monitors so you can see both the Zapier window and the Cartegraph automation window at the same time.
- Click Capture on the Cartegraph incoming webhook page.
- Quickly click the Test & Continue button in the Zapier window.
If the test was successful, the Zapier screen should look like this:
and the Cartegraph screen should look like this:
- In Zapier, click Done Editing.
- Enter a name for your zap in the top left and click Turn Zap On.
- Click Go To My Zaps. You should see this:
- Switch to the Cartegraph tab.
The test message sent from Zapier is visible in the Example Body field. The three fields defined there can be used by other blocks in the rest of the automation.
Now we will finish creating the automation to reschedule street sweeping tasks if there is a greater than 60% chance of rain.
- Click and drag a Condition block to the Actions section and configure the conditions as shown here:
The three properties sent in the test message from Zapier are available.
- Select the PrecipChance property and configure the rest of the automation as shown here:
- Click and drag a Loop Records block to the Actions section and configure it as shown here:
So far, our automation will check if the chance of rain is greater than 60 percent; then it will loop through the street sweeping tasks scheduled for today.
- Click and drag a Set Fields block to be nested under the Loop through todays street sweep tasks in the Actions section and configure it as shown in the following image.
This will reschedule each street sweeping task scheduled for today to tomorrow.
- We must save each task. Click and drag the Save Record block and configure it as shown in the following image.
- To finish the automation, rename it in the upper left part of the screen, turn it on, and click Save.
Every morning at about 7:00 a.m., Zapier will check today's weather forecast and send up-to-date information to Cartegraph using the URL for an incoming webhook. The automation will look at the details of the day's weather and make a decision based on the chance of rain. If the chance of rain is greater than 60%, the automation will loop through the street sweeping tasks scheduled for today and reschedule them for tomorrow.