How do I use the group name in an automation WhatsApp Web message?
The Group name variable ({{groupName}}) writes the current name of the WhatsApp Web group that receives the send into the message. Use it, for example, in a welcome such as "Hi, welcome to {{groupName}}!".
Role: any member with edit access to the workspace.
Before you start: a WhatsApp Web step in the automation with a message set. See how to connect WhatsApp Web.
Insert the variable
- Open the automation and click the WhatsApp Web step.
- Open a variation of the message set.
- Click the insert variable button and pick Group name, in the Group section. You can also type
{{groupName}}straight into the text. - The preview shows a sample name in place of the variable. When sent, it becomes the real group name.
Where the name comes from
- Sending to a group (Trigger group, a group picked from the list or the lead's group in the launch): the variable uses the current name of the destination group. If the group is renamed, the next send already uses the new name.
- Sending to a contact: the variable uses the trigger's group, when the trigger comes from a group. With no group on the trigger, the name stays blank.
The name is the one Clickmax already stores for the group, so it is not fetched from WhatsApp on every send. A group whose name has not been synced yet also has no name.
Show a text when there is no name
Use {{groupName|our group}} to write "our group" when the variable comes out empty. Without a default value, the variable stays blank and the variation that uses it is left out of the draw for that contact. If every variation in the set uses {{groupName}}, the contact does not get the message. For sends to contacts, always set a default value.
Related
- Which number does the automation send WhatsApp from?
- How to send a broadcast: variations and variables in WhatsApp Web broadcasts.
If it did not work
- The contact did not get the message or the group name stayed blank: the send went to a contact with no group on the trigger, or the group name has not been synced yet. Add a default value, such as
{{groupName|our group}}. - The variable does not show up when inserting a variable: it only exists in the variations of the automation's WhatsApp Web step.