I have a scheduled flow that calls an Apex Class. This class mainly identifies certain records and, if they are "pending" in an approval process, it recalls them and updates some fields.
The process works just fine, but as the setAction('Removed')
function only works when launched by an Admin, I need to know if scheduled flows run in admin context or not.
As it is an automated flow launched every night, I suppose it does, but I cannot find the answer in the flow docs.
Thanx a lot.
Best Answer
It apparently runs as the "Automated Process" user.
I see mention of it here https://jenwlee.com/2019/10/01/schedule-a-flow/
More importantly, I scheduled a quick flow to test this and I can see through debug logs that the scheduled flow was executed by the Automated Process User as opposed to the user who scheduled it.
Scheduled Jobs
Debug Logs