Flow Run as a specific user

Karine_M
Tera Guru

Hi All,

 

I have the following use case:
A flow is launched from an alert management rule. This flow performs several actions, including adding additionals comments. We would like the comment to use the name of an existing user (instead of System).
Is it possible to define a "run as" for the flow from the alert management rule? (Unless I'm mistaken, this is possible when the flow is launched from a scheduled job.)
Do you see any other solutions that could meet our needs?

 

Regards,

 

Karine

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Karine_M 

if you give it Run as System User, it will always give System user

if you give Run as User who initiated the session, then it will pick that user which triggered the flow.

You can tweak to update the sys_updated_by while updating the record in your flow.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @Ankur Bawiskar 
Thank you for your reply, but it doesn't seem possible to update the creator of the worknote or the additional comment in the journal entry table. Even if you force the update, the comment is added as 'System'.

 

If we could trigger the alert management rule by a specific user like for schedules, that would solve our problem.

 

Regards

Karine

@Karine_M 

Got it, you can try to use event and script action, then in that script action script try to use impersonator code and then update

Impersonating users through script 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Chaitanya ILCR
Kilo Patron

Hi @Karine_M ,

If it's a scheduled flow you can set run as in the scheduled job but 

If it's record based trigger it's not possible at this point 

 

You choose to select system use or user who initiates session 

 

Regards 

Chaitanya