Skip to main content

Get Contacts List

AutomatR.WhatsApp.Activities.GetContactsList

The "Get Contacts List" activity in AutomatR is part of the WhatsApp activities package, providing the ability to retrieve a list of contacts from a specified WhatsApp number. This activity is designed to facilitate the extraction of contact information, enabling comprehensive automation of WhatsApp-related workflows.

Properties

NameDescription
Input
AttributesAttribute parameters format: [{name: "name", operator: "contain", value: "test"}] (String). Allows filtering contacts based on specified attributes.
Created DateDate of creation of a contact. Created Date format: YYYY-MM-DD or MM-DD-YYYY (String).
NameSpecifies the contact name to be filtered out (String).
Page NumberEnter the page number for the contacts to be retrieved (Int32).
Page SizeEnter the page size for the contacts to be retrieved (Int32).
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get Contacts List" 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
ResponseOutputs the response as a JSON object containing information about the success or failure of the "Get Contacts List" operation. Variables of relevant types (e.g., ResultGetContactsList) to store the operation result.

How to use:

  1. Drag and drop the "Get Contacts List" activity onto the workflow.
  2. Configure the properties by specifying the contact name, created date, attributes, page size, page number, and any optional delay.
  3. Execute the workflow to retrieve the list of contacts based on the specified criteria.

Example: Consider an example where the "Get Contacts List" activity is used to retrieve a list of contacts with the name containing "test," created on a specific date, and displaying 10 contacts per page:

Get Contacts List:
Display Name: "Retrieve Test Contacts"
Name: "test"
Created Date: "2023-01-01"
Attributes: "[{name: "category", operator: "equal", value: "A"}]"
Page Size: 10
Page Number: 1
Response: contactsList

In this example, the activity retrieves a list of contacts with the name containing "test," created on January 1, 2023, and belonging to category "A." The result of the operation is stored in the variable "contactsList" for further handling in the workflow.