Problem
Flows can make HTTP callouts, but setting them up can be cumbersome. For more complex authentication or request body construction, Apex is still required, creating a barrier for admins.
Solution Overview
This solution provides a single Apex class with an @InvocableMethod
. The method accepts parameters like URL, Method (GET/POST), Headers, and Request Body. It can be called from any flow, allowing admins to configure callouts declaratively.
How to Deploy
- Deploy the Apex class.
- From a flow, add an "Action" element and search for "Generic HTTP Callout".
- Provide the necessary inputs for your API call.
- Map the output (response body, status code) to flow variables.