The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Trasfering data using flow designer

PALAVALASAB
Tera Contributor

Hi All,
I need to trigger a flow when a new datasource is created. The data should be transferred to the target table using the Flow Designer. How can I achieve this?

2 REPLIES 2

Syed14
Mega Guru

You can transfer data directly from attachment to target table by using transform map, but if you want to do it using flow, you have to create a custom script action which will parse the attachment and then enter data into target table.

This document will be helpful for you:

https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/sn_impex-namespace/GlideExcelPa... 

pavani_paluri
Giga Guru

Hi @PALAVALASAB ,

 

To transfer data to target table, we have already in-built functionalities like import set, transform map and robust transform map.

 

Using flow designer you can give trigger condition on data source table when its created. Add actions in the flow and can use Import set API to trigger the data transformation.

var dsSysId = inputs.data_source_sys_id;

var importSetRun = new GlideImportSetRun();
importSetRun.setDataSource(dsSysId);
importSetRun.runImport();

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P