> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WorkflowButton

> Useful when you want to let agents trigger a workflow directly from a customer card

<Frame>
  <img src="https://mintcdn.com/plain/0wG2_p3IpiRbcG4l/public/images/ui-component-workflow-button.png?fit=max&auto=format&n=0wG2_p3IpiRbcG4l&q=85&s=4444cf3b3be78ca12c977a82aaf207ce" alt="Example workflow button" width="1664" height="300" data-path="public/images/ui-component-workflow-button.png" />
</Frame>

A workflow button has the following properties:

* `workflowButtonLabel`: the text of the button
* `workflowButtonWorkflowIdentifier`: an object containing either:
  * `workflowId`: the ID of the workflow to trigger

When clicked, the button will trigger the specified workflow in the context of the current thread. The button shows a loading state while the workflow is being triggered and displays a tooltip with the latest execution status, including when it was run and how long it took.

For example:

<Snippet file="graphql/ui-workflow-button.mdx" />
