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).
Example
::workflows ::slack::admin::workflows
::workflows/collaborators-add(::workflows/CollaboratorsAddRequest({workflow_ids: ["Wf0123ABCDEF"], collaborator_ids: ["U0123ABCDEF"]}))
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).
Example
::workflows ::slack::admin::workflows
::workflows/collaborators-remove(::workflows/CollaboratorsRemoveRequest({workflow_ids: ["Wf0123ABCDEF"], collaborator_ids: ["U0123ABCDEF"]}))
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).
Example
::workflows ::slack::admin::workflows
::workflows/permissions-lookup(::workflows/PermissionsLookupRequest({workflow_ids: ["Wf0123ABCDEF"]}))
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.
Example
::workflows ::slack::admin::workflows
page ::workflows/search(::workflows/SearchRequest({query: "onboarding", source: "workflow_builder", limit: 50}))
page.total_found
page.workflows
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.
Example
::workflows ::slack::admin::workflows
found ::workflows/search-all(::workflows/SearchRequest({app_id: "A0123ABCDEF"}), 500)
length(found)
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).
Example
::workflows ::slack::admin::workflows
::workflows/unpublish(::workflows/UnpublishRequest({workflow_ids: ["Wf0123ABCDEF"]}))
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>
}