How to automatically create podcast artwork when hosting on Transistor using Placid and n8n

I have a confession to make. I don't like repetitive stuff. Creating individual artwork for each episode of my podcast digi-what is such a thing. Meanwhile, I can't stand when everything looks the same. I want every episode to have it's own artwork. Motivation enough to invest some time in automation.

In this article, I walk you through how I automated the creation of individual podcast artwork using Transistor (where i host my podcast), Placid and n8n. Just to make things straight from the beginning. It's definitely overengineered and is achievable with less effort. But I am a dev, I love my tools.

Note: I am using affiliate links for some tools mentioned.

Prerequisite

I know it's very specific. You could easily do this using Zapier or Integromat too. There are plenty of great examples to be found at the Placid blog. I was evaluating n8n to use it in our projects. Therefore, I chose the more complex path.

Things you should have in place

Setting up placid.app

placid template 1 Dynamic Text placid template id 1 Template ID placid api token 1 API Token

Doing some n8n magic (step-by-step)

We are going to add two webhook nodes, a function node and two http request nodes to the n8n workflow:

  1. Add a Webhook node and open the settings dialog
  2. Name it Transistor Webhook
  3. Set the HTTP Method to POST
  4. Copy the Production URL (we need this for the transistor  webhook later)
  5. Add another Webhook node and open the setting dialog
  6. Name it Placid Webhook
  7. Set the HTTP Method to POST
  8. Copy the Production URL (This will be the webhook placid will call when an image was created)
  9. Add a Function node and copy the following code into it
const episodes = items.map(item => ({json: {episode_id: item.json.body.data.id, title: item.json.body.data.attributes.title}}));
console.log(episodes);
return episodes;
  1. Add an HTTP Request node and open the settings dialog
http request node
  1. Under credentials, add a Header Auth entry for the Placid Token. Name it Authorization and set the value to Bearer <your placid token>.
  2. Set Authentication to Header Auth
  3. Set Request Method to POST
  4. Add https://api.placid.app/api/rest/<put your placid template id here> and replace the last part with your placid template id
  5. Activate JSON/RAW Parameters
  6. Set Body Content Type to json
  7. Add this expression to Body Parameters and add the placid webhooks production URL to webhook_success
{
	"layers": {
		"Description": {
			"text": "{{$json["title"]}}"
		}
		},
	"passthrough": {"episode_id": "{{$json["episode_id"]}}"},
	"webhook_success": "<insert the placid webhoook production URL here>"
}
  1. Add another HTTP Request node and open the settings dialog
  2. Under credentials, add a Header Auth entry for the Transistor API Key. Name it x-api-key 20. Set Authentication to Header Auth
  3. Set Request Method to PATCH
  4. Add this expression to URL:
https://api.transistor.fm/v1/episodes/{{$json["body"]["passthrough"]["episode_id"]}}
  1. Activate JSON/RAW Parameters
  2. Set Body Content Type to json
  3. Add this expression to Body Parameters
{
	"episode": { "image_URL": "{{$json["body"]["image_URL"]}}"}
}
  1. Connect the Transistor Webhook with the Function node and the Placid HTTP Request
  2. Connect the Placid Webhook with the Transistor HTTP Request
  3. Last but not least: Save and activate the workflow

Should look like this now:

n8n flow

Back to transistor for some final steps

We've almost made it. To finish everything up, we need to register the Transistor Webhook. As for now, transistor doesn't have a UI to add webhooks. So we'll have to do it manually.

cURL is required for that (or any other tool to make HTTP requests):

Before we are able to register a webhook we need to get the show id:

$ curl https://api.transistor.fm/v1/shows -G \
  -H "x-api-key: <insert your transistor api key here>" \
  -d "fields[show][]=title" \

Pick the show id from the response for the next request:

curl https://api.transistor.fm/v1/webhooks -X POST \
  -H "x-api-key: <insert your transistor api key here>" \
  -d "fields[event_name]=episode_created" \
  -d "fields[show_id]=<your show id>" \
  -d "fields[URL]=<insert transistor webhook production URL>"

Add your API key and the n8n transistor webhook production URL here.

For more details, have a look at the developer documentation which is really good.

Now, when creating a new episode at transistor, an episode artwork is added after saving. Have some patience, it could take up to a minute for all the calls to go through.

Final thoughts

We are in the midst of a No-Code/Low-Code boom right now. While we had such tools before, they are more powerful, easier to use and more approachable today.

Combined with good API Design, Webhooks and Event Streaming capabilities, most modern (SaaS) apps provide, compelling workflows are possible. Without a giant budget.

Said that, keep an eye open when getting some software custom-made for your business. Good integrations are the norm and should not cost a fortune.