How to upload the data using flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 01:58 AM
Hi Community,
I'm currently building a process to upload Configuration Items (CIs) into the cmdb_ci table. The requirement is as follows:
- A catalog form allows users to upload CI data via an Excel sheet.
- Once the request is submitted and approved, the data should be automatically uploaded into the CMDB.
I’ve created a flow in Flow Designer to handle the process, and everything is working fine up to the approval stage. However, I'm facing a challenge with uploading the Excel data into the cmdb_ci table.
Could you please advise:
- Is it possible to upload the Excel data into the table directly using Flow Designer?
- If yes, then what is the approach to do this using flow?
- If not, what would be the best approach to achieve this using scripting (e.g., Script Includes or other server-side logic) so that the data gets uploaded automatically after approval?
Any guidance would be appreciated.
Thanks!
- Labels:
-
Data Acquisition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 02:01 AM
Hi @zee15
Yes, it is do able and many cases are there for same.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 02:04 AM
Hello @zee15,
You can follow this approach:
Catalog Form with Excel Upload
Use a catalog item where users upload the Excel file (as attachment).
Post-Approval Flow
In Flow Designer, after approval, add a Script step that:
Retrieves the attachment
Loads it into an Import Set table
Triggers the Transform Map
Import Set Table
Create an import set table (e.g., u_import_ci_data).
Make sure the fields match your Excel columns.
Transform Map
Create a Transform Map from your import set table to cmdb_ci (or specific subclass).
Set up field mappings, coalesce fields, and onBefore/onAfter scripts as needed.
Example: Script to Trigger Import Set:
(function execute(inputs, outputs) {
var loader = new GlideImportSetLoader();
var importSetRec = loader.createImportSetRow('u_import_ci_data', '<attachmentSysId>');
var transformer = new GlideImportSetTransformer();
transformer.transformAllMaps(importSetRec);
})(inputs, outputs);
Replace '<attachmentSysId>' with the actual Sys ID of the uploaded file (which you can find on the RITM or Task record).
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 02:07 AM
you can attach the file to data source and then trigger the transformation using custom flow action and then call that flow action within your flow
you can use Custom Action with script
check this link and script shared by Fabian
Usage of GlideImportSetLoader & GlideImportSetTransformerWorker API's from scoped Application
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2025 03:13 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader