Webhook not triggering

EDIT: The unauthorized webhook works. Probably got something to do with the input secret? I was just doing SHA1 checksum of Input secret, did that change to take the body into account as well so I need to calculate the checksum every time?

Hi there, after upgrading my developer edition from 2.7 to 2.8 and then 3.0, my table changes seem to not trigger my webhook properly anymore. I’ve added another fresh webhook to the base without any authentication, but that also doesn’t seem to work. What else could I check or try to see where the issue is? In sysadmin mode I couldn’t find a statistic for webhooks…

Ideally I would be able to just check against the input secret as working before. My tool for receiving the webhook doesn’t seem to get it right now and not sure if I can set it up so that it can generate the hash for input secret and request.body before deciding to validate the webhook call or not.

The way of passing the secret has been changed for security reason.

You should now check the signature as following in your webhook receiver:

Yes I have read that, I’m just not sure how I combine the secret key and request.body to be honest. Do I encrypt both?

The following Python code is an example:

import hmac

from flask import Flask, request

app = Flask(__name__)

@app.route('/receive-seatable-webhook', methods=['POST'])

def receive_seatable_webhook():
    secret = 'your-own-secret-string'
    seatable_signature = request.headers.get('X-Seatable-Signature', '').replace('sha256=', '')

    signature = hmac.new(secret.encode('utf-8'), request.data, digestmod='sha256').hexdigest()
    signature_compare = hmac.compare_digest(signature, seatable_signature)

    if signature_compare:
        # do something
        pass

    return {'success': signature_compare}

You can calculate signature with:

signature = hmac.new(secret.encode('utf-8'), request.data, digestmod='sha256').hexdigest()

And compare the signature with the received signature in POST request.

1 Like

Ok @daniel.pan thank you! I’m using the Webhook node in n8n, so will have to see if or how I can do this there… But this helps a bit already!

Hey Markus,
did you read this manual post? This might help also to understand how webhooks work.

Best regards
Christoph

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.