admin.workflows.*: search workflows across the org, look up who may
run them, manage collaborators, and unpublish them. Scope:
admin.workflows:read / admin.workflows:write.
Example
::workflows ::slack::admin::workflows
orphaned ::workflows/search-all(::workflows/SearchRequest({no_collaborators: true}), 500)
::workflows/unpublish(::workflows/UnpublishRequest({workflow_ids: map(orphaned, (w) { w.id })}))
Functions
collaborators-add
fn (request: CollaboratorsAddRequest): Map
fn (request: CollaboratorsAddRequest, opts: Map): Map
admin.workflows.collaborators.add - Add collaborators (up to 50 users) to workflows.
Scope: admin.workflows:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).
collaborators-remove
fn (request: CollaboratorsRemoveRequest): Map
fn (request: CollaboratorsRemoveRequest, opts: Map): Map
admin.workflows.collaborators.remove - Remove collaborators from workflows.
Scope: admin.workflows:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).
permissions-lookup
fn (request: PermissionsLookupRequest): Map
fn (request: PermissionsLookupRequest, opts: Map): Map
admin.workflows.permissions.lookup - Who may run each workflow, by trigger.
Scope: admin.workflows:read. Returns Slack's response body; ok: false comes back as an Err(SlackError).
search
fn (): Map
fn (request: SearchRequest): Map
fn (request: SearchRequest, opts: Map): Map
admin.workflows.search - Search workflows (workflows, total_found). source: code or workflow_builder.
Scope: admin.workflows:read. Returns Slack's response body; ok: false comes back as an Err(SlackError).
Cursor-paginated: pass cursor from response_metadata.next_cursor, or use search-all.
search-all
fn (): Vec
fn (request: SearchRequest): Vec
fn (request: SearchRequest, max-items: Int): Vec
fn (request: SearchRequest, max-items: Int, opts: Map): Vec
Every workflows entry from admin.workflows.search, following next_cursor until the last page or max-items (default 1000). request sets the filters; its cursor is the starting point.
unpublish
fn (request: UnpublishRequest): Map
fn (request: UnpublishRequest, opts: Map): Map
admin.workflows.unpublish - Unpublish workflows.
Scope: admin.workflows:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).
Types
CollaboratorsAddRequest
CollaboratorsAddRequest type {
workflow_ids: Vec<Str>,
collaborator_ids: Vec<Str>
}
CollaboratorsRemoveRequest
CollaboratorsRemoveRequest type {
workflow_ids: Vec<Str>,
collaborator_ids: Vec<Str>
}
PermissionsLookupRequest
PermissionsLookupRequest type {
workflow_ids: Vec<Str>,
max_workflow_triggers: Int?
}
SearchRequest
SearchRequest type {
query: Str?,
app_id: Str?,
collaborator_ids: Vec<Str>?,
no_collaborators: Bool?,
num_trigger_ids: Int?,
source: Str?,
sort: Str?,
sort_dir: Str?,
cursor: Str?,
limit: Int?
}
UnpublishRequest
UnpublishRequest type {
workflow_ids: Vec<Str>
}