0

I created the following schedule-triggered flow:

enter image description here

It is well creating records without giving any error in debug mode. But live execution fails with the following error and no records are then created:

An Error Occurred with Your "Get Jira Issues List" Flow

You’ve received this email because an error occurred while your "Get Jira Issues List" flow was >running. Error element Get_Instru_Requests (FlowActionCall). Callout failed for invocable action GetJiraInstruList.Get Jira Issues List for Instru. Can't perform callout when resuming a flow or inside an Apex Queueable. Place the callout to external service invocable actions before pausing a flow or scheduling an Apex queueable. For more information, contact your Salesforce administrator.

It's not clear to me what's causing the problem and not clear how to solve it. I thought it could be a permission issue, but I checked again and I actually assigned the required permission set for call out named credentials, etc. (same as for my user) to the Admin user, so...

"Place the callout to external service invocable actions before pausing a flow or scheduling an Apex queueable." seems to be the way to go, but could someone explain what it means and how to achieve this?

Thank you

4
  • Dupe of salesforce.stackexchange.com/questions/411150/…
    – identigral
    Commented Apr 15 at 15:52
  • This solution to other similar issue mentions usage of the @future Apex method. Can we manage to do this using flow builder? How? Or does it mean I have to recreate everything in Apex?
    – iggy1977
    Commented Apr 23 at 8:15
  • Btw, my http callout action is BEFORE my DML action (this one is actually using results from the http callout action). So would it really help?
    – iggy1977
    Commented Apr 23 at 12:40
  • Compare and contrast with the other Q&A: Place the callout to external service invocable actions before pausing a flow or scheduling an Apex queueable
    – identigral
    Commented Apr 23 at 15:12

1 Answer 1

1

I faced the same problem with external services and I found the solution in the SF documentation ( https://help.salesforce.com/s/articleView?id=sf.flow_considerations_trigger_schedule.htm&type=5 ).

Here it is stated, that "a schedule-triggered flow can make callouts only after executing a Wait element". So I added a wait element as suggested and now it works. The only downside is that the wait element itself sometimes has an error due to too much saved information in the flow. Therefore, I recommend doing the external action in the beginning of the flow.

Example for a wait element in a flow with external service.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .