Use Zapier to automate activities from events in Squiz Content Management

This tutorial shows you how to integrate Zapier with Squiz Content Management, which lets you automate workflows in a vast array of third-party applications using events triggered in Squiz Content Management, such as when a page is published live or when the page’s workflow status is changed.

Since Zapier provides automated workflows for a vast array of applications, this tutorial demonstrates this Zapier configuration process by the example of configuring a Google Sheet in Zapier (through a Zapier app) for a trigger. The publication of a page in a site results in Zapier recording this event’s data as a row in the Google Sheet.

Before you start

For this tutorial, you will require:

  • A Zapier service with a Zapier account - using your Zapier account, you will create a Zapier app and configure this app to handle an event triggered from Squiz Content Management.
    For more information about Zapier’s pricing plans, consult their pricing page. Note also Zapier’s Terms of Service and Privacy Policy, as well as their help documentation.

  • A Google account with a new/unedited Google Sheet that will be used and populated by your Zapier app. Provide this Google Sheet with an appropriate name (for example, Publication events) and add the following 'field' names along the top row of the default worksheet:

    • Date

    • Title

    • Summary

    • URL

    • Author

    • Region.

  • A Squiz Content Management system on which to configure a trigger for your Zapier app - your account type must be system administrator and your user account located within the System management  System administrators user group.

Create your Zapier app for integration with Squiz Content Management

These procedures describe how to create your Zapier app (or "Zap"), for integration with Squiz Content Management. In this case, your Zap is a Zapier webhook event handler (for Squiz Content Management events) and Google Sheet, whose content is populated by data in Squiz Content Management.

Configure the Zapier app’s webhook event handler

This configuration process of the Zapier app is common to all Zaps you want to integrate with Squiz Content Management, where the Zap is executed by an event triggered in Squiz Content Management.

  1. Ensure you have logged in to your Zapier account. Upon successfully logging/signing in to Zapier, you should see the Dashboard tab of the Home page.

  2. Click Make a Zap! to begin making your Zapier app that populates a Google Sheet with data from Squiz Content Management.

  3. In the top-left Name your zap field, enter the name for your Zapier app - e.g. Squiz Content Management publication event recorder.

  4. In the When this happens > Choose App & Event field, start typing the name of the Zapier application (i.e. Webhooks by Zapier) that will handle the Squiz Content Management event to acquire data (for your Google Sheet) from this event.

  5. Click the filtered Webhooks by Zapier application icon.

  6. Under Choose Trigger Event, choose Catch Hook and select CONTINUE.

  7. Under Customize Hook, select CONTINUE.
    (Ignore the other options at this point).

  8. Under Find Data, select SKIP TEST.
    (Ignore the test at this point since Squiz Content Management will be configured later).
    Keep the page open.

Configure the Zapier app’s Google Sheet manipulation process

This configuration process of the Zapier app is specific to the action you want your Zap to perform, based on the event triggered in Squiz Content Management.

  1. In Do this > Choose App & Event section of the page, start typing the name of the application (i.e. Google Sheets) to which Zapier will populate data from the Squiz Content Management event.

  2. Click the filtered Google Sheets application icon.

  3. Under Choose Action Event, choose Create Spreadsheet Row and select CONTINUE.

  4. Under Choose Account, select Sign in to Google Sheets.

  5. In the new browser window, choose your Google Account and Allow Zapier to access this Google Account.

  6. Back in the Zapier window, select CONTINUE under Choose Account.

  7. In Customize Spreadsheet Row, choose:

    • Your Google Drive (if necessary),

    • Your Google Sheet under Spreadsheet (e.g. Squiz Content Management publication events) and

    • Your default Worksheet (e.g. Sheet1) and observe that the pre-configured fields in the top row of your Google Sheet’s default worksheet appear below:

      • Date

      • Title

      • Summary

      • URL

      • Author

      • Region.

  8. Under Send Data, select SKIP TEST. (Again, ignore the test at this point since Squiz Content Management will be configured later).

You should now see a message indicating that your Zap is ready. However, do not turn on your Zapier app at this stage. You will now configure Squiz Content Management to trigger the event that will be handled by your Zapier app. After configuring this trigger, you can then re-test the steps you skipped above and then turn on your Zapier app.
Keep this page open.

Configure your Squiz Content Management trigger for Zapier

  1. Ensure you are signed in to your Squiz Content Management site in admin mode as a user with the system administrator account type (according to the Before you start section above).

  2. Add a new trigger asset through System management  Trigger manager.

  1. On the Create a new trigger page, specify a Name value of "When a page goes live, send an event to Zapier".

  2. In the Events section, select the Before status changed checkbox.

  3. In the Conditions section, add the following conditions and select Save:

    • Asset status being changed to

    • Asset is of type

    • Tree location

  4. Choose the following values for these conditions:

    • Asset status being changed to - select Live.

    • Asset is of type > Match any one of these types: choose Page and select the Inherit checkbox.

    • Tree location - select the site or part of the site where you want pages going live to trigger the notification.

  5. In the Actions section, choose Call REST resource and select Save.

  6. In the Call REST resource section, set the following field values:

    • METHOD - choose POST.

    • URL(S) - copy the Custom Webhook URL value from the top Catch Hook > Customize Hook Zapier app configuration web page you left open (above) and paste this value into the first of these fields in Squiz Content Management. Your URL should begin with https://hooks.zapier.com/hooks/catch/…​.

    • REQUEST BODY - copy and paste the following JSON code snippet into this text field:

      {
          "Date":"%globals_asset_updated%",
          "Title":"%globals_asset_name%",
          "Summary":"%globals_asset_attribute_summary%",
          "URL":"%globals_asset_url%",
          "Author":"%globals_asset_updated_by_name%",
          "Region" :"%globals_asset_metadata_client.news.region%"
      }
  7. At the top of the page, change the Status of the trigger to Enabled, which makes the trigger live.

    This JSON code snippet makes extensive use of keyword replacements. Read more about how to configure other element values of this request body in the Keyword replacements section.
  8. ( Optional ) Test that the trigger functions correctly by selecting the RUN TEST checkbox.

  9. Click Save to save changes to the trigger.

Confirm that the Zapier app’s integration with Squiz Content Management is correctly configured

Although you may have selected the RUN TEST checkbox when you saved your trigger (above), which returned a non-erroneous value within Squiz Content Management, you should confirm that your Zapier app is configured correctly with Squiz Content Management and generates the correct keyword replacement values from Squiz Content Management in your Google Sheet.

  1. Ensure you are signed in to your Squiz Content Management site in admin mode as a user with admin access to your site’s asset tree specified in Tree location (in the previous tutorial step).

  2. Follow the instructions in Adding assets to create a standard page asset within this asset tree.

  3. Access the new page asset’s Details screen (if not already visible), and if necessary, select Edit.

  4. Select Approve and make live from the Change status field and select the Cascade status change check box.

  5. Select Save to save the status change update to the page and observe the row added to your Google Sheet. Amongst other keyword replacement values, confirm that this row contains the correct %globals_asset_name% and %globals_asset_url% keyword replacement values.