Shared

Shared webhooks come to use when the service sends all the notifications for all the users to only one registered URL.

When the service sends all the notifications to only one webhook URL, but the webhook has to be registered under a user account, that's not a shared webhook.

In order to have the shared webhook listening to incoming traffic, you must publish your app. Before doing so, please, read this article.

Implementation of a shared webhook

In most cases, attach and detach directives don't have to be implemented.

If you still need to implement attach and detach directives, check Dedicated Webhooks.

Shared webhook should be registered by the developer of the app. All notifications from the service for all users will be sent to Make by calling this URL, which is generated when creating the shared webhook. On the Make's end, the corresponding user account will be matched.

You should always follow instructions in API docs of the web service which you are integrating.

Matching the user's account with an incoming event

Since the webhook is shared among multiple users, it is needed to match the incoming events with their owners and deliver them correctly. In order to do it, it is needed to work with uid parameter. Uid parameter can be obtained in connection.

uid specifies how to get the user ID from the request body. This value is then used to search for the recipient of the message in the database of connections. Don't forget to specify the uid parameter in the connection definition.

A connection should be attached to the webhook.

Example

{
    ...
    
    "info": {
        "url": "https://slack.com/api/auth.test",
        "headers": {
            "authorization": "Bearer {{connection.accessToken}}"
        },
        "response": {
            "uid": "{{body.user_id}}",
            "valid": "{{body.ok}}",
            "metadata": {
                "type": "text",
                "value": "{{body.user}}"
            }
        },
        "log": {
            "sanitize": [
                "request.headers.authorization"
            ]
        }
    }
    ...
    
}

Notice the uid parameter in the response object.

Last updated