Unknown Webhook's Data Structure

Hi,
I’m setting up a notification by webhook on Resend (for when errors happen).
My issue is that there is no error happening, so I cannot trigger the webhook to then map the data in the next steps.
At first, I simply have place a notification to myself to come back to set it up when it gets triggered. It did, but I still cannot use those logs to set the data structure!

Am I missing a tool or a function somewhere that would make all of this much easier !?

Welcome to the Make community!

Simply click “Run Once” and then immediately trigger an error to your scenario’s webhook. This will allow you to map the request variables.

Alternatively, you can set up a Data Structure in the Webhook so later modules know what fields may be received.

For more information, see https://academy.make.com/courses/IntermediateC04 and Advanced Webhooks | Make Academy

Hope this helps! Let me know if there are any further questions or issues.

@samliew

@samliew
Thanks again for replying,
only issue, is that I cannot trigger the error manually. so the run once will run for a very long time (weeks).

If I know what will be the name of the items received by the webhook, is there a way to pre-write them in the next steps, even if they cannot be “clicked”.
For example :
! Let’s presume the “1. RecordID” is not yet known, since I couldn’t trigger the webhook manually !

How could I write in there “1. RecordID” ? I mean, something saying "it will come from step 1, and will be the variable to the key “RecordID” ? Is it possible ?

Yes. To figure out what the name of the variable actually is, you need to understand what the payload of the incoming request will look like. To do this, you will need to refer to the official API documentation of the external service.

If you can provide a link to it, I can assist further.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

@samliew ,
You are wonderful !

here is an example of payload of an error of email bounce, according to the Resend documentation available here : Event Types - Resend

Example:

{
  "type": "email.bounced",
  "created_at": "2024-11-22T23:41:12.126Z",
  "data": {
    "created_at": "2024-11-22T23:41:11.894719+00:00",
    "email_id": "56761188-7520-42d8-8898-ff6fc54ce618",
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Sending this example"
    "bounce": {
      "message": "The recipient's email address is on the suppression list because it has a recent history of producing hard bounces.",
      "subType": "Suppressed",
      "type": "Permanent",
    }
  }
}

I don’t see any record_id in the above, so I assume you want email_id?

Type

{{ 1.data.email_id }}

(paste this into the field or type it exactly like this)

or if you want message, then

{{ 1.data.bounce.message }}

(paste this into the field or type it exactly like this)

Hope this helps! Let me know if there are any further questions or issues.

@samliew