Telegram bot - OpenAi -

How can I integrate my Telegram bot with openAI API to create images using Make? Could you provide a step-by-step guide on how to accomplish this task?


image

Hi @Andyshelby ,

From the screenshots you shared it seems that you didn’t set the required parameters for file name and file data in your telegram module.

Glenn - Callinetic

1 Like

Hi Callinetic, could you guide me to set the required parameters for file name and file data in the telegram module?

@Andyshelby ,

It depends on the parameters you’ve set in the OpenAI module. I recommend to set the Response Format to “Base64-encoded PNG”.
In the Telegram module, specify a file name for the image that you want to send. For the file data, you’ll need to map to the outcome of the OpenAI module and apply the toBinary() function as mentioned in the help attribute of the OpenAI module. Here’s an example of how to do this: {{toBinary(3.data[].b64_json; "base64")}}. This will convert the base64-encoded image data to binary format, which is required by the Telegram API.

I hope this helps! Let me know if you have any further questions.

Glenn - Callinetic

1 Like

Hi @Callinetic, I already set the Response Format to “Base64-encoded PNG”.
But I don’t know how to set the file name and data. Could you advise me on what exactly I should fill?