listWorkflows( )
Retrieves a list of the site's workflows info.
Description
The listWorkflows()
function returns a Promise that resolves to a list containing information about the site's workflows.
Use the options
parameter to specify which workflows to retrieve and in which order to retrieve them. Workflows can be sorted based on their "name"
.
If no limit
parameter is passed, the first 100 workflows are returned. Sort order defaults to by "name"
ascending.
This function is not a universal function and runs only on the backend.
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function listWorkflows(options: ListWorkflowsOptions): Promise<ListWorkflowsResponse>
listWorkflows Parameters
NAME
TYPE
DESCRIPTION
Options to use when retrieving a list of workflows.
Returns
Return Type:
NAME
TYPE
DESCRIPTION
Metadata for the page of results.
Retrieved list of workflows.
Was this helpful?
listWorkflows example
1import { workflows } from 'wix-workflows.v2';23 async function listWorkflows(options) {4 try {5 const result = await workflows.listWorkflows(options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13