Azure Open AI Chat Completion

Azure AI Features.

Last published at: September 4th, 2025

AzureOpenAI Step

Description:

This step sends a prompt to an Azure OpenAI Chat Completion deployment and retrieves an AI-generated response.

The Azure OpenAI Chat Completion workflow step connects to a configured Azure OpenAI deployment, submits a user-defined question along with optional system instructions and image files, receives the AI-generated response, and stores the result in a FlowWright Variable or Global Variable.

The step supports both text-only prompts and multimodal prompts that include one or more image files, making it suitable for document understanding, image analysis, content generation, summarization, classification, question answering, workflow automation, and AI-assisted business processes.

Using configurable deployment models, temperature, and maximum token limits, workflows can control the creativity, consistency, and length of generated responses.

The step supports:

  • Azure OpenAI Chat Completion
  • Configurable deployment model
  • System ("Act As") instructions
  • Text prompt processing
  • Optional image file analysis
  • Configurable temperature
  • Configurable maximum response tokens
  • Storage of AI responses in Variables or Global Variables
  • Integration with FlowWright workflow automation

This step can be used for:

  • Document summarization
  • Intelligent document processing
  • Image analysis
  • Content generation
  • Question answering
  • Business rule assistance
  • Workflow automation

 

Inputs

  • Question to Ask – Specify the prompt or question to submit to the Azure OpenAI deployment.
  • Act As – Specify system instructions that define the AI model's behavior or role (for example, "Act as a financial analyst" or "Act as a document reviewer").
  • Deployment Model – Specify the Azure OpenAI deployment model that will process the request.
  • Temperature – Specify the level of creative response. Lower values produce more deterministic responses, while higher values generate more varied responses. The default value is 0.0.
  • Max Tokens – Specify the maximum number of tokens that may be generated in the response. The default value is 1000.
  • Variable/Global to Store Result – Specify the Variable or Global Variable that will receive the generated response.
  • List of Image Files – Specify one or more image file paths to include in the AI request for multimodal analysis.
 

 

Returns

  • True – The Azure OpenAI request completed successfully and the response was stored.
  • False – The request could not be completed or the AI response could not be generated.
 

 

 

Usage:

The Azure OpenAI Chat Completion step is typically placed after document retrieval, OCR processing, form submission, image acquisition, or user input activities where AI-assisted analysis or content generation is required.

The workflow submits the configured prompt, optional system instructions, and optional images to the selected Azure OpenAI deployment, stores the generated response, and makes it available for subsequent workflow steps.

A typical workflow might look like this:

 

Once the AI response has been generated, later workflow steps can:

  • Generate summaries
  • Classify documents
  • Extract key information
  • Make workflow decisions
  • Populate forms
  • Generate reports
  • Continue workflow execution

A valid Azure OpenAI deployment must be configured before this step is executed.

To use this step, you need to set up an Azure AI service in the FlowWright application. Go to the Status > Settings > Configuration page. Select the Azure AI category from the drop-down menu. Click here to learn more about the Azure AI Service subscription. 

A sample Azure AI configuration is provided here for reference. 

 

Example:

Let’s build and execute the “azureOpenAIDef” example.          

  • Create a new process definition named “azureOpenAIDef” and open it in Designer mode. 
  • Drag an “azureOpenAI” step to the canvas.
  • Connect the dots between the “Start” and “azureOpenAI” steps, as shown above.
  • Click the "azureOpenAI" step to configure its "Required" properties. Provide a name for the step. Enter the text question to ask. Select the OpenAI chat models. Provide a variable or global reference to store chat completion results. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • Click the "azureOpenAI" step to configure its "Optional" properties. Provide a persona description. Set a temperature between 0 and 2 to control the "creativity" of the generated text. Provide the list of image file paths on the application server. Then 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 in the images 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 Azure OpenAI Chat Completion step, FlowWright submits the configured prompt, optional system instructions, and any supplied image files to the selected Azure OpenAI deployment. If the request completes successfully, the generated AI response is stored in the configured Variable or Global Variable, and the workflow follows the True return path. If the deployment cannot be reached, authentication fails, the deployment model is invalid, the request exceeds service limits, or an AI response cannot be generated, the workflow follows the False return path. Click the process step to view its properties. The step should successfully generate an AI response, populate the configured Variable or Global Variable, and return True upon completion.

 

Tips:

  • Select the Azure OpenAI deployment model that best matches your business requirements.
  • Use the Act As property to provide clear system instructions and improve response consistency.
  • Use lower Temperature values for deterministic workflows and higher values when generating creative content.
  • Set an appropriate Max Tokens value to balance response completeness and execution cost.
  • Include image files when using multimodal deployments to analyze invoices, forms, diagrams, screenshots, or scanned documents.
  • Store the AI response in a Global Variable when multiple workflow steps need access to the generated content.
  • Use the True and False return paths to implement appropriate success and exception handling.
  • Combine this step with OCR, Get Form Instance Data, JSON to XML, Update Variables, Send Email, Generate Document, or Conditional Routing workflow steps to automate AI-powered business processes.

 

Notes:

  • A valid Azure OpenAI deployment must be configured and accessible before this step can execute.
  • The specified deployment model must exist within the configured Azure OpenAI resource.
  • The Act As property provides system-level instructions that influence the behavior of the AI model.
  • Temperature controls response variability, while Max Tokens limits the maximum response length.
  • When supported by the selected deployment model, image files may be included for multimodal processing.
  • Authentication failures, invalid deployment names, unavailable Azure services, malformed requests, or service quota limitations may cause the step to return False.
  • The generated response is stored in the configured Variable or Global Variable for use by downstream workflow steps.
  • AI-generated responses should be reviewed before being used for critical business decisions, regulatory submissions, or legally binding communications.

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition page.

Note: Verify and complete any missing configuration after importing the sample, including:

  • Azure OpenAI deployment model
  • Prompt text
  • System instructions
  • Temperature
  • Maximum tokens
  • Image file paths (if applicable)
  • Result Variable or Global Variable mapping
  • Azure authentication and environment-specific settings

After verifying the configuration, save the Process Definition before execution.

Click here to download the sample file.