How to send form data to Google Sheets

In this article we will go through the steps of connecting your Triggerbee Onsite Campaign Forms to Google Spreadsheet, without using Zapier or any other service.

Instead we will use the Webhook action available in Triggerbee Automation to send data to a receiving Web app that we setup inside a Google Sheet.

Here are the steps:

1. Create your form in Triggerbee 

2. Create a Google Sheet

3. Copy-Paste a prepared script into the Spreadsheet

4. Deploy script as a 'Web app'

5. Configure your Form to call the Web app

6. Done!

Now I will go through each steps more in detail:

1. Create your form in Triggerbee

I have created the following form as an example:

2. Create a Google Sheet

Create a new Google Sheet. No need for entering anything - the column headers will be created automatically. Head over to Extensions => Apps Scripts. 

You can name your project to anything you want. I have named my project Triggerbee Form

3. Copy-Paste a prepared script into the Spreadsheet

Copy the script found here:  https://github.com/oloftorn/oloftorn/blob/main/triggerbeeFormsToGoogleSpreadsheet.gs

Paste the entire script into the Apps Script Editor, and then press the "Save"-button.

4. Deploy script as a 'Web app'

Select type "Web app":

No need to add any description. But make sure to select " Anyone" in the "Who has access" field.

Click Create, and then copy the URL to your newly deployed WebApp.

Note: If you decide to make changes to the script, make sure to redeploy the webapp as a new version.

5. Configure your Form to call the Webapp

Go into your Triggerbee account, and go to "Automations". Create a new automation, and as a Trigger, you want to choose "Form submission" and then pick your campaign. 

In the Actions column, add a new action called "Execute Webhook".

In the webhook URL paste the URL to your Webapp.

6. Done!

Now try it out! Remember to clear cookies or run in a new inkognito between each form submission.

If you want to debug and check if the webapp has been called or not you can go to Executions in Google App Scripts:

If everything is going as planned your spreadsheet should begin to populate from the form submissions.

If you decide to add or remove form fields the script will detect this and recreate the header row.

Making changes

If you are making changes to the script you need to re-deploy the Webapp:

And then press "Deploy"-button

Still need help? Contact Us Contact Us