Webhook response result

Hello,

I am using a webhook in my logicblock. Is there a way to display the result/response from a webhook request?

I tested the webhook by myself and it works in a browser. But within the logicblock it doesn’t work somehow.
Now I want to see the result from this call to see on which site the error occurs.

Maybe you can tell me or better make a logging option for webhooks to see the result of such requests.

Thank you for help

2 Likes

Hi @theelonline!

You can check the responses in your logs in the dashboard. Can you let us know if you can see the info you need in the logs? Thanks! :slight_smile:

1 Like

Hi Anna, I don’t see responses either. I see something like this:

Httpaction,Description,Sent,Apilio,true,2021-04-19 08:55:10 UTC

There is no info about the response from the web server to that HTTP action.

Here’s an example of what you see in the event log if a call fails:

  1. Logicblock is evaluated
  2. HTTP request failed (because of deliberately wrong URL for demonstration). If there is a HTTP code, that would also be reported here.

And here’s an example of a successful request:

  1. Logicblock is evaluated
  2. HTTP request was sent successfully (to be precise: The other server answered with HTTP code 200)
  3. The incoming request is logged and shows that the variable has been updated.

What you don’t see in the log though is what the response body was.

I hope this clarifies what the log shows. Is this helping in your case?

2 Likes

Hello,

yes I dont see the body of this response. This is what I want to see because this request delivers a response.
And maybe I can see what I am doing wrong here…

1 Like

Can you post a screenshot of your event log (check the one on the dashboard, not on the Logicblock detail view, as it will not show the actions and incoming events!)

1 Like

As far as I can see, there is no http request made… ok that might be the problem.
I can see ifttt actions but not the http webhook action. So I think I do not need a screenshot because we can not see it :slight_smile:

I tried to remove, save and added it again. no success. I will try without any other actions in the logicblock and reply if I find something

1 Like

Here you can see my last set up. After testing it, no request will be send out. It seems that the webhook request is stuck (maybe until a timeout comes).

Just a question about webhooks: With webhooks I can request whatever URL I want, correct? In your example you showed us a request to the apilio-api webhook… but I just want to reach an external URL per HTTPS / GET request.

Yes, of course you can use any valid URL.
When you run a test evaluation of your Logicblock, does it report the expected result and number of queued actions?

I think I have found the issue - there are failed requests caused by a failing SSL certificate validation and that feedback is probably missing in the event log.
That might be the case with your URL

Oh ok… can I turn of the ssl validation in the header? :slight_smile:
Or any other tips? In browser it says the ssl is valid. it is not self signed.

We have to analyse why the certificate cannot be validated. Probably it is caused by our hosting service not trusting the root CA of your certificate.

1 Like

Maybe just make verify-peer to false and allow-self-signed to true :wink:

2 Likes

This is quite a tricky problem.
At the root, the problem is that the OpenSSL client on our hosting partner seems not to like the root certificate (DST Root CA X3) of your target domain. Even though the public certificate is actually stored in the correct directory.
It might have to do with the root certificate of your domain being quite old an will expire in September this year: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

So the steps to mitigate this issue in my opinion are:

  • Try to get a new certificate (since the current one will be invalid soon anyway)
  • If that fails, we continue to try to teach our ssl client to accept the certificate
  • If that fails the only option would be to allow communication with certificates that fail validation
1 Like

This certificate is created via my Synology NAS. So there is a function to renew the certificate and this creates a certificate which will be +1 month in future until it expires. Then I can maybe create a new one which will be +1 year. But I can not influence this process…

I think you should go over to the 3rd solution :slight_smile:

1 Like

Did you try to send the request via IFTTT (Apilio -> IFTTT Applet with outgoing webhook action)? Would be interesting to see if that works or not.

1 Like

Yep. This works.
I will let this workaround as it is.
But this produces more IFTTT actions :slight_smile: But its ok for me. I pay for both services… :crazy_face:

2 Likes

Great to hear you found a workaround!
I investigated this a bit more and found some evidence that the certificate is not properly setup - I will forward some more details in a private message. But you probably won’t be able to correct it yourself, so you cannot do a lot about it :frowning:
I’m going to add it to our list for future improvements and prioritise high if we see this issue frequently.