Description:
The Classify using AI workflow step sends text content to the configured AI provider and returns the most appropriate classification from a predefined list.
The step supports:
- AI-powered text classification
- Prompt engineering using system personas ("Act As")
- Custom classification categories
- Configurable AI generation settings
- Storage of both processed and raw AI responses
This step can be used for:
- Document categorization
- Email routing
- Customer request classification
- Ticket prioritization
- Compliance tagging
- Workflow decision making
- AI-assisted business automation
Inputs
- aiProvider - Select the AI Provider configured in FlowWright.
- actAs - Optional persona or system instruction describing how the AI should perform the classification.
- content - The text content to classify.
- classList - A list of available classifications. Enter one classification per line.
- maxTokens - Maximum number of tokens generated by the AI response.
- temperature - Controls the randomness of the AI response. Lower values produce more deterministic classifications, while higher values may produce more creative interpretations.
- varGlobalStoreResult - Variable or Global variable used to store the selected classification.
- varGlobalRawResult - Optional Variable or Global variable used to store the complete raw AI provider response.
Returns
- True - Step executed successfully.
- False - Step execution failed.
Usage:
The Classify using AI step is typically placed after text has been collected or generated within a workflow.

The workflow can dynamically build the classification request using variables, form values, previous workflow outputs, or data retrieved from external systems.
The returned classification can then be used by later workflow steps to:
- Route workflow instances
- Make workflow decisions
- Populate variables
- Trigger notifications
- Select approval paths
- Generate reports
- Invoke additional AI processing
Example:
Let’s build and execute the “ClassifyUsingAIDef” example:
- Create a new process definition named “ClassifyUsingAIDef” and open it in designer mode.
- Drag the “ClassifyUsingAI” step to the canvas.
- Connect the dots between the “Start” and “ClassifyUsingAI” steps as shown above.
- Declare a variable or global to store the raw and processed results.
- Click the "ClassifyUsingAI" step to configure its "Required" properties. Provide a name for the step. Select the AI Provider from the drop-down list. Provide the text content to be classified. Provide a variable or global reference to store the result. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the "ClassifyUsingAI" step to configure its "Optional" properties. Provide the persona description. Provide a list of classification categories on new lines. Provide the value for the “Max Tokens and Temperature” parameters. Provide the variable or global reference to store the raw result. Click the Save button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the Process Definition. Create a new Process Instance and execute it. When the workflow reaches the Classify using AI step, the configured AI provider analyzes the supplied text against the configured classification list. The selected classification is stored in the configured workflow variable or global variable. If configured, the complete provider response—including metadata and usage information—is stored in the raw result variable.

Tips:
- Use Act As to improve classification accuracy.
- Keep the content focused on a single subject whenever possible.
- Provide clear and mutually exclusive classification categories.
- Limit the number of classifications to those that are relevant.
- Lower Temperature values produce more consistent classifications.
- Store the raw response when troubleshooting AI interactions or capturing provider metadata.
- Test the classification list with a representative sample before deploying the workflow.
Notes:
- An AI Provider must be configured before using this step.
- The quality of the classification depends on the clarity of both the content and the classification list.
- Similar or overlapping classifications may reduce accuracy.
- The maximum response length depends on the configured AI provider.
- AI providers may impose token limits based on the selected model.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- AI Provider selection
- Variable mappings
- Classification list
- Content to classify
- Environment-specific settings
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.