Populate Umbraco content from an API using Umbraco.Automate
Another Umbraco.Automate post, I'm still finding new things worth sharing.
The scenario: you have content in Umbraco that you want automatically populated with data from an external API. Here I'm using a Pokémon blog as the example.
Niche, yes — but the PokéAPI is free, requires no API keys, and returns clean JSON. Low friction for experimenting.
The Umbraco Automate Flow
When a node is published, I retrieve its content key to establish context for the published item.
Using that context, I can access node properties — in this case, the node name. Since my node is named "Pikachu", I make an HTTP request to https://pokeapi.co/api/v2/pokemon/${steps.getContent.name}, where ${} is the binding syntax. This returns a JSON object from the PokéAPI.
I've added a log step for debugging, which lets me inspect the API response before acting on it.
Once I know the response shape, I add an "Update Content Property" step. This takes the content key from the trigger and targets a property alias of pokemonImage — a property on my Pokemon document type. I pass it the binding $steps.httpsRequest.responseBody.sprites.front_default, which navigates the response body and pulls the front sprite URL. That URL is then stored as a text string in the property.
I've created a quick video to demo this flow in action on my YouTube channel.