Creating Excel File using Utility spoke action in flow designer

NagaChandaE
Kilo Sage

Disclaimer: This requires the STARTER pack for #IntegrationHub (the smallest package) or license to use the Utility Action Spoke.

 

Sometimes you need to extract data from ServiceNow – across multiple tables, different record types, and even static text. This often makes it difficult to use database views or reports alone. Some teams resort to scripts that output CSV strings for copying into Excel. That approach is error-prone and far from elegant.

 

So what’s a better solution?

Zero code
Flow Designer
IntegrationHub Utility Spoke

 

This article walks you through exporting data from ServiceNow into a .csv file using only Flow Designer and out-of-the-box Utility Spoke actions.


Prerequisites

Before you start, ensure:

  • IntegrationHub Starter Pack is licensed and active

  • Utility Spoke plugin is installed and updated

  • You have appropriate permissions (flow_designer, admin, or sn_util.admin)

 

Step 1: Create a File Schema

Navigate to:
IntegrationHub Utilities → File Schemas → New

This schema defines the columns and structure of your final file. Decide:

  • What column names do you want? (e.g., "Request Number", "Quantity")

  • What data types are used? (string, choice, etc.)

This is product documentation link for creating file schemas : Creating Schema 

 

Example schema definition:
Screenshot 2025-06-25 at 9.22.38 AM.png
 

Step 2: Create a Flow in Flow Designer

a. Set a Trigger

Create a new flow and define a trigger.
Example triggers:

  • Catalog Submission

  • Record Updated

  • Scheduled Flow

  • Manual for testing


b. Add Action: Begin Delimited File

Search for and add the "Begin Delimited File" action from the Utility Spoke.

Set the inputs:

  • File name: export_data.csv (must end in .csv)

  • File type: CSV

  • File schema: The schema you created in Step 1

This sets up the base structure of your file.


c. Add Action: Append to Delimited File

Add the "Append to Delimited File" action to your flow.

For each row of data (e.g., from a multi-row variable set or GlideRecord list), append a row using:

  • The same File record from the "Begin File" action

  • The same File schema

  • Field values: Map each schema column to a variable, static value, or data source

Repeat this step in a loop if appending multiple rows.


d. Add Action: Build File

After all rows are appended, add "Build File" from the Utility Spoke.

Input:

  • File: The record from "Begin Delimited File"

This finalizes the CSV and generates an attachment record behind the scenes.


e. Add Action: Get Attachments on Record (Optional)

To access and reuse the generated file, use:

  • "Get Attachments on Record"

  • Source Record: The File from the "Build File" step

This retrieves the actual file attachment object.


f. (Optional) Move or Send the Attachment

You can:

  • Use "Move Attachment" to attach the file to a catalog item or incident

  • Use "Send Email" to email the CSV file to a user

  • Use "Create Attachment" to place the file on any record

In most cases, you'll loop through attachments and move them to your trigger record (like a RITM).


Step 3: Test Your Flow

Test the flow using a record with valid data. After running, open the associated record (e.g., RITM or Incident) and confirm the .csv file has been attached.

 

Summary

With just a few actions and no scripting, you’ve now created a fully functioning Excel/CSV export process using Flow Designer and the Utility Spoke.

 

Key Benefits:

  • No code required

  • Reusable file schema

  • Works with multi-row variables, GlideRecords, static text, and more

  • Can be automated and attached to any record

0 REPLIES 0