Hey guys,
I’ve tried to create several workflows through automation platforms such as Make and n8n and I found a way to post blogs posts and then update the feature image for the post (I thought they would be baked into the post then).
But it seems they are just being held on a temporary URL and then gone after a few hours.
I use something a kin to this followed by a PUT request:
const currentPost = $node[‘Fetch Current Post’].json.posts[0];
const newImageUrl = $(‘HTTP Request3’).first().json.output[0];
const updateData = {
posts: [{
id: currentPost.id,
updated_at: currentPost.updated_at,
title: currentPost.title,
slug: currentPost.slug,
mobiledoc: currentPost.mobiledoc,
feature_image: newImageUrl,
featured: true,
status: currentPost.status,
locale: currentPost.locale,
visibility: currentPost.visibility
}]
};
console.log(‘Update data being sent:’, JSON.stringify(updateData, null, 2));
return {
json: updateData
};
How can I make it update the post and put the image into the featured image functionality and have it host the image. It would save me a lot of headache.
The only option if not, is to host the images somewhere else and the nput in that URL - but that seems silly considering you can actually host images through the feature image input?
Anyone know?