Hi all. Make newbie here, so bare with me.
I am working with the Slack APIs, and i want to update a user group. Turns out the “usergroups.users.update” API call will update the user group, with whatever is in the request, therefore removing any previous users.
So what i’m doing is, running a request to get the list of current users, which comes out as in Array format. And i then just want to append/add to this array, and then use this in the request to update the user group.
I have a request, which dumps the current UserIDs (members) for the group, that gives me an output like below
The output data is:
[
{
“body”: {
“ok”: true,
“users”: [
“U04GZM4GA80”,
“U07AJ00BEQ5”,
“U07APN6P668”
]
},
“headers”: {
“date”: “Thu, 11 Jul 2024 08:54:54 GMT”…
Then i have another request, which gets the UserID of the new member i want to add, that gives me an output like below
The output data is:
[
{
“id”: “U04GZM4GA80”,
“team_id”: “T02G758BAH3”,
“name”: “john.smith”,
“deleted”: false,
“color”: “9f69e7”,
“real_name”: “John Smith”,…
I’ve tried using various itterators, parsers and array aggregators, but…no luck. And i think i’m missing something obvious.
Is there an easy way todo this, so i end up with the array with all the UserID’s i need to send off to the Slack API to “update” the members of the group.
Thanks