Working with employees

For notifying an employee

send_notification(text, users, priority) - sends a notification to the specified employees.

Parameters:

Parameters
Value

! text

required parameter; the notification text.

users

optional parameter; a list of employee emails in the project to whom the notification should be sent in a messenger. If not specified, the notification will be sent to all employees.

priority

optional parameter that specifies the notification priority. Possible values:

0 - neutral (default)

1 -success

2 - warning

3 - error

Example

In this example, the users parameter is passed as an array of project employees’ email addresses.

Then, the users parameter is passed to the function without quotes or brackets:

If you need to send an email to a specific employee, you can pass the users parameter as follows:

Notifications received from this method can be managed in the notification settings under the "Chat bot" section.

Code example for copying

users = ["[email protected]", "[email protected]"]

send_notification('Notification text', users, 1)

Last updated