Shorten URLs Using the HTTP Callout POST Method

HTTP Callout in Spring 23 got many people excited. The blog post and the video by Josh Dayment and I drew quite some attention. We heard one criticism for this functionality: the solution was incomplete without the POST method.

With Summer 23, the Salesforce Flow Product Team not only moves the GET method to GA, but also gives us the POST method in Beta.

The use case we picked for this demo is based on a real-life client requirement. The client wants to shorten the long URL links before they send them to customers via email or text. Read on for a link to the three-part blog on this topic.

First, let’s dive into the background information: Until recently, API access was reserved for developers. Flow automation did not deal with APIs much. 👨 💻

But what does this functionality do? 🚨

This feature creates an invocable action powered by External Services to connect your flow to an HTTP-based API without using code.

What is an API? 🔁 

API (Application Programming Interface) is a program mediator that allows two applications to exchange data and complies with HTTP and REST standards. API refers to standards and documentation that describe how to create or use such a connection or interface.

What is the GET method? ⬅️

The GET request method is used to fetch data from the server. Example: Send Postal/ZIP-code to receive City in the response. Another example: Send phone number, receive the telecom carrier.

What is the POST method? ➡️

The HTTP POST request method sends data to the server. The HTTP POST method creates or updates a resource on the server. POST is one of the most widely used methods of the HTTP protocol. The HTTP POST method is used to submit web forms, upload files and images to the server.

Read the three-part blog on this topic here. Also, check out the GET blog post while you are on the site.

This post was originally made to LinkedIn on June 5th, 2023.

Read the previous post: What I Learned From The Jobs I Held Growing Up

Read the popular post: HTTP Callout in Salesforce Spring 23 – GET