make.comintegromat-apps

First request to a webhook


To create a webhook, it has to pass the following validation:

  1. Receive a GET request onto the webhook URL and read a specific "challenge" field from the query.
  2. Send this field back to where the request comes.

Can this be implemented in an Integromat app?


Solution

  • Yes, you can use the verification directive for this purpose.

    The code would look something like this:

    {
        "verification": {
            "condition": "{{if(query.challenge, true, false)}}",
            "respond": {
                "status": 200,
                "type": "json",
                "body": {
                    "challenge": "{{query.challenge}}"
                }
            }
        },
        "response": {
            "output": "{{body}}"
        }
    }
    

    It's up to you to specify the verification condition so that the platform will be able to tell if the incoming message is a verification request or a regular webhook payload.