fbpx

Sending Gravity Form Entries to Google Sheets

Here is an alternative method to using Zapier or other external services for sending your Gravity Form submissions to a Google Sheet. This is helpful if you want to track orders, process applications or simply manage the submitted data in a google sheet, and share it with others.

You will need the following:

  1. A Gravity Forms license, if you don’t, one can be purchased here: Get your Gravity Forms License.
  2. A 3rd party API plugin or coding skills to write the connection yourself. Here are 2 great free plugins that can do this: GravityPlus Post to 3rd Part API or Forms: 3rd Party Integration
  3. A Google Script attached to a Google Sheet that is deployed as a Web App (explained below).

Here are the step by step directions for sending your form entries to Google Sheets:

  1. Create a Google spreadsheet and add a header row to the spreadsheet. Keep in mind that changing the name of and column after this is set up will break the connection for the field that is sent to that column.
  2. On the top of your Google Spreadsheet, Go to Tools > Script editor to add a new Google Script that will be attached to this Sheet.
  3. Delete any data that is in on the Script and copy and paste the script below:

  4. Save your script by clicking File > Save , you will need to give your script a name.
  5. Run the script by pressing the Play button icon in the menu. A permission box should pop up, click continue and then allow.
  6. Deploy the script as a Web App by clicking on Publish > Deploy as web app
    1. Project Version: Leave default or enter 1.0.0
    2. Execute the app as: Myself
    3. Who has access to the app: Anyone, even anonymous
  7. Click Deploy and then Copy the current web app URL from the confirmation screen. This is now your API URL to use in the Post to 3rd Party API for Gravity forms.
  8. If you are using the Gravity Forms Post to 3rd Party API plugin: Create a new Send to Third Party feed for your form by going to Forms > Your Form > Settings > Send to Third Party > Add New
    1. Name: Any Name you choose
    2. Method: POST
    3. API URL: Paste the URL that you copied from the Google Script Web App
    4. Authorization: None
    5. Headers: Leave Blank
    6. Format: Default
    7. Map API Parameters to Form Fields: In the first column, enter the column titles from your google sheet, they must match exactly. Select which form field you want mapped to that column in your google sheet via the dropdown.
    8. Conditional Logic: Optional – you can add conditional login to this connection in order to limit which form entries get sent to your google sheet.
    9. Save the feed and submit a test form to see it work.

4 thoughts on “Sending Gravity Form Entries to Google Sheets”

  1. Hi Sam!

    Awesome snippet! I got the form sending data to Google Sheets, however, when it arrives in my sheet, it appears raw, wherein the data comes in as {header=value, header=value, header=value} etc. Don’t know how to attach screenshots here so I’ll post image links instead. Hope you can help me out with this one, I’ve been trying to do this with the Send to Third Party App to no avail, and I got it working using a snippet i found from ctrlq.org.

    Screenshots:
    https://unsee.cc/sonubapi/

    Cheers!

  2. The script you’re using is probably set to send the data in raw format. I would suggest contacting the creator os the script. If you need help with the methods provided here just post the details.

    1. Hi Sam,

      Thanks for your reply! I’m trying to narrow down where the problem is and I think it’s from the functions on the Google Sheet Script. See, this is the last data the Google Sheet received on all columns with headers:

      {firstname=Test 10, mobile=123, topic=Others, message=abc, [email protected], timestamp=Sun Sep 24 14:19:32 GMT+08:00 2017, lastname=1112}

      Whereas the script doesn’t seem to slice the header from the value when it’s received and just places all of it in each cell. I’m not sure if I’m understanding this correctly, but I’ve been trying to modify the script but it hasn’t changed the outcome.

      Another question related to this would be should I run doGet or doPost, or both (and if so, in which order?) Everytime I modify the script I run doGet, then doPost, then publish > update the app.

      Thank you so much for spending time to help me here! 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart