Add Contact
Adds a new contact to the Telegram client's contact list.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client Id - The unique identifier of the Telegram client to use for this operation.
- Phone Number - The phone number of the contact to add.
- First Name - The first name of the contact to add.
- Last Name - The last name of the contact to add (optional).
How It Works
The Add Contact node adds a new contact to the Telegram client's contact list. When executed, the node:
- Validates the provided inputs (Client Id, Phone Number, and First Name)
- Creates an InputPhoneContact object with the provided details
- Uses the Telegram client to import the contact into the user's contact list
Requirements
- A valid Telegram client session with appropriate permissions
- Valid phone number, first name, and optionally last name of the contact to add
- Client Id must match an existing Telegram client session
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Client Id
- Empty or invalid Phone Number
- Empty or invalid First Name
Usage Notes
- The contact will be added to the Telegram client's contact list
- The phone number should be in international format
- First Name is required, but Last Name is optional
- The Client Id must correspond to an active Telegram client session