Skip to main content
Best answer

How do I use OpenAI with Zapier to parse Gmail emails with image attachment (like a birthday invitation)?

  • 15 January 2024
  • 6 replies
  • 209 views

I would like to parse email event invitations (Gmail) that contain details within an image attachment (like a birthday invitation). Data will be extracted to go into specified fields and ultimately form a new calendar item. 

I’m already extracting data from text based emails successfully and converting these into new calendar events. It’s the imagery that’s tripping me up. 

I have seen a previous post about using DocParser to achieve this with PDFs, any suggestions for extracting data from a png or jpeg image? 

Thanks in advance

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +11

Welcome to the Community @Claelly! 🎉

There’s an Analyze Image Content With Vision action for the ChatGPT app that you could potentially use for this:
84f6bdab5eef32885b0a54d195d7687f.png
 

You can give it some instructions like “Extract the text from this image” in the Message field and select the image file you want it to look at, from the email trigger in the Zap and it should be able to pull out the text from the image.

Hope that helps to get you pointed in the right direction. If you run into any issues on that just let us know - happy to help further! 🙂

Userlevel 1

Thank you! I’ll give that a try.

Userlevel 1

Hey @SamB

The above works brilliantly so long as the email attachment is in png or jpeg format - most images come through as jpg format. Is there any way around this or to convert the image extension? The image attachment is pulled directly from the email, I’d rather not have to put the image on a drive if possible. 

Userlevel 7
Badge +6

Hi there @Claelly,

I’m jumping in to see if I can help!

You might need to use a file converter app like CloudConvert or any of our supported apps here: https://zapier.com/apps/categories/files

a7a6bfe38420a0d8ea12a78dd0aed127.png
(view larger)

Hopefully, this helps!

Userlevel 1

Thank you! Solved now.

Userlevel 7
Badge +6

That’s awesome @Claelly! We’re glad to hear that we were able to point you in the right direction!

Happy Zapping!⚡️