deno-slack-sdk icon indicating copy to clipboard operation
deno-slack-sdk copied to clipboard

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

Open baycak opened this issue 1 year ago • 9 comments

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!

baycak avatar Sep 17 '23 01:09 baycak

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 avatar Sep 21 '23 17:09 filmaj

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 avatar Sep 21 '23 17:09 filmaj

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!

filmaj avatar Sep 21 '23 17:09 filmaj

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!

baycak avatar Sep 22 '23 10:09 baycak

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.

filmaj avatar Oct 17 '23 19:10 filmaj

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.

mureyhans avatar May 15 '24 12:05 mureyhans

@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).

filmaj avatar May 15 '24 13:05 filmaj

+1

RuslanMelnychenko avatar Jul 01 '24 10:07 RuslanMelnychenko

+1

WilliamHuang1995 avatar Jul 10 '24 12:07 WilliamHuang1995

+1

FelipeNascimento avatar Sep 27 '24 15:09 FelipeNascimento