slackapi / deno-slack-sdk

SDK for building Run on Slack apps using Deno
https://api.slack.com/automation
MIT License
158 stars 27 forks source link

Add usergroup as a field type to OpenForm built-in function #218

Open baycak opened 12 months ago

baycak commented 12 months ago

Hi, I would like to ask about, is it possible to add selected field user group in workflow interactive modal form? Since I haven't found it in documentation

For the context, I want to show selected field for list of user groups in Interactive Modal Form which currently only available for type User and Channel

Thank you!

filmaj commented 11 months ago

Hi @baycak thanks for posting! Just to clarify, you'd like for the OpenForm built-in function to support a user groups select menu field? I think we support this.. let me see.

OK, I think so! Try using the Schema.slack.types.usergroup_id field type (see SDK code here). I think that should work. I just realized our docs on the topic don't list this, so I will make sure that is updated.

filmaj commented 11 months ago

Hmm I just tried using it, and I get a parameter validation failed. Let me follow up on the backend to see if this is by design.

    parameter_validation_failed - Validation for parameter `fields` failed: elements_param_validation_failed - form_input_value_against_schema_validate_fail
filmaj commented 11 months ago

OK, confirmed this is a limitation on the backend for a variety of reasons. If/when this changes I will certainly post an update here. If others are interested in this, please comment so we can raise this to the people in charge and get it on the roadmap!

baycak commented 11 months ago

Hi @filmaj, yes you right, it will return error parameter_validation_failed when using the usergroup_id type.

Since User Groups is also important in some cases, I think it will be nice feature addition in Slack API ecosystem, than later on can be added in Slack Workflow Builder also.

Anyway, thank you for your help, will waiting for the updates!

filmaj commented 11 months ago

Quick update here: the underlying issue preventing us from tackling this is that we have no Block Kit select menu for usergroups! If/when we roll this out, we can easily add this to the OpenForm step.

mureyhans commented 4 months ago

Hi I would like to ask if it's also the case for file field type, because I stumbled upon the same error form_input_value_against_schema_validate_fail when I tried to add an element with type Schema.slack.types.file_id in the OpenForm function.

filmaj commented 4 months ago

@mureyhans please file a new issue for that, and provide reproduction steps / code to show your error. I'd like to keep this issue thread just for the original question / issue posed (usergroup filed types).

RuslanMelnychenko commented 2 months ago

+1

WilliamHuang1995 commented 2 months ago

+1