Get the group id from the name

Hello,
I am using the function a! groupsByName ("nameGroup") to get the id from the name of a group but the result returns us
[Group: 123] and I have to do the treatment to get the 123.

toInteger(
substitute(
split(
"[Group: 123]",
":"
)[2],
"]",
""
)
)

Do you know if there is any more direct way to get it?

thank you

  Discussion posts and replies are publicly visible