My post keeps the featured image from the previous post. How can I fix this?

Hey, everyone. I created an auto-post blog with ChatGPT, DALL·E, and WordPress, but something strange is happening. My post keeps the featured image from the previous post. How can I fix this?


This is all my sistem




Upload media Wp

My project file
blueprint (3).json (210.1 KB)

Hi @Matheus_Ferreira and welcome to the Make Community!

In your WordPress module to create the media, you use the name returned by the HTTP request. That name is always file.png. So the first time you upload it, it is given that name. When you upload a second one, it does not override the original.

Solutions:

  • Give a different name using something like

file-{{formatDate(now; “YYYY-MM-DD-mm-ss”)}}.png

  • Don’t run your scenario more than once a day! :stuck_out_tongue:

L

Hey, brother. @L_Duperval Thanks for your response. I couldn’t solve this problem. Could you give me more details?

Sure, here is a screenshot. The only thing that changed was the name of the uploaded file:

Any formula will work, in fact, as long as the name of the file as it is stored in WordPress is different.

The screenshot is for the “Create a media item” module for WordPress.

L

1 Like

Thanks, brother. This solved my problem.

1 Like

Don’t forget to mark it as a solution for others who might have the same problem. You’re not the first to have run into this problem.

L