Slack.Web.Workflows.Triggers.Permissions (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Allows users to run a trigger that has its permission type set to named_entities

Returns the permission type of a trigger and if applicable, includes the entities that have been granted access

Revoke an entity's access to a trigger that has its permission type set to named_entities

Set the permission type for who can run a trigger

Functions

add(trigger_id, optional_params \\ %{})

Allows users to run a trigger that has its permission type set to named_entities

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • trigger_id - Encoded ID of the trigger ex: Ft0000000001

Optional Params

  • channel_ids - List of encoded channel IDs ex: C0000000001,C0000000002
  • org_ids - List of encoded organization IDs ex: E00000001,E00000002
  • team_ids - List of encoded workspace IDs ex: T0000000001,T0000000002
  • user_ids - List of encoded user IDs ex: U0000000001,U0000000002

Errors the API can return:

  • channel_not_found - One or more of the listed channels could not be found.
  • connected_org_denied - The workspace admin does not allow connected organizations to be named_entities.
  • connected_team_denied - The workspace admin does not allow connected teams to be named_entities.
  • connected_user_denied - The workspace admin does not allow connected users to be named_entities.
  • invalid_permission_type - This trigger requires permission_type to be set as named_entities before adding users.
  • no_valid_named_entities - None of the provided named entities were valid
  • org_not_connected - One of more of the listed organizations were not connected.
  • org_not_found - One or more of the listed organizations could not be found.
  • shared_channel_denied - The workspace admin does not allow shared channels to be named_entities.
  • team_not_connected - One of more of the listed teams were not connected by org.
  • team_not_found - One or more of the listed teams could not be found.
  • too_many_named_entities - Too many named entities passed into the trigger permissions setting.
  • trigger_not_found - This trigger does not exist.
  • unknown_method - This method does not exist.
  • user_not_found - One or more of the listed users could not be found.

See the Common Errors guide for errors returned by every Web API method.

list(trigger_id, optional_params \\ %{})

Returns the permission type of a trigger and if applicable, includes the entities that have been granted access

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • trigger_id - Encoded ID of the trigger ex: Ft0000000001

Errors the API can return:

  • trigger_not_found - This trigger does not exist.
  • unknown_method - This method does not exist.

See the Common Errors guide for errors returned by every Web API method.

remove(trigger_id, optional_params \\ %{})

Revoke an entity's access to a trigger that has its permission type set to named_entities

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • trigger_id - Encoded ID of the trigger ex: Ft0000000001

Optional Params

  • channel_ids - List of encoded channel IDs ex: C0000000001,C0000000002
  • org_ids - List of encoded organization IDs ex: E00000001,E00000002
  • team_ids - List of encoded workspace IDs ex: T0000000001,T0000000002
  • user_ids - List of encoded user IDs ex: U0000000001,U0000000002

Errors the API can return:

  • connected_org_denied - The workspace admin does not allow connected organizations to be named_entities.
  • connected_team_denied - The workspace admin does not allow connected teams to be named_entities.
  • connected_user_denied - The workspace admin does not allow connected users to be named_entities.
  • invalid_permission_type - This trigger requires permission_type to be set as named_entities before adding users.
  • named_entities_cannot_be_empty - There must be at least one valid named entity
  • org_not_connected - One of more of the listed organizations were not connected.
  • org_not_found - One or more of the listed organizations could not be found.
  • shared_channel_denied - The workspace admin does not allow shared channels to be named_entities.
  • too_many_named_entities - Too many named entities passed into the trigger permissions setting.
  • trigger_not_found - This trigger does not exist.
  • unknown_method - This method does not exist.

See the Common Errors guide for errors returned by every Web API method.

set(permission_type, trigger_id, optional_params \\ %{})

Set the permission type for who can run a trigger

API reference

Rate limit: Tier 3: 50+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • permission_type - The type of permission that defines who can run a trigger Acceptable values: everyone app_collaborators named_entities
  • trigger_id - Encoded ID of the trigger ex: Ft0000000001

Optional Params

  • channel_ids - List of encoded channel IDs ex: C0000000001,C0000000002
  • org_ids - List of encoded organization IDs ex: E00000001,E00000002
  • team_ids - List of encoded workspace IDs ex: T0000000001,T0000000002
  • user_ids - List of encoded user IDs ex: U0000000001,U0000000002

Errors the API can return:

  • channel_not_found - One or more of the listed channels could not be found.
  • connected_org_denied - The workspace admin does not allow connected organizations to be named_entities.
  • connected_team_denied - The workspace admin does not allow connected teams to be named_entities.
  • connected_user_denied - The workspace admin does not allow connected users to be named_entities.
  • external_workspace_denied - The channel selected is not on the workflow team.
  • invalid_permission_type - This function requires permission_type to be set as named_entities before adding users.
  • named_entities_cannot_be_empty - Must pass at least one valid named entity.
  • no_valid_named_entities - None of the provided named entities were valid
  • org_not_connected - One of more of the listed organizations were not connected.
  • org_not_found - One or more of the listed organizations could not be found.
  • shared_channel_denied - The workspace admin does not allow shared channels to be named_entities.
  • team_not_connected - One of more of the listed teams were not connected by org.
  • team_not_found - One or more of the listed teams could not be found.
  • too_many_named_entities - Too many named_entities passed into the trigger permissions setting.
  • trigger_not_found - This trigger does not exist.
  • unknown_method - This method does not exist.
  • user_not_found - One or more of the listed users could not be found.

See the Common Errors guide for errors returned by every Web API method.