Automation and Zapier 101 - XML

...for automatic lead event posts into a Google Spreadsheet

This article describes the process for configuring the TRADE CYCLE platform, and the 3rd party service Zapier.com, to automatically post a lead's information into a Google Spreadsheet when a lead is received. This article was designed to be a soup to nuts description of this process. This automation is complimentary with your TRADE CYCLE service, and utilizes a 2-step "Zap" which is part of the free tier with Zapier.com.

Trigger e-mail addresses and Webhook URIs typically include unique identifiers that should be kept confidential. You will note that they are blurred out in this example

While every attempt to create this article accurately was made, changes in service may occur that are beyond our control. Additionally, any costs incurred with Zapier.com are your responsibility and Digital Powersports makes no warranties, implied or otherwise, in regards to the functioning of this service.

Create a rudimentary test spreadsheet in your Google Apps account.

In row 1, create all the column labels you'll want to use in this Zap. Here we have set up the google sheet to collect just First Name, Last Name, Email Address and Zip Code.



Click on "MAKE A ZAP!"


Name the Zap:

    1. Name the Zap
    2. Type in Webhook into the search.
      1. choose Webhooks by Zapier


Create the Catch Hook:

    1. Choose "Catch Hook"
    2. Click Save + Continue


    1. Simply click Continue.


Click the button to copy the webhook to the clipboard: "Copy to clipboard"

    1. Keep the webhook secret as it contains a unique identifier. Note it is blurred here as this tutorial is publicly accessible.






Log into the Dealer Dashboard (instructions here).

After you follow through with this exercise, a detail explanation of the Automations Management interface is here, but we recommend you keep following the steps here first.

    1. Choose the Dealer you wish to work with (note, if you have access to less than one dealership, you will not be able to choose a different dealer).
    2. Under the Campaign Elements, open the Automations
    3. Click on Add new Automation

    1. Name: Give the automation a friendly human name
    2. Status: Choose Active
    3. Campaign: Choose the Campaign this automation will be associated with.
    4. Type: Choose the type of Automation (in this case, a URL)
    5. Url: Paste in the Url copied to the clip board in Zapier.
    6. Body: This is the actual body content. It uses XML encapsulation to send data to the zap. The actual code for this example is pasted below:

    7. click on Create


XML code to send every single variable
<?xml version="1.0" encoding="UTF-8"?>
<feed>
  <first-name>[data field=first-name]</first-name>
  <last-name>[data field=last-name]</last-name>
  <email>[data field=email]</email>
  <zip-code>[data field=zip-code]</zip-code>  
</feed>



    1. Navigate to the Campaigns Management, and choose the  icon to fire the campaign. Fill out the campaign with obvious test data. 
      Please note: This will generate normal lead notices, an sms to the number used, an email, appear in reports and, if configured, be injected into your CRM. Adjust accordingly.

Here we see the final page of the lead (as a customer would see requesting a value):

Back in Zapier...

    1. Click on "OK, I did this".



    1. Choose "Continue"

    1. Choose Google Sheets (search if needed)

    1. Choose Create Spreadsheet Row
    2. Click Save + Continue

    1. Click on Connect a New Account

Google Account Choice:
Note: you will not see this window if you only have a single Google account setup or have not logged into Google from this web browser before. There may be additional requirements to connect the account here, such as 2-factor authentication, which are beyond the scope of this article.

    1. Choose the account you wish to use.

    1. Assuming you are okay with allowing Zapier to perform this function, click on Allow

    1. Clicking on the pencil icon will allow you to give this Google Account a friendly name. This is helpful documentation for your future self.
    2. Click Save + Continue

    1. Choose the appropriate Spreadsheet to post the data to (note, the spreadsheet must be created in the Google Drive Sheets interface, you can do that right now and then return to this tab, it will find it right away)
    2. Choose the Worksheet (this is the tab you see at the bottom of the spreadsheet)


This will immediately scan the Spreadsheet and present fields for mapping to the headers in the spreadsheet

It will also fill in the second row of the Google spreadsheet you created with a validation message.

    1. Click on the search button and choose the appropriate field, in this example you First Name from the XML Feed has already been chosen.
    2. In this example, click on the search button...
    3. type in zip (this will fliter the available fields)
    4. Click on the Zip Code from the XML feed. Note that if the test went through, it will show the results from the campaign from earlier (in this case, a test zip code string of 12345).
    5. Continue until all options have XML feed values assigned.

Final result:

Click Continue

Google Sheets will present the fields with the form data from the test message sent to it. (may include more values if set up by you)

    1. Click Create & Continue

The test information is pushed to the Spreadsheet.

If you have the spreadsheet open in another tab, you can actually witness the information populate the next free row in real-time, which is neat.

Zapier confirms the test was successful.

    1. Click on Finish.

Now you are prompted to activated the Zap.

    1. Click on the control to turn it on.

Congratulations! You have made your first automation! This exercise has hopefully increased your intuitive understanding of the types of automations you can make.

The process differs slightly for other applications you may integrate into it, but now that you have done one—making others will be much easier.

We advise running one more test to make sure it works as expected now that is configured and activated. You can also delete any validation messages Zapier adds at your convenience.