Skip to main content
Question

sending an email based on JSON data received from webhook

  • February 15, 2021
  • 2 replies
  • 522 views

I have json data something like this:

{

    "id": "saldfjsaf9s7dflksdf435345h",

    "description": "Hello World",

    "image": "<BYTE STREAM CONTAINING IMAGE>"

}

 

I send this data in the body of a post request to a webhook.

 

What I would like to do is:

  1. Send an email. I want to extract the values of “id” and “description” to be part of a message in the mail body
  2. Extract the content of the “image” value and save it to a file

My questions are:

  1. Should I use a “catch hook” or a “catch raw hook” webhook?
  2. How do I reference the individual sub elements in the JSON data object from the webhook in the email body?
  3. What action would you suggest to extract the content of the “image” sub element and save that to a file?

If someone could tell me if this is possible and guide me in the right direction, it will be highly appreciated, thanks ;-)

 

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30752 replies
  • February 16, 2021

Hi @Ole 

 

Should I use a “catch hook” or a “catch raw hook” webhook?

Use Webhook “Catch Hook”: https://zapier.com/apps/webhook/help

 

How do I reference the individual sub elements in the JSON data object from the webhook in the email body?

Check out this help article: https://zapier.com/help/create/basics/set-up-your-zap-action

 

What action would you suggest to extract the content of the “image” sub element and save that to a file?

Try the Formatter app: https://zapier.com/help/doc/how-use-formatter-functions#using-the-lookup-table


AndrewJDavison_Luhhu
Forum|alt.badge.img+10

@Ole 
Just checking in to see if you still need help with this?