How to RENAME FILE before creating media in Wordpress

That’s driving me crazy and wasting tokens testing. I just want to create media file in my wordpress with the file renamed. I can manage to upload the image file but I always get the same image because namefile is always the same like output.png and that’s causing the image to be uploaded the same as the previous and not what I am expecting.

This is my scenario

Download Image withh HTTP

Convert to JPG

Create Media

I get this error

I have it like this

And my options are these, none of them is working.

It’s freaking me out lol Please help. Thaaaaaaankkk!!!

All the other topics related has no solid fix.

1 Like

Hi Rod,

Are the values “Response Image Name” and “Response image Data” a result of clicking the “Data” value?

if so you need to add an “Iterator” module after your chatGPT module and map the “data” value in the input of this iterator. This will then seperate the values and then you should be able to map these into wordpress

As it stands I think wordpress can’t register the data due to it being an array

Hi Jamie, thanks for your help.
You mean like this?

It didn’t pass the iterator but also didn’t return any error. Still no luck. Here’s the setup

So, I was able to rename and upload the file but the file came out too big, around 2-3mb. I will have to maganage image optimization inside wordpress with a plugin that will convert images to webp.
At least, the file name is coming out as expected.

Here is the process

Thanks for the help!

1 Like