Display data on webhook/endpoint URL

Hello everyone :slight_smile:

I’m currently trying to send data from an HTTP request POST to an endpoint URL. The aim is to give a partner the ability to retrieve the data on this URL whenever he wants.

The webhook is receiving perfectly the data that I’m sending im my test, but when I want to reach the URL, the only data that I’m able to see is “Accepted”, while I would like to see the data I sent.

Does someone know a way to do that?

Thank you very much!!!

Hello @Alexis_Damaye,

They way you have your Scenario set up now (with a Webhook Response in it) is how you can modify the response to be something other than “Accepted”.
If the Webhook is active, but the Scenario is not, then you’ll get back that default Accepted message.
Please be sure your Scenario is either On, or you click Run Once so that the Scenario is active when you call the Webhook.

How is your Webhook Response module configured?

2 Likes

Hello @Donald_Mitchell!!

Thank you very much for you answer :smile:

Super, then I was in the good path with the “Webhook Response” module.

It looks like everything is activated?

You can find here how the Webhook Response is configured.

Tell me if you need more informations!

Many thanks!! :grinning:

@Alexis_Damaye Some extra questions :slight_smile:

  1. Did you save the scenario?
  2. Are you running the scenario manually when testing (with run once)?
  3. If possible, can you make a (loom) video of what you are doing when testing?
2 Likes

Hello @Bjorn.drivn!

  1. Yes, the scenario is saved.
  2. I tried both (manually with run once and automatically), I got the same result (no data displayed on the URL except of “Accepted”)
  3. Sure, here is the little loom

Many thanks :grinning:

@Alexis_Damaye Does it give you some data when you just add some text in the Webhook Response module? Just add “Hello world” and check if that works?

2 Likes

@Bjorn.drivn working indeed if I remove y variables from the webhook and just add text!

So, the issue is coming from the data I’m receiving? Do you have a clue on how to fix it? :grinning:

Many thanks!!

Could be that Make doesn’t haven’t a way to display arrays or collections as text.
That field generally expects either text or HTML to render in the browser.
You might need to break up the array into its individual text parts and use that text string as the response.

2 Likes

I did some tests and it turns out Webhook Response can respond with an array, it renders like this:
image

However, and maybe this is your case, if the Variable didn’t contain anything, then it would return an “Accepted” message instead of an empty text or nothing.

If the Webhook is active but the Scenario isn’t, you’ll just get an “Accepted” response message and the request will end up in the Webhook queue until it’s deleted or the Scenario is run or turned on (with the option to “Process Old Data”.)

If the Webhook is inactive then you’ll get a response of “Webhook is temporarily disabled.”

3 Likes

@Alexis_Damaye You can try the following things:

  1. In the webhook response, wrap your array within a JSON object like:
{ "data": <your variable> }

That would look something like this when the variable output is placed:

{
	"data": [{
		"id": "01-008 - Yves",
		"type": "roomshared"
	}]
}
  1. At the same time, add a “content-type” header with the value “application/json”. This would tell anything using the webhook that JSON will be returned.

Lets see if that works :wink:

3 Likes

Thank you very much for your help guys!!

I did the modifications on the webhook response:

I’m am now getting this answer on the URL: “{ “data”: }”, meaning my variable is empty.

Thing that I don’t understand because my array “properties” is not empty

Could you tell me your thoughts on this? :grinning:

Many thanks and good week-end!!

Hello everyone,

Just wanted to update you: I found a solution yesterday. Instead of using a webhook system to receive and display my data, I am now using a public URL coming from AWS S3.

We ran many tests with my CTO on the webhook and his conclusion was that the node is not made to be an endpoint.

Anyway, many thanks for your help!!

Have a great day :grinning:

3 Likes

Hey @Alexis_Damaye good you found a solution!
I think you would be able to set it up as an endpoint eventually, but it requires certain settings and configurations. However, AWS works fine as well :slight_smile:

If you need any help in the future let us know.

2 Likes