Trasfering data using flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Create a Trigger
- Go to Flow Designer.
- Click New Flow.
- Set the Trigger to something like:
- Record Created (if the datasource is a record in a table).
- Choose the Datasource Table as the trigger source.
- Add Conditions (Optional)
- Add a condition to ensure the flow only runs for specific types of datasources if needed.
- Add Action: Transform Data
- Use an action like Script, Data Transformation, or Integration depending on your platform.
- Map the fields from the datasource to the target table.
- Add Action: Insert into Target Table
- Use the Create Record or Insert Row action.
- Select the Target Table.
- Map the transformed data fields to the target table fields.
- Test the Flow
- Create a new datasource record.
- Verify that the flow triggers and the data is correctly inserted into the target table.
Example in ServiceNow Flow Designer:
- Trigger: When a record is created in u_datasource.
- Action 1: Transform data (e.g., via Script or Data Pill Mapping).
- Action 2: Create record in u_target_table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago