Posts

Showing posts from September, 2023

HTTP Callout from Flow - No Code Solution

Image
Today, we will take a look at one of the most common use cases, i.e., making an HTTP callout from the screen flow. In the traditional approach, we need to create an Apex controller that will have an invocable method. This invocable method needs to be called from the flow using the Apex action element. The Apex controller will handle the callout and return the response to the screen flow. In the Spring '23 release, Salesforce introduced a capability that allows us to make HTTP callouts directly from the flow without writing a single line of code. In this post, we will explore how to make a GET API call from the flow. Step 1 - Create a Named Credential: The first step is to create a named credential. Since the Cat Fact API does not require any authentication, creating the named credential is very simple. Navigate to Setup > Named Credentials. Under the Named Credentials tab, click on the arrow next to the New button, and select 'New Legacy'. Populate the values as shown in