Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi User Picker! #38

Open
NPimenta86 opened this issue May 16, 2024 · 2 comments
Open

Multi User Picker! #38

NPimenta86 opened this issue May 16, 2024 · 2 comments
Labels
question Further information is requested

Comments

@NPimenta86
Copy link

Hey all, sorry, this is not really a issue...

I tweaked this code, and instead of a single-user picker I need to use a multi-user picker, but can't figure out how...

I've been able to kind of have the multi user picker in the form, with the Schema.types.array but then in the post message instead tagging the users it just show @["U03J5Q2Q1QS","U05767DQVSR","U0310QRTYHK"]

any tip please? it would be appreciated

@zimeg zimeg added the question Further information is requested label May 16, 2024
@zimeg
Copy link
Member

zimeg commented May 16, 2024

Hey @NPimenta86 👋 This is an interesting question! Glad to know you're collecting an array of user IDs already, but formatting this for a message will require a bit of custom logic.

Mapping these user IDs within the workflow won't work since a workflow is a static set of steps with inputs mapped between steps using templates. Meaning logic can't exist here...

        {
          "id": "2",
          "function_id": "slack#/functions/send_message",
          "inputs": {
            "channel_id": "{{steps.0.fields.kudo_channel}}",
            "message": "*Hey \u003c@{{steps.0.fields.doer_of_good_deeds}}\u003e!* Someone wanted to share some kind words with you :otter:\n\u003e {{steps.0.fields.kudo_message}}\n\u003c{{steps.1.URL}}\u003e"
          }
        }

Instead, I'd approach this by formatting either a list of users or the entire message from a custom function - perhaps the FindGIFFunction handler.

This output formatted string could then be used as input to the following SendMessage step and should all work!

@NPimenta86
Copy link
Author

Thanks for the Reply @zimeg

Oh, i see...
it looks like its far away of my expertise in this matter then.

Appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants