What are you trying to achieve?
I want to send an image containing text to a Telegram bot and have ChatGPT analyze it and return the extracted text as a plain text message.
Steps taken so far
I want to send an image containing text to a Telegram bot and have ChatGPT analyze it and return the extracted text as a plain text message.
When I provide the image as a URL in the ChatGPT - Analyze Images (Vision) module, ChatGPT processes it correctly and extracts the text. However, when I change the input method to downloading the image from the Telegram bot, I start facing issues.
ChatGPT either says it cannot process the request (which means it receives something but refuses to extract the text) or it outputs completely unrelated content, as if it is making up information instead of recognizing the actual text from the image.
I suspect that ChatGPT is receiving a lower-resolution version of the image, making the text unreadable, which causes it either to fail or to hallucinate a response (but this is just my guess—I don’t know how to verify it).
How can I solve this issue?
In the first two screenshots, I provided an example where I simply use the image URL in ChatGPT, and everything works correctly.
The other two screenshots show the case where I take the image from the Telegram bot (download it from there), and in this case, there is an issue with the output result.
Screenshots: scenario setup, module configuration, errors
3 Likes
I checked that when I send a photo to Telegram not as an image, but as a file (without compression), everything works correctly. However, when sending it as an image, there is a problem. How can I make sure that when sending a photo as an image, the highest quality (largest resolution) version is used, which I assume is the 4th version of the image?
1 Like
According to OpenAI’s page on Vision, it seems that setting high
in the detail
parameter is sufficient.
https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding
You didn’t understand—the problem is not with ChatGPT itself, it works fine. The issue is that the image being analyzed is a low-quality thumbnail, where nothing is visible.
When Telegram receives an image in the bot at the very beginning, it automatically creates 4 thumbnails:
- The 1st one is the smallest,
- The 4th one is the largest and best in quality.
The problem is that the automation is passing only the 1st (smallest) thumbnail down the workflow, which is unreadable due to its resolution. The 4th version would be ideal, but I don’t know how to specify that it should be used.
I don’t see separate variables for the 2nd, 3rd, and 4th thumbnails in the output data, so I can’t select and pass the largest and highest-quality version for processing.
1 Like
I don’t know which Telegram API Endpoint to use, or if there is an Endpoint that allows you to specify the quality of the image, but you can use any API by using the “Make an API Call” module of the Telegram bot, so you should be able to specify it. I guess you can specify the quality of the image.
If you don’t know what Telegram’s API Endpoint is, you should ask on Telegram’s forum.
If it’s relevant, it would be the following URL, but I’m having trouble understanding the Telegram API documentation.
The solution is this:
Use this formula in Telegram download module and u will get highest quality photos.
3 Likes
Thank you very much! Your advice solved my issue with image quality.
I have another problem: sometimes, when I send something in Telegram and something goes wrong, the scenario may, though rarely, throw an error and stop running. After that, new data is no longer processed. Even though I have set “Immediately as data arrives,” after an error, new data is not processed, meaning my scenario does not execute anymore.
How can I make sure that if something goes wrong, the scenario will attempt to restart when new data is sent to Telegram?
1 Like
If Make encounters an error, it might deactivate the scenario. It then won’t run again until you re-enable it.
Most web services will, on occasion, throw an error. This might be due to service interruptions at their end, or communication problems on the public internet.
You can make your scenarios more robust through the use of error-handling techniques.
Check out this section in the Help, and this module in the Make Academy.
Do I understand correctly that it is possible to automatically restart the scenario in Make if any error occurs in my workflow?
If you include appropriate error handling, then the scenario will not be stopped.
Is it possible to specify that the scenario should not be interrupted in case of any error? Or do I need to know the specific error that occurs and create a handler for each specific error?
Some types of error are handled automatically, but there are many that will be individual to your specific requirements.
I’d really recommend looking at the Academy course and the help doc to understand how it works.
1 Like