Google Sheets

Connecting Google Sheets with Mesa

When you're setting up your first workflow with Google Sheets, you'll need to create a credential through Mesa's Google App or your own custom Google App. Click on Authenticate with Google to finish the process. 

Afterwards, you can re-use the newly created credential and select it for your future workflows!


Configuring

The following contains steps on how to configure your Google Sheets workflow. 

Step 1: Create or Select your Google Sheet Credential

Click here to learn more on how to do this.

Step 2: Select your Google Spreadsheet and Sheet

In the App Configuration section, you will see two fields for Spreadsheet and Sheet. 

In the Spreadsheet drop-down menu, click on it and you will see all the Google Sheets that are associated from your Google account. Select your preferred Spreadsheet. 

In the Sheet Name drop-down menu, click on it and you will see all the Sheets within the selected Spreadsheet. Select your preferred Sheet to send information to. (e.g. Sheet1)

Step 3: Obtain your Google Sheet's Column Headers

Column Headers are very important so that Mesa can send data to your Sheet. Line 1 in the following screenshot is an example of column headers. (e.g Customer ID, Email, and etc...) 

1. Ensure that your new or existing Google Sheet has Column Headers in your selected Sheet. If your new Sheet does not have Column Headers, manually type in a label of the type of the data that you'd like to send. 

2. Leave the First row of sheet value selected in the Column Headers field and click on the Retrieve Spreadsheet Columns button. 

Mesa will automatically detect the columns in your Google Sheet and add them to your Mesa workflow. If no fields or tokens appear, or if fields are missing, make sure you have at least one row in your Sheet with a value in each column.

Step 4: Set values for the data that you'd like to send to your Google Sheet

After obtaining your Column Headers, you can start customizing your workflow with Mesa's Token feature or with text. Tokens lets you pass data to a third party service. 

In the Fields section within your Google Sheet Step, you can click on the {+} icon which is located to the right of the field.

To get an idea of the type of data that you can send, feel free to install Mesa's existing template: Add Shopify Customer to Google Sheets Document

Step 5: Save your workflow

Step 6: Test your newly created workflow

Click here to learn more on how to test your creation.


Add or edit data fields with an existing template

Mesa has several Google Sheets templates that you can install right out-of-the-box. The existing templates may not contain all the data that you wish to send to Google Sheets. To add or edit fields to the existing template, follow these instructions.

Step 1: View your Google Sheet and make any changes to your Sheet's Column Headers

Column Headers are very important so that Mesa can send data to your Sheet. Line 1 in the following screenshot is an example of column headers. (e.g . Customer ID, Email, and etc...) 

To add additional columns:

After the changes: Total Spent and State were new columns added to the Sheet

Step 2: View your Mesa template and find the Google Sheet: Add Row Step

Step 3: Click on the Retrieve Spreadsheet Columns button

Clicking on the Retrieve Spreadsheet Columns button is important in order to obtain the recent edits to your Google Sheet's Column Headers.

Step 4: Set values for the data that you'd like to send to your Google Sheet

After obtaining your Column Headers, you can start customizing your workflow with Mesa's Token feature or with text. Tokens lets you pass data to a third party service. 

In the Fields section within your Google Sheet Step, you can click on the  {+} icon which is located to the right of the field.

Step 5: Save your workflow


Triggers

The Row Created Trigger runs on a polling system. Mesa makes a request to Google Sheets every hour to look for new records and triggers the necessary Workflows. During testing, Mesa will look for new records every time the workflow is saved. After each poll, Mesa records the last row that was read. For example, if there are nine rows in your spreadsheet and you add two rows, Mesa will trigger a workflow for the 10th and 11th rows. Because of this, making the following changes to your spreadsheet while the workflow is active could cause rows to be duplicated or skipped:

  • Deleting existing rows.
  • Adding rows anywhere other than to the bottom of your sheet.
  • Resorting the sheet.
  • Filtering the sheet.
If you need to make any of those changes to your Google Sheet, disable the Mesa Workflow, and make your changes. Then click the Update Field Values button and then enable and save your workflow. You should also click the Update Field Values button after making any of these changes to your sheet's structure:
  • Renaming the sheet.
  • Renaming/adding/rearranging columns.
  • Deleting existing columns.

Actions

Click the Retrieve Column Field Values button after making any of these changes to your sheet's structure:

  • Renaming the sheet.
  • Renaming/adding/rearranging columns.
  • Deleting existing columns.

Caveats

  • Your Spreadsheet or Sheet cannot have a colon (:) in the title. If you do have a colon in the title and you see an Error in the Logs, please remove the colon.
  • If your Sheet is missing headers in some of the columns, Mesa will not be able to retrieve the Column Field Values. Make sure that each column that should contain information has a header.