Using Google Sheets actions in action flows

By connecting the Action builder to external systems, such as Google Sheets,
admins can integrate Zendesk with external systems in automated workflows, improving
collaboration and maintaining a seamless experience across multiple platforms.
Note: The
steps associated with external systems in action flows are referred to collectively
as external actions.

This article contains the following topics:
Connecting Google Sheets to action builder
Using Google Sheets actions in action flows
Recipe: Logging new Zendesk tickets in a Google Sheet




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.
When connecting to external systems for use in action flows, the following best practices are recommended:
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.
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.



To connect action builder to Google Sheets
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 to a sheet
created within the action flow, such as an AI-generated ticket summary, which can
then be shared with other users.
The following Google Sheet actions are available:
Create spreadsheet
Create a new sheet
Append row




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,








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 previously created by
the action flow.
This action has the following inputs and outputs:










Variables




Inputs

spreadsheet_id,
sheet_title,
values



Output

spreadsheet_id,
sheet_title,
values










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.
Such an action flow would consist of the following steps:
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.


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.


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.


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.


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.



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.