Skip to main content

I want to create a zap to read .json files sent via email and create a summary of them using ChatGPT. Ideally my flow will look like this:

  1. Gmail email received with label “Bug Report”
  2. ChatGPT parses unstructured data from the email (username, summary, etc)
  3. ChatGPT reads contents of stacktrace.json attachment and gathers the “root cause message”
  4. All data sent to a Google Sheet

Steps 1, 2 and 4 are pretty simple, but I can’t figure out the best way to get the email attachment into ChatGPT. Any ideas for how to approach this one?

Hi @particlepat 

Good question.

Try these Zap steps...

  1. Trigger: Gmail - New Attachment
  2. Action: Webhook - GET
    1. Map configure the URL as shown below
    2. Leave everything else as is
    3. This will return the JSON contents already parsed

 

EXAMPLE OUTPUT

 


Thanks Troy this worked great for me. Quick follow up if you have time, what if you have up to two attachments. Sometimes the json is attachment 1 and other times it’s attachment 2. I can create a path to look for when json exists in either attachment, but then I basically have duplicate zaps for each path. Curious if there’s a better way to handle that.


@particlepat

I meant to say use this Zap trigger: Gmail - New Attachment

 

You can add a Filter after step 1 to only process files with the desired conditions.


Oops I missed that step one. This all worked perfect fro me! Thank you.