# How to attach an .JPG to the OpenAI API Assistant?

**URL:** <https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636>\
**Category:** Beginner Questions\
**Tags:** open-ai, chatgpt\
**Created:** [July 24, 2024, 10:29am UTC](https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636 "2024-07-24T10:29:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpainIA](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/spainia/32/47033_2.png) [@SpainIA](https://community.make.com/u/SpainIA)\
**Post date:** [July 24, 2024, 10:29am UTC](https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636/1 "2024-07-24T10:29:50Z")

</div>

Hello everybody,

I´m new using Make…

I was trying to send an Image to the Assistant in order to get some text via OCR through ChatGPT 4o

This are the steps:  
-Trigger once new file is created in specific Drives folder  
-Download the new file from drive  
-Upload the file to Open AI  
-Send the file to the Assistant (Here i got the error)

Any advice of how to do it? I tried sending ID, Object… and it didn´t work.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/e/fe449f9183ae60a157c19bb847f411f0cda74627.png)

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![drnic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/drnic/32/43639_2.png) [@drnic](https://community.make.com/u/drnic)\
**Post date:** [July 29, 2024, 10:38am UTC](https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636/2 "2024-07-29T10:38:38Z")

</div>

If you don’t have a specific reason to try to use the Assistant API, perhaps use the OpenAI “Analyze Images (Vision)” module, with the “gpt-4o” multi-modal modal. I’ve attached some screenshots + a scenario blueprint. Hope it helps.

Dr Nic

 ![Screenshot 2024-07-29 at 8.33.43 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/6/66c7c079607de27567f0093b53af332ac76d0a28.jpeg)  
 ![Screenshot 2024-07-29 at 8.34.43 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/6/86d250c804a65717ad1e4a813a2e99fd05903ca8.jpeg)  
 ![Screenshot 2024-07-29 at 8.35.37 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/2/12daed1ee79d88caa6978bb5e0611a2c13405278.jpeg)  
[Make - JPG to OCR with OpenAI Vision.json](https://community.make.com/uploads/short-url/6LS6SIzS0j1fqTXo5V8Gme3kLbL.json) (17.9 KB)

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 29, 2024, 11:53am UTC](https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636/3 "2024-07-29T11:53:21Z")

</div>

@drnic good solution, but I think it may be possible to remove the Match Pattern module to save an operation. What do you think?

Don’t get me wrong, I LOVE using the Match Pattern module too!

Perhaps one of the string functions can help?

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![SpainIA](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/spainia/32/47033_2.png) [@SpainIA](https://community.make.com/u/SpainIA)\
**Post date:** [July 29, 2024, 1:44pm UTC](https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636/4 "2024-07-29T13:44:17Z")

</div>

Hello!

Finally, i did it in that way.

This is how my automation looks like now…

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/2/52a8c296d30d1a2f59c962ab8536bbce283d7431.png)

I asked the OpenAi vision module for an array, then i processed it by the JSON module and i was able to continue with the automation

Thank you all for your support 😉

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [August 13, 2024, 5:49am UTC](https://community.make.com/t/how-to-attach-an-jpg-to-the-openai-api-assistant/47636/5 "2024-08-13T05:49:15Z")

</div>


