slack block users-select dropdown limited options by group users or static id's

972 views Asked by At

I'm using slack users-select in the block-kit and would like to restrict my users-list in the dropdown options (currently shows all users in workspace) with given id's OR to specific users in current-group:

"restricted_users": ["Id1", "Id2"..."IdN]

OR

"restricted_users_in_group": true

(restrict to only users in existing group)

then show the selected-menu only with those users, currently my code looks like this:

{
        "type": "section",
        "text": {
            "type": "mrkdwn",
            "text": "Test block with users select"
        },
        "accessory": {
            "type": "users_select",
            "placeholder": {
                "type": "plain_text",
                "text": "Select a user",
                "emoji": true
            },
            "action_id": "users_select-action"
        }
    }

I can use static-user-select and add names myself, but this won't let me have "user-status" ("online"/"offline") and sometimes users might increase/decrease dynamically, couldn't find any k/v or more info on doc's, what should be my approach here? thanks!

0

There are 0 answers