I have a flow that calls an invocable action from apex class. It accepts a list of required parameters and the flow has been working for the last 2 years. And then something happened and the flow started giving a permission error (see below). Though the flow wasn't changed since then and permissions for the profiles weren't changed as well. All profiles have access to the apex class and Manage Flow AND View All Data permissions. A couple of days ago we deployed critical updates in our org but don't think anything would result in this behavior.

enter image description here

And here's an invocable class that gives a permission error. Tried to use without sharing and global attributes and didn't work any.

public without sharing class  AddTaskAsEmailActivity {
    public class InvocableVariables {
        public String emailTemplateDeveloperName;

        public Id caseId;

        public String toAddress;

        public String fromAddress;

    @InvocableMethod(Label='Create Email Message Activity' Description='Creates email message as activity and attaches to case')
    public static void init(InvocableVariables[] variables) {
        for (InvocableVariables params : variables) {

    public static void createTaskAsActivity(InvocableVariables params) {....}

Does anyone have any ideas what could be the problem?

  • 1
    It is likely the critical update. Please check that the profile in question has access to flow and the classes that is being called from the flow.
    – manjit5190
    Jul 30, 2020 at 14:20
  • @NGix were you ever able to figure this out?
    – jonnybro
    Dec 10, 2020 at 15:58

1 Answer 1


Open profile setup then 'Apex Class Access' and make sure 'AddTaskAsEmailActivity' class is in the allowed list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.