Combining Scheduled Flows with Flow Actions
A user trying to use a custom invocable action in a scheduled flow reported: I have installed version 1.28 but in my Scheduled flow I get an error that says “Profile does not have access to: copycollection”. I am system admin and have checked; my profile does have access to the copycollection apex. When I try the same thing in a Screen Flow it works.
The problem is that currently, Scheduled Flows do not run in the admin personal user context, but instead use a special account called the Autoproc User. It is currently possible, but difficult to give the Autoproc User account the ability to execute invocable actions. You have to use Developer Console to assign a permission set to the User that has an alias of ‘autoproc’:
insert new PermissionSetAssignment( AssigneeId = [SELECT Id FROM User WHERE alias = ‘autoproc’].Id, PermissionSetId = ‘<your Permission Set Id here>’ );
Kudos to Roy Lloyd and Dan Moore for figuring this out!
In Winter ’22, coming this October, new flows and existing flows that are resaved with version 53 or higher will run not as the Autoproc user but as the Default Workflow User, which is a recently added setting in Process Automation Settings in Setup:
