Connecting Microsoft Excel 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 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.
-
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 Microsoft Excel.
- Click Connect.
-
Use Microsoft to authenticate the account.
Depending on your organization's policies, you might need to authorize device or app access.
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.
- To ensure the connection is successful, you must have a Microsoft tenant admin add the connector first.
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 Microsoft Excel.
Using Microsoft Excel actions in action flows
Microsoft Excel action steps can be used to create and update Excel workbooks and worksheets as well as reading data from them.
Creating a new Excel workbook
Use the Create workbook action to create a new Excell workbook with a specified name.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
workbook_name
|
| Output |
created_date_time,
http_status_code,
last_modified_date_time,
web_url,
workbook_id,
workbook_name
|
Creating a worksheet within a Excel workbook
Use the Create worksheet action to create a new worksheet within an existing workbook.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
workbook_id,
worksheet_name
|
| Output |
http_status_code,
id,
name,
position,
visibility
|
Adding a row to an Excel worksheet
Use the Add row to sheet action to append a new row to an existing worksheet.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
workbook_id,
sheet_name,
values
|
| Output |
address,
cell_count,
column_count,
column_hidden,
column_index,
http_status_code,
row_count,
row_hidden,
row_index,
values
|
Fetching data from a row in an Excel worksheet
Use the Fetch row data action to retrieve values in a specific row based on a row index.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
spreadsheet_id,
row_index
|
| Output |
row_data
|
Updating a row in an Excel worksheet
Use the Update row action to update values in a specific row based on a row index.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
spreadsheet_id,
header_row
|
| Output |
address,
cell_count,
column_count,
column_hidden,
column_index,
http_status_code,
row_count,
row_hidden,
row_index,
values
|
Recipe: Using an action flow to maintain a centralized incident log in Excel
The following example action flow adds data to a centralized incident log in Microsoft Excel. Each time a Zendesk ticket is classified as an incident, the action flow automatically adds a new row to the spreadsheet with the full incident details. This allows the team to automate the tracking of trends, analization of impact, and reporting on incident volume.
-
Add an action flow trigger with the following details:
- Click Add trigger.
- In the step sidebar, under Zendesk, click Tickets.
- Click Properties and select Ticket type changed.
- Click Add condition.
- Under Variable, select Ticket type changed and Type.
- Set the Operator to Is.
- Under Value, enter Incident.
-
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 type changed 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 variable 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 variable you want to use, and then select Organization ID.
-
In the action builder, click the
Add step icon (
-
Add a step that adds a row to an Excel spreadsheet with the
information you
collected for the ticket, user, and organization:
-
In the action builder, click the
Add step icon (
).
- In the step sidebar, under External actions, click Microsoft Excel and then select Add row to sheet.
- Select the Excel sheet's Workbook ID and Sheet name.
-
Under Row values, use
variables from the previous steps to
capture the details you want about the ticket, user,
and
organization associated with the incident. 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 totest the action flow.
-
Click the options menu (
)
and select Activate to begin
using the
action flow to automatically log incident tickets in your
Excel
spreadsheet.