Summary: ◀▼
Use Google Sheets actions in action flows to connect your account, create or update spreadsheets, and log ticket data in automated workflows. You can append, insert, read, search, and update rows, making it easier to track tickets, share details with your team, and report on trends, impact, and volume.
Connecting Google Sheets to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click Google Sheets.
- Click Connect.
- Follow Google's prompts to authenticate and complete the
connection.
You'll log into a Google Workspace or Gmail account, and admin approval might be required in managed environments.
Note: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for Google Sheets.
Using Google Sheets actions in action flows
Google Sheets action steps can be used to create spreadsheets and add data, such as an AI-generated ticket summary, to the sheet, which can then be shared with other users.
Creating a new Google spreadsheet
Use the Create spreadsheet action to create a spreadsheet.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | spreadsheet_title |
| Output |
spreadsheet_id,
sheet_title
|
Listing your Google spreadsheets
Use the List spreadsheet action to return a list of all spreadsheets in the account. This step makes it possible to reference and act on spreadsheets created outside of the action flow.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | none |
| Output |
spreadsheet_id and
sheet_title for each
spreadsheet |
Creating a new sheet in a Google spreadsheet
Use the Create sheet action to add a sheet to an existing spreadsheet. You have the option to specify column headings and an initial row of data.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
spreadsheet_id,
sheet_title
|
| Output |
spreadsheet_id,
sheet_title
|
Appending a row to a Google spreadsheet
Use the Append row action to add a row to a sheet.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
spreadsheet_id,
sheet_title,
values
|
| Output |
spreadsheet_id,
sheet_title,
values
|
Searching rows in a Google spreadsheet
Use the Search rows action to search the first 1,000 rows of a sheet for rows matching one or more filter conditions. The result indicates when the search limit is reached.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
spreadsheet, sheet,
Does the first row contain headers?,
filter conditions
|
| Output | Array of matching rows with row numbers and values, match count, truncation indicator, and HTTP status code. |
Updating a row in a Google spreadsheet
Use the Update row action to update one or more cells on a specific row in a sheet.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: spreadsheet,
sheet, Does the first row
contain headers?, row
numberOptional: Column fields (dynamically generated based on sheet headers) |
| Output | Spreadsheet ID, sheet title, row number, updated columns list, and HTTP status code. |
Inserting a row in a Google spreadsheet
Use the Insert row in sheet action to insert a new row into the sheet, setting one or more cells by column. Leave the row number blank to append after the last row with data, or set it to insert at that position and shift existing rows down.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: spreadsheet,
sheet, Does the first row
contain headers?, row number,
row values (dynamically generated
column fields based on sheet headers).Optional: Column fields (dynamically generated based on sheet headers) |
| Output | Spreadsheet ID, sheet title, row number, updated columns list, and HTTP status code. |
Reading a row in a Google spreadsheet
Use the Read a row action to read the contents of a specific row in a sheet.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: spreadsheet,
sheet, Does the first row
contain headers?, row
numberOptional: Column fields (dynamically generated based on sheet headers) |
| Output | Spreadsheet ID, sheet title, row number, row values as object with column names as keys, and HTTP status code. |
Recipe: Logging new Zendesk tickets in a Google Sheet
The following example action flow adds data to a centralized ticket log in Google Sheets. Each time a Zendesk ticket submitted, the action flow automatically adds a new row to the spreadsheet with the full details. This allows the team to automate the tracking of trends, analization of impact, and reporting on volume.
- Add an action flow trigger with the following details:
- Click Add trigger.
- In the step sidebar, under Zendesk, click Tickets.
- Click Lifecycle and select Ticket created.
- Add a step to look up ticket details:
- In the action builder, beneath the action flow trigger, click the
Add step icon (
). - In the step sidebar, under Zendesk actions, click Look up ticket.
- Under Ticket ID, click into the field and then click Select a variable instead.
- Within the variable menu, select Ticket created as the step that output the variable you want to use, and then select Ticket ID.
- In the action builder, beneath the action flow trigger, click the
Add step icon (
- Add a step to look up user details about the ticket requester:
- In the action builder, click the Add step icon (
). - In the step sidebar, under Zendesk actions, click Look up user.
- Under User ID type, select Zendesk user ID.
- For User ID, click Add variable.
- Within the variable menu, select Look up ticket as the step that outputs the variale you want to use, and then select Requester ID.
- In the action builder, click the Add step icon (
- Add a step to lookup details about the ticket requester's organization:
- In the action builder, click the Add step icon (
). - In the step sidebar, under Zendesk actions, click Look up organization.
- Under Organization ID type, select Zendesk organization ID.
- For Organization ID, click Add variable.
- Within the variable menu, select Look up user as the step that outputs the variale you want to use, and then select Organization ID.
- In the action builder, click the Add step icon (
- Add a step to look up user details about the ticket assignee:
- In the action builder, click the Add step icon (
). - In the step sidebar, under Zendesk actions, click Look up user.
- Under User ID type, select Zendesk user ID.
- For User ID, click Add variable.
- Within the variable menu, select Look up ticket as the step that outputs the variale you want to use, and then select Assignee ID.
- In the action builder, click the Add step icon (
- Add a step that adds a row to a Google Sheets spreadsheet with the
information you collected for the ticket, requester, organization, and
assignee:
- In the action builder, click the Add step icon (
). - In the step sidebar, under External actions, click Google Sheets and then select Append row to sheet.
- Select an existing Spreadsheet or click Create new and enter a Spreadsheet title.
- Select the Sheet to which the row is being added.
- Under Row values, use variables from the previous steps to
capture the details you want about the ticket, requester,
organization, and assignee associated with the ticket. Enter the
data in the order the columns appear in the sheet, separating each
column's value by a comma.
For example, this might include the ticket's ID, subject, and date created; the ticket requester's name; the organization's name, and more.
- In the action builder, click the Add step icon (
- Click Save.
- Click Test to test the action flow.
- Click the options menu (
) and select Activate to begin using the
action flow to automatically log incident tickets in your Google Sheets
spreadsheet.