How do I save the images I generate in ChatGPT so that each one has a unique name?

Hello everyone, first I want to say that I’m a new and very happy user of Make. In a short time of study, I’ve already managed to create very interesting workflows and I’m grateful for that.

How do I save the images I generate in ChatGPT so that each one has a unique name?

Because all the images generated in my workflow have the same nam
DALLE_TO_WORDPRESS_v2.json (19.5 KB)
e “output1-1024x640.png”, this way when I try to publish these images on WordPress, the new images are replacing the old ones since they all have the same name.

PS: I have attached the scenario.

Thank you very much in advance, Bruno Cesar

Hello!

Welcome to the Make community!! Happy you enjoy using Make! :star_struck:

If you pick the filename from a variable you get in your scenario (from the webhook), or anywhere in the previous modules, you could add a timestamp for example.

Try this

copy and paste this in the Filename of the last module: {{first(split(3.resImgName; "."))}}{{timestamp}}.{{last(split(3.resImgName; "."))}}

It says: split the filename with a “.” as delimiter, pick the first item (the name of the file), then add a timestamp, then split the filename with a “.” as delimiter and pick the second item (the extension).

If filename = test.jpg, it becomes this

Benjamin

HI Benjamin, THANKI YOU so much, it worked in the first try. Simply amazing!
Do you have any sugestion on how or where I can lear more about Regular expressions to use in make.com scenarios?

Thanks :pray:
Bruno Cesar

Hey!!

I’m happy it was helpful for you!!
For regular expressions, Make is preparing a dedicated training, it will be released soon :blush:

Kind regards,

Benjamin

Hi, @brunoalec you can try this website RegexLearn to learn Regex fast and easily. I have just discovered few days ago and learning. I am already enjoying this.

Along with this I am also using Regex101 to exercise more at the real time. Hope it helps.

Regards
Kazi Goni

Hey Guys, just curious if the image generated in this module is through openAI’s API within make.com or within chatGPT ?

For eg: I have a custom GPt that helps me create images for social media.
Can I move the image from this custom GPt to a webhook within make.com?

This is the chatGPT interface.

and I get these in the webhook. But the image URl and the image data are random msgs chatGPT keeps sending.

and here’s the custom action schema within the customGPT

openapi: 3.1.0
info:
  title: Image Capture and Webhook API
  description: This API captures the URL and image of a generated image and sends it as JSON to a webhook on Make.com.
  version: 1.0.0
servers:
  - url: https://hook.eu2.make.com/0olrmy9d3bwefsmlpn1gwrqnycy1b155
    description: Make.com Webhook
paths:
  /:
    post:
      operationId: sendImageToWebhook
      summary: Sends the image URL and image data to the Make.com webhook.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - imageUrl
                - imageData
              properties:
                imageUrl:
                  type: string
                  format: uri
                  description: The URL of the generated image.
                imageData:
                  type: string
                  format: byte
                  description: The base64-encoded data of the generated image.
      responses:
        '200':
          description: Successful operation
        '400':
          description: Bad request. Invalid input data.
        '500':
          description: Internal server error.

I understand and have exectuted the flow through openAI’s generate an image step within make.com but I want to see if the image generated within chatGPT can be sent to make.com.

Hope this is clear.

Very interesting question. I have tried to achieve such a result without success yet, but this is an issue related to ChatGPT and prompt engineering rather than Make.com automation itself. If you are looking to achieve such thing we can keep conctact and share experiences, because I am working on that as well.

Yes, please let me know if you find a solution.
The issue is, chatGPT is not able to fetch the generated image’s URL.

Also for texts being sent from customGPT to make.com via custom action is fails when used through the mobile app (android). Are you facing this?

In my case, I can execute my custom actions normally using even the Android App. For example, I have created one really interesting CustomGPT that allows me to post directly and automatically to my WordPress from within CustomGPT (from my Android app) with zero API consumption, including AI images from Pollinations. The only thing I haven’t managed yet is to have CustomGPT also send DALL·E 3 images (binary data or URL). I think everything we’re talking about here boils down to Prompt Engineering, that is, merely using the right commands for the model, and that’s exactly what I’m working on because I believe it’s possible, and I think I’m on the right track.

Additionally, I visited your page and found it interesting. I’m also focused on creating solutions for using advanced AI with Make automations. If you’re interested, we can keep in touch and exchange experiences. My website: www.prompt-master.org

That’s good to hear Bruno.

Haven’t heard of Pollination let me check them out. I don’t see any API there though.

you dont need an API to create imagens using pollinations, just create a http request module with GET request, and send a request to the following url:

https://image.pollinations.ai/prompt/just_write_here_the_image_prompt_you_want

ONly that :wink:

Yeah, but what about the watermark? :slight_smile:

Pollinations also allow us to add parameters in the url to generate images without logo watermark + you also can define image dimensions, visit “https://image.pollinations.ai for details