Need to run scheduled import from flow designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 06:28 AM
Hi All,
Can we run a scheduled import from flow, if yes kindly help me on achieving it.
Thanks,
Jaydee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 03:01 AM
You can do it by creating a custom action, that takes a sys_id as input:
(function execute(inputs, outputs) {
try {
var exportGr = new GlideRecord("scheduled_import_set");
exportGr.addQuery("sys_id", inputs.id); // sys_id of scheduled import
exportGr.query();
if (exportGr.next()) {
gs.executeNow(exportGr); //run the scheduled import once/now
}
} catch(ex) {
gs.error('Could not run script step: Run scheduled data import');
}
})(inputs, outputs);
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2024 03:38 AM - edited 01-18-2024 03:39 AM
Yes, you can run a scheduled import from a flow in ServiceNow. Here are the steps to achieve it:
1. Create a Data Source:
- Navigate to System Import Sets > Administration > Data Sources.
- Click New to create a new data source.
- Fill in the necessary details like Name, Type, Import set table name, etc.
- Save the record.
2. Create a Transform Map:
- Navigate to System Import Sets > Administration > Transform Maps.
- Click New to create a new transform map.
- Fill in the necessary details like Name, Source table, Target table, etc.
- Map the fields from the source table to the target table.
- Save the record.
3. Create a Scheduled Data Import:
- Navigate to System Import Sets > Load Data > Scheduled Data Imports.
- Click New to create a new scheduled data import.
- Fill in the necessary details like Name, Data source, Run, Transform Map, etc.
- Save the record.
4. Create a Flow:
- Navigate to Flow Designer.
- Click New to create a new flow.
- Add an action to the flow to run the scheduled data import.
- Save and Activate the flow.
5. Schedule the Flow:
- Navigate to Flow Designer > My Flows.
- Click on the flow you created.
- Click on the Schedule tab.
- Set the schedule for the flow to run.
- Save the record.
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - nowgpt.ai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 11:54 PM
Hi Sourav,
Step 4: Can you help me with what action is being used in this for flow designer?