Skip to main content
Cartegraph Campus

Webhook Example: Parse Emails From Citizens to Create Requests

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 support@cartegraph.com

In this example, we will show how to parse emails in Zapier and use the information to create requests in Cartegraph.

  1. Go to https://parser.zapier.com and set up a free account or sign in with an existing Zapier account.
  2. Click Create Mailbox.
    WH_EX_CreateMailbox.png
  3. You are given a pseudo inbox; in this example, it is called fox3bdk4@robot.zapier.com.
  4. Send a sample email from your email client to the provided email address. Make the subject of the email be New Request and copy the following body text:

    Here is a sample request

    Issue: Pothole

    Location: 620 Melinda Drive

    Notes: It’s a big one

  5. Once you send the sample email, in Parser by Zapier, you see this screen:

webhook email ex sample email sent.png

  1. Now you can highlight the important text in the initial template area and give each piece a name. If we highlight the word Pothole, the following dialog box displays:
    webhook email ex highlighted pothole.png

  2. Type Issue into the box provided and click Save.

  3. Highlight 620 Melinda Drive and enter Location.

  4. Highlight It's a big one and enter Notes. Your screen should look like this:
    webhook email ex its a big one correction.png

  5. Click Save Address and Template.

You can now use your pseudo inbox to send and forward real emails, and the email will be parsed into the pieces you defined.

Now we will create a Zapier zap that does something with those parsed emails.

  1. Go to https://zapier.com/

  2. Click Make a Zap!

  3. In the When this happens dialog box, start to type email parser and select Email Parser by Zapier.
    webhook email ex email parser.png

  4. In the Choose Trigger Event list, select New Email, and click Continue.
    webhook email ex new email.png

  5. Allow Zapier to access your email parser by Zapier account by clicking Sign in to Email Parser by Zapier, then click Authorize, and click Continue.
    webhook email ex sign in to email.png

  6. Select the mailbox you created in the previous steps and click Continue.
    webhook email ex select mailbox.png

  7. Click Test & Continue.

  8. In the Do this dialog box, begin to type webhooks and select Webhooks by Zapier.
    webhook email ex do this.png

  9. From the Choose Action Event list, select Post and then click Continue.

    webhook email ex post.png

  10. You should see a screen that looks like this:

    webhook email ex customize post.png

At this point, before we fill out the details for this step in Zapier, we are going to 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.

  1. In another browser window, click iAdministration_sm.png>Automation Manager.

  2. Click Create Automation.

  3. Start to type the word incoming and then select the Incoming Webhook trigger.
    webhook email ex incoming recipe.png

  4. The trigger will start our new automation. Our automation will be invoked 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.

  5. Click iCopyURL.png to the right of the URL to copy the path to the clipboard.
    webhook email ex copy url.png

  6. Switch back to the browser tab with Zapier. Paste the URL from your clipboard into the URL text box. Set the Payload Type to Json.

  7. In the Data area, create four properties. Name them Issue, Location, Notes, and Sender. Click the plus buttons to add more rows. Use iZapAddRows.png to select the following fields to map:
  • Parse Output Issue
  • Parse Output Location
  • Parse Output Notes
  • Email Sender Email
  1. When you have the detail section set up correctly, it should look like the following:

webhook email ex detail section correct.png

  1. Scroll to the bottom of the page and click Continue. You will see the following screen. Do not click the blue button yet.
    webhook example do not press blue button.png

We will need to coordinate sending a test message to Cartegraph. To do this we need to click a button in two different browsers in quick succession. Before continuing, it would be easiest if you can arrange your browsers on your monitor or monitors so that you can see Zapier and the Cartegraph automation at the same time.

  1. Click the Capture button on the Cartegraph incoming webhook page.
    webhook email ex orange button.png

  2. Quickly click the blue Test & Continue button in Zapier.
    webhook email ex blue button.png
    If the test was successful, the Zapier screen should look like this:
    webhook email ex test success.png
    The Cartegraph screen should look like this:
    webhook email ex OMS test success.png

  3. To finish the zap in Zapier, click Done Editing.

  4. Name your zap in the top left corner and click Turn Zap On.
    webhook email ex turn zap on.png

  5. Click Go To My Zaps. You should see this:
    webhook email ex go to my zaps home.png

  6. Switch back to the Cartegraph tab.

    webhook email ex back to OMS.png

    The test message sent from Zapier is visible in the Example Body field. The four fields defined there can be used by other blocks in the rest of the automation.
  7. Click and drag a Create Record block to the Actions section. Change the Recordset to Request.
    webhook email ex change to Request.png

  8. Using the Add Field control, add the Issue Field. Change the mode on the right to (s) for syntax mode and paste [eventsource|Issue] as the value.

  9. Using the Add Field control, add the Description and Location Description fields as well. Set the mode to iLink_sm.png and select the corresponding values from the incoming webhook. Your screen should now look like this:
    webhook email ex links.png

  10. In the upper left corner of the screen, rename your automation, turn it on, and click Save.

Your automation and Zap are both complete. Every time you forward an email to your pseudo email box, Zapier will parse the email and send the information to your Cartegraph automation with the incoming webhook trigger, and your automation will create a request.

  • Was this article helpful?