How to segment all WhatsApp groups in an instance.
Initial instance settings
It is essential that, in 'System Settings > Account Settings > Whatsapp Web', groups can be registered on the platform as leads and that their messages are not ignored. Note that the account connected to the platform must be a member of the group.
Instance Settings.
Creating the segment and adjusting the filter
After creating and naming the segment responsible for tagging the groups, in the 'Filters' tab, use the condition 'The lead field value...' to check whether the Whatsapp field meets the regular expression '(\D*\d){16,}'.
In short, this expression validates whether the lead's Whatsapp field contains 16 or more numeric characters. Since group IDs are longer than 16 characters, for example, '120363344586799553', those groups will be automatically included by the filter.