Question

sending an email based on JSON data received from webhook

  • 15 February 2021
  • 2 replies
  • 494 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 ;-)

 


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

Userlevel 7
Badge +14

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

Userlevel 7
Badge +10

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