AskOpenAI Step

Use this feature to send prompts to an OpenAI model and use the AI-generated response within a FlowWright workflow.

Last published at: July 24th, 2026

Description:

The Ask Question from OpenAI step enables a FlowWright workflow to interact directly with an OpenAI language model.

This step allows workflows to perform AI-powered reasoning, text generation, summarization, content creation, classification, extraction, translation, and image analysis using configurable prompts. The workflow specifies the OpenAI model, provides a prompt describing the task, optionally defines an AI role through the Act As property, and may include one or more image files that the AI can analyze alongside the prompt.

The generated response is stored in a workflow variable or global variable, allowing subsequent workflow steps to use the AI output for decision-making, notifications, document generation, integrations, or additional processing.

Typical uses include:

  • Answering business questions
  • Generating reports
  • Summarizing documents
  • Classifying customer requests
  • Translating text
  • Extracting structured information
  • Analyzing uploaded images
  • Creating AI-assisted workflow content

By integrating OpenAI directly into workflow automation, organizations can automate complex knowledge-based tasks without requiring custom AI integration code.

Note: This process step returns the AI's raw result. It does not attempt to parse, format, or map the AI’s findings to specific workflow variables (such as "InvoiceNumber" or "TotalAmount"). Instead, it returns the entire, unedited JSON payload or text response exactly as it came from the underlying AI model (e.g., OpenAI, Azure AI, or FlowWright’s internal ML models).

 

Inputs

  • Act As – Optional instruction that defines the role or perspective the AI should assume while generating its response, such as business analyst, legal advisor, technical writer, or customer support agent.
  • Model to Use – Specifies the OpenAI model that will process the request.
  • Prompt - Specifies the question, instruction, or task submitted to the selected OpenAI model.
  • List of Image Files - Optionally specifies one or more image file paths that will be analyzed together with the prompt.
  • Max Tokens - Specifies the maximum number of tokens that the AI may generate in its response. The default value is 1000.
  • Variable/Global to Store the Result - Specifies the workflow variable or global variable that receives the generated AI response.
 

 

Returns

  • True – The OpenAI request completed successfully and the generated response was stored in the configured workflow variable or global variable.
  • False – The AI request could not be completed because of a processing, configuration, or connectivity error. Workflow execution follows the alternate path. 
 

 

Usage:

The Ask Question from OpenAI step is typically used whenever a workflow requires AI-generated content or reasoning.

During execution:

  1. Load the configured OpenAI model.
  2. Apply the optional Act As instruction.
  3. Submit the configured prompt.
  4. If specified, include the configured image files for multimodal analysis.
  5. Generate an AI response.
  6. Store the response in the configured workflow variable or global variable.
  7. Continue workflow execution through either the True or False return path.

A typical workflow might look like this:

 

Typical workflow scenarios include:

  • Answering customer questions automatically
  • Generating knowledge base articles
  • Extracting key information from text
  • Summarizing business communications
  • Reviewing uploaded images
  • Translating multilingual content
  • Creating workflow documentation
  • Assisting approval workflows with AI-generated recommendations

 

Example:

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

  • Create a new process definition named “askOpenAIDef” and open it in designer mode. 
  • Drag an “askOpenAI” step to the canvas.
  • Connect the dots between the “Start” and “askOpenAI” steps, as shown above. 
  • Click the “askOpenAI” step to configure its "Required" properties. Provide a name for the step. Select a chat model from the drop-down list. The FlowWright product team frequently updates these models—type the prompt text to ask OpenAI. Provide a variable or global reference to store the result. 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 “askOpenAI” step to configure its "Optional" properties. Enter the text for the ActAs field. ChatGPT's “Act As” prompt is a creative way to ask the model to assume a specific role, persona, or perspective during your interaction. Provide a comma-separated list of image files to aid the OpenAI response.  

 

  • 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 instance, and execute it. Render the process instance. 

 

  • Click the process step to view its properties. The AskOpenAI step should store the answer in the variable or global, as configured. The AskOpenAI result is included here for your reference. 

 

Tips:

  • Use the Act As property to tailor responses for different business roles, such as project manager, legal reviewer, HR specialist, or technical architect.
  • Write clear, specific prompts to improve the quality and consistency of AI responses.
  • Adjust the Max Tokens value based on the desired response length.
  • Include image files when workflows require AI-based image understanding or visual analysis.
  • Store AI responses in workflow variables so they can be reused by downstream workflow activities.
  • Route the False path to retry logic or administrative notification for improved reliability.
  • Combine this step with Summarize PDF Document, Get Configuration Settings, REST Call, Send Email, Evaluate Multiple Expressions, or DB Decision Table steps to build intelligent, AI-powered workflows.

 

Notes:

  • A valid OpenAI model and prompt are required before the step can execute.
  • The Act As property is optional and influences the style or perspective of the generated response.
  • Image files are optional and may be supplied when multimodal analysis is required.
  • The Max Tokens property limits the maximum size of the generated response and defaults to 1000.
  • The generated response is stored in the configured workflow variable or global variable.
  • Both the True and False return paths should be implemented to provide complete workflow handling.
  • Execution details and AI request information are recorded in the FlowWright workflow execution log.

 

Ask Question from OpenAI vs. Summarize PDF Document:

Both workflow steps use OpenAI models, but they are designed for different AI-assisted tasks.

Ask Question from OpenAI Summarize PDF Document
Processes custom prompts and optional image inputs. Processes a PDF document to generate a summary.
Supports general-purpose AI reasoning and content generation. Focused specifically on summarizing PDF content.
Can perform classification, extraction, translation, question answering, and image analysis. Produces a concise summary of a PDF document.
Accepts prompts, image files, and configurable token limits. Accepts a PDF file and generates a document summary.

As a general guideline:

  • Use Ask Question from OpenAI when workflows require general-purpose AI interactions, reasoning, multimodal image analysis, or custom prompt-based processing.
  • Use Summarize PDF Document when the primary objective is to generate concise summaries of PDF documents.

 

Definition Sample:

You may download the sample workflow definition from the link provided and import it into your FlowWright environment.

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

  • OpenAI model selection
  • Prompt
  • Optional Act As instruction
  • Optional image file paths
  • Maximum token value
  • Workflow variable or global variable for storing the AI response
  • Success and failure workflow branches
  • OpenAI connectivity and authentication settings

After verifying the configuration, save and publish the workflow before execution.

Click here to download the sample file.