Skip to main content

Add Contact

AutomatR.WhatsApp.Activities.AddContact

The "Add Contact" activity in AutomatR is part of the WhatsApp activities package, facilitating the creation of a new WhatsApp contact for a given business WhatsApp account. This activity integrates seamlessly with other WhatsApp-related activities, providing a comprehensive solution for managing WhatsApp interactions in automation workflows.

Properties

NameDescription
Input
WhatsApp NumberSpecifies the WhatsApp number for which the contact needs to be added. It should include the country code. String variables containing the WhatsApp number. Example: 85264318721.
NameSpecifies the name for the user for whom the new WhatsApp number is being added. String variables containing the user's name.
ParametersAdds one or more objects that can be part of the body of the template message with their values. (Array of objects) (Required) Example: Name and Value Key Pair. Dictionary variables containing the parameters.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Add Contact" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultOutputs the response as Form Details, including information about the success or failure of the "Add Contact" operation. Variables of relevant types (e.g., ResultCreateContact) to store the operation result.

How to use:

  1. Drag and drop the "Add Contact" activity onto the workflow.
  2. Configure the properties by specifying the WhatsApp number, name, and any additional parameters for the new contact.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to add the specified contact to WhatsApp.

Example: Consider an example where the "Add Contact" activity is used to add a new contact with the WhatsApp number "85264318721" and the name "John Doe" to a business WhatsApp account:

Add Contact:
Display Name: "Add John Doe to WhatsApp"
WhatsApp Number: "85264318721"
Name: "John Doe"
Parameters: { "param1": "value1", "param2": "value2" }
Result: contactAddResult

In this example, the activity adds a new contact with the specified WhatsApp number and name, along with additional parameters, if provided. The result of the operation is stored in the variable "contactAddResult" for further handling in the workflow.