Copy attachment from one record to data source in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:01 PM - edited 05-29-2025 11:12 PM
Hi Friends,
I am working on a flow designer. I want to upload the data in attachment into target table via import set (data source)
1. End user will attach a file to catalog item.
2. The attachment will be displayed on RITM variables.
3. In flow designer, I am creating "Copy Attachment" action
4. I have attached the file to Data Source which is already created in system.
5. After this, I need to run the already created Transform map from Flow itself. How to run the transform map from flow ? Please guide on this.
Thank you for your time.
Asmi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 07:58 AM
Hi Asmita,
After your data source step in flow - create a script action or flow variable to trigger the script below.
var schImp_GR = new GlideRecord('scheduled_import_set');
schImp_GR.addQuery('name','your transform map namet');// transform map name - you can do sys id as query as well
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // Global Application
//gs.executeNow(schImp_GR); // Scoped Application
}
also you can refer GlideImportSetTransformer API from servicenow developer references.
If this answer is helpful, mark this as correct.
Thanks,
Yaswanth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 10:57 PM
Hi,
Before you do the copy attachment action, do a Lookup record (only find one record, not the one with an ending s that finds multiple records) on your datasource table.
Then use the record found in this step, in your copy attachment action.