Blog post banner

Sending Zapier Actions to Desktop Excel using Gridarrow webhooks

August 30, 2018

Zapier is the tool that gives you internet superpowers, providing the glue between over 1000 web applications. Using the Zapier webhook action together with Gridarrow allows you to bring that connectivity directly into Desktop Excel.

A webhook is a common way to allow internet apps to “speak” to one another, for example to notify another app that something has happened.

What is Gridarrow?

Gridarrow is the missing server for Excel. It connects just about any data source to Excel with simple Python scripts.
Why is it awesome?
  • It's real-time, so as soon as the data is updated in the Gridarrow App it's updated in Excel, no need to poll or refresh.
  • It's multi-user so your colleagues can connect to the same data at the same time.
  • It simplifies your spreadsheets by moving data retrieval and pre-processing into Python.
Request Demo

In this example we’ll show how easy it is to go from a new Google Forms submission to a new row in an Excel table using Gridarrow.

Configuring the Zapier Action

In this example, we’ve assumed that you have already set up a Google Form and configured the Zapier Trigger.

Once the trigger is in place, the first thing we need to do is select the Webhook Action from the list of built-in Zapier apps.

Next, we’ll choose the POST request type, as this allows us to include a message “payload”, or collection of data we want to pass to the sender.

Next, let’s create our Gridarrow app that will receive the webhook! Go the Gridarrow Catalog and choose the Zapier to Excel app, which has the code used in this blog post.

Once the app is created, it’s assigned its own unique webhook address. This can be seen in the Settings tab in the Console, as shown below.

Let’s copy the URL shown there using the clipboard icon, and go back to the Zapier console to continue our set up.

In the Zapier Edit Template step, make the following updates:

  1. Paste the webhook endpoint to the URL field.
  2. Select Json as the Payload Type.
  3. Configure the fields that have been used in your Google Form. You should be able to see them easily if you click the dropdown list in the row editor.

Important: the fields names that you choose here should match the fields in the ZAPIER_FIELDS list in your Gridarrow app

Once that’s done, the template should look something like this:

All set, let’s test that things are working as expected! In the next view you’ll see an example message that you can send from Zapier to your Gridarrow app to make sure the message is received and sent to Excel.

Lastly, don’t forget to switch the Zap on.

Here’s a short animated gif showing the integration in action. Because Zap’s are only sent every few minutes (depending on your plan) there can be a lag between the form submission and your Gridarrow app receiving the message, but once it’s there you’ll see it in Excel right away!

Sending new Google Form entries to Excel using Zapier webhooks and Gridarrow

Hopefully that gives an idea of what can be achieved with the Zapier - Gridarrow webhook integration.

As always, here’s the few lines of code that are required to run the app. For additional configuration possibilites of the webhook function, check out the API reference.

But before you jump into it, remember to:

 1 2 3 4 5 6 7 8 910111213141516171819202122232425
import json

from gridarrow import Arrow, DefaultValue

arrow = Arrow()

ZAPIER_FIELDS = ['timestamp', 'name', 'email', 'phone', 'address']

@arrow.initialize
def initialize():
    grid = arrow.grid("Contact information", rows=1, 
                    columns=ZAPIER_FIELDS,
                    default_value=DefaultValue.EMPTY_STRING)
    return grid


@arrow.webhook('/', methods=['POST'])
def zapier_webhook(grid, request):
    data = json.loads(request.data)
    try:
        row = [data[c] if c in data else '' for c in grid.columns]
        grid.append([row])
    except Exception as e:
        arrow.log.warn(f"Unable to process webhook with data {data}, {e}")