Posts

Part 1-My First Successful API Callout

Image
I 'm learning about HTTP Callouts, and wanted to share what I've figured out so far.  My goal was to use API to update a contact record based on the contact's zip code.  This is a beta feature that's available in all sandboxes and orgs that have "rolled forward" to spring '23.   I started with an API called  Zippoptam.us .  Here's how the API works: if you write a zip code in the URL, it will send you information about that zip code.  For example:  http://api.zippopotam.us/us/20011  gives you this: My first step was to create a named credential.  One mistake I made in my first few tries was that I did not allow merge fields in my HTTP headers.  This is important because I want to pull the zip code from contact records and use them to change the values of the URL.     Once I've done that, I've made a new HTTP callout from actions in flow.  Notice that I use the named credential I just made: Next, I created an invocable ac...