function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce P1Salesforce P1 

Error Occurred: An Apex error occurred: ConnectApi.ConnectApiException: You can only mention up to 25 people or groups at a time.

Came accross this limitation while trying to post a update on the chatter for a team of >25 members. Any workaround is highly helpful.
SwethaSwetha (Salesforce Developers) 
HI 

How are you trying to update? The idea is to divide the mentions into batches of 25 or less. You can use any looping or batching mechanism available in your code to achieve this. Process each batch separately, making sure to mention a maximum of 25 people or groups in each operation.

Thank you
SwethaSwetha (Salesforce Developers) 
Related: https://issues.salesforce.com/issue/a028c00000qQ26HAAS/process-error-you-can-only-mention-up-to-25-people-or-groups-at-a-time

https://help.salesforce.com/s/articleView?id=sf.collab_add_mentioning_people.htm&type=5#:~:text=You%20can%20add%20up%20to%2025%20mentions%20to%20a%20single%20post%20or%20comment.