> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/google-sheets/row-updated-advanced.md).

# Row Updated (Advanced)

## Setting up

The Row Updated trigger requires additional configuration within your Google Sheet to work properly. Let's go through each step:

Begin by creating a new workflow in MESA and adding a Row Updated trigger. Under Step configuration, copy the App Script code.

<figure><img src="/files/vj55SIKDhSsLeRaQj7Nx" alt="Screenshot of a new MESA workflow with the Row Updated trigger selected, showing the Step configuration. Spotlight the Copy App Script code button."><figcaption></figcaption></figure>

Go to your Google Sheet. Click on the “Extensions” menu option and select “Apps Script”.

<figure><img src="/files/HfxVzFRaSQqvTc4nYm4i" alt="Screenshot of a Google Sheet with the Extensions menu open. Spotlight the Apps Script menu option."><figcaption></figcaption></figure>

You should end up here:

<figure><img src="/files/9kNTKaTtC3mCj6PcCUw9" alt="Screenshot of the Google Apps Script editor opened from a Google Sheet, showing the default empty script. Spotlight the full Apps Script code editor."><figcaption></figcaption></figure>

Paste the code from step 1, replacing the contents of the App Script file. It should look like this:

<figure><img src="/files/6Yo2FH8jzcQou8Q4mEJB" alt="Screenshot of the Google Apps Script editor with the MESA App Script code pasted in, replacing the default contents. Spotlight the pasted code in the editor."><figcaption></figcaption></figure>

Save your changes.

<figure><img src="/files/OyyI8AfQM1aBVw6Pkfep" alt="Screenshot of the Google Apps Script editor after pasting the MESA code. Spotlight the Save project button."><figcaption></figcaption></figure>

The last thing we have to do is to setup a trigger. In order to do that we need to click on the clock icon on the left hand side (in the Google Script editor).

<figure><img src="/files/Ek4RLzDsqixqqQJT5rp8" alt="Screenshot of the Google Apps Script editor left-hand sidebar. Spotlight the clock icon that opens Triggers."><figcaption></figcaption></figure>

Click "create a new trigger” on the Triggers page.

<figure><img src="/files/QHIjdaQYuotpRDuvfqfs" alt="Screenshot of the Google Apps Script Triggers page. Spotlight the Create a new trigger button."><figcaption></figcaption></figure>

The only thing we need to edit in the window that pops up is under “Select Event Type”, set that to “On change” and Save.

<figure><img src="/files/5zTi0Csf58MXZpoI7Us9" alt="Screenshot of the Google Apps Script add trigger window. Spotlight the Select event type dropdown set to On change, then Save."><figcaption></figcaption></figure>

You will be asked to approve this trigger via the standard Google authorization flow. Choose the correct Google account and grant access.

Your Row Updated trigger has now been configured. Enable your workflow in MESA and edit your spreadsheet. Confirm that your workflow is getting triggered successfully in the Activity tab.

## Variables available

The Row Updated step will not have any [variables](/workflow-builder/fields/variables.md) available until you have set up the App Script in Google Sheets and run at least one [manual run](https://docs.getmesa.com/workflow-builder/testing) or live run. To update the variables available after updating column headers, simply make another update in your spreadsheet and refresh the builder. MESA will automatically make the columns from your latest run available in the Variable Selector.

<figure><img src="/files/d95yzxSmguhUnB23683U" alt="Screenshot of the Row Updated step in the MESA workflow builder after a run. Spotlight the Variable Selector showing the columns from the latest run."><figcaption></figcaption></figure>
