Apex

Invocable Apex for HTTP Callouts in Salesforce Flow

A generic, invocable Apex action that allows flows to make HTTP GET or POST callouts to external APIs without writing custom Apex for each integration.

Invocable Apex for HTTP Callouts in Salesforce Flow

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

  1. Deploy the Apex class.
  2. From a flow, add an "Action" element and search for "Generic HTTP Callout".
  3. Provide the necessary inputs for your API call.
  4. Map the output (response body, status code) to flow variables.

Related Solutions

Apex
advanced

Declarative Apex Roll-Up Summary Framework

A robust Apex framework that allows admins to create roll-up summaries in scenarios not supported by standard Salesforce functionality, such as lookups.

Declarative Apex Roll-Up Summary Framework
Integration
advanced

Google Drive Integration Snippet (Apex)

An Apex snippet demonstrating how to authenticate with the Google Drive API using OAuth 2.0 and upload a file from Salesforce.

Google Drive Integration Snippet (Apex)
Flow
intermediate

Auto Convert Qualified Leads

Automatically converts leads to contacts, accounts, and optionally opportunities once they meet qualification criteria.

Auto Convert Qualified Leads