function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MagulanDuraipandianMagulanDuraipandian 

Callout from Salesforce Flow

I have a flow which calls apex action to do a callout.
I am using Workbench to call this flow to test it.
I am getting the below error message:
Your query request was running for too long.
errorCode: QUERY_TIMEOUT

I don't have any SOQL inside my Flow. If I remove the callout code, the flow is working. But, if I do callout from the Apex inside @InvocableMethod method, it is failing.

Is there any limit to avoid callout from @InvocableMethod annotation?
VinayVinay (Salesforce Developers) 
Hi,

Try to check controller in which you are invoking @InvocableMethod method.

Review below link which gives you more information.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_VLSQ.htm

Also see if you can use process builder to invoke @InvocableMethod method.

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar