How to execute scheduled import in flow designer??

martin63
Tera Contributor

Hello all,

I want to execute the scheduled import 3 times in the flow. And if it has given error then incident will be created. I have tried this below is screen shots and script using custom action.

 

But by doing it. It is creating execution records multiply one by one any assistance on this... 

@Ankur Bawiskar 

11.png

 

Input is rec ref - scheduled import record

(function execute(inputs, outputs) {
var rec = new GlideRecord('scheduled_import_set');
rec.addQuery('name','Example LDAP User Import');
rec.query();
if(rec.next()){
count++;
SncTriggerSynchronizer.executeNow(rec);
}
})(inputs, outputs);

6 REPLIES 6

Community Alums
Not applicable

@martin63 what is your code for the scheduled import?

 

Hi @Community Alums ,

 

Please check the below video:

https://www.servicenow.com/community/developer-articles/how-to-run-a-scheduled-job-from-flow-designer/ta-p/2696220

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda