Google Sheets

Connect 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 the Authenticate with Google button to finish the process. 

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


Configuration

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

Step 1: Create or Select your Google Sheets Credential

You have completed this step by following the above section. 

If you already have an existing Google Sheets Credential, you can select it from the Existing Credentials drop-down menu.

Step 2: Create your Google Sheets Spreadsheet and Sheet

In the Step Configuration section, you will see selections under Spreadsheet and a New Spreadsheet Name field.

Select Create new for Spreadsheet and add a new spreadsheet name. Click on the Create Spreadsheet button to create the new spreadsheet in Google Sheets.

The Select Spreadsheet field will update with the title of the new spreadsheet. You can click the external link icon to the right of the search bar to view the spreadsheet on your Google Sheets.

Select an existing Google Sheets spreadsheet

If you do not want to create a new spreadsheet, you can select an existing Google Sheets spreadsheet. Select the Select existing text under Spreadsheet. 

Choose the existing spreadsheet from the Select Spreadsheet drop-down menu and the sheet name from the Sheet Name drop-down menu.

Step 3: Obtain your Google Sheets' 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. Change the title of your spreadsheet on Google Sheets.

2. Ensure that your new or existing Google Sheets 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 data that you'd like to send. 

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

MESA will automatically detect the columns in your Google Sheets 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 Sheets

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

In the Columns section within your Google Sheets 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 Sheets 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 Sheets Create Row Step

Step 3: Click on the Update Spreadsheet Columns button

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

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

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

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

Step 5: Save your workflow


I don't see my Google Sheets workflow activating when I update something in my Google Sheets?

MESA workflows that contain Google Sheets triggers (such as Row Created) will run on a polling system. Meaning, on every hour or whatever the selected frequency is selected in your MESA workflow, MESA will look for any recent activity in Google Sheets. As a result, you may not see immediate activity in your MESA workflow until the frequency hits. 

You can locate the polling system under the Advanced Options of the Google Sheets trigger. You can keep the default frequency or adjust it.

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.
  • Add 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 Sheets, 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.

Once the frequency hits, MESA will process every single task that has accrued within the previous timeframe.

🗒 Note: Please note that available frequencies will differ depending on your MESA billing plan.


Actions

Click the Update Spreadsheet Columns 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.