Skip to main content
All CollectionsAutomation
Webhooks. How does it work?
Webhooks. How does it work?

In this article, we will tell you how to create and confirm new webhooks so that they work correctly, according to their settings

Uspacy Support Team avatar
Written by Uspacy Support Team
Updated over a week ago

Webhook is a callback method in which one software system can instantly notify another of an event in real time.

Webhooks at Uspacy help to automate work in Space. Namely, to automatically "notify" third-party services about certain events that take place at Uspacy.

To work with webhooks, go to the Space page of the same name. Then, expand the Automation section.

🌟Please note that only the owner (super administrator) and administrator of the Space have access to this section.

⚙️ Since these actions require certain technical skills, we recommend the webhooks to be configured by specialist developers. Or you can always contact our partners for help.

How to create a new webhook?

To do this, click on the button of the same name.

A window will open where you need to fill out all the fields. Select exactly what will happen and with which object to send data outside Uspacy to third-party services based on these changes.

Event shows what exactly will happen. That is, the webhook will notify when the object has been created, changed, deleted, or the stage for it has been changed.

The event object is something the interaction takes place with. That is, the webhook will notify when an entity, namely a lead, deal, contact, company, activity, task, post, or comment, has been created, changed, deleted, or the stage has been changed for them.

❗️Please note that some entities are not compatible with some events. For example, you cannot create a webhook that will send stage change data for a contact, company, activity, etc. It is not possible because of the functionality of these entities.

Activity ensures the work of the webhook, after its confirmation.

Endpoint outside Uspacy - URL to send data to. The developer inserts a special code that will process incoming requests (messages).

💡This address must be valid and publicly accessible. You must enter it in the field starting with https://. That is, https://MN.XY, where https:// is the protocol and MN.XY is the domain name.

When all fields are filled out, click Create.

The webhook will be added to the general list at once. Initially, it will receive a status of Unconfirmed. Therefore, in order for the webhook to start working correctly, it needs to be confirmed. ⬇️

How to confirm a webhook?

After creating the webhook, Uspacy will send a POST request to your endpoint URL with a confirmation link.

Your server has to accept that request, extract that link, and follow it.

Done ✅

After that, the webhook will receive the status Confirmed and will work.

Useful links and tips

You can use ready-made Amazon SNS handlers for different languages and frameworks to confirm and process incoming messages.

An example of an event message

{

"topic": "Notifications",

"type": "comment",

"env": "prod",

"data": {

"entity": {

"author_id": 1,

"entity_type": "task",

"entity_id": 786,

"message": "<p class=\"PlaygroundEditorTheme__paragraph\" dir=\"ltr\"><span>test<\/span><\/p>",

"date": 1690963631,

"id": 9087,

"mentioned": {

"users": [],

"departments": [],

"groups": []

},

"notify": {

"users": [

1

],

"groups": [],

"departments": []

}

},

"user_id": 1,

"service": "comments",

"domain": "my.uspacy.ua",

"timestamp": "2023-08-02T08:07:11.256570Z",

"action": "create"

},

"metadata": []

}

If you have additional questions or you need to contact the support, send a request to this email [email protected]

Did this answer your question?