Skip to main content
Version: Current

Generate Response

Description​

Generates a response from an OpenAI model using a prompt, optional instructions, and optional supporting files or images.

You can use this activity for text generation, content summarization, document analysis, image understanding, classification, extraction, and other AI-powered workflow scenarios.


Common settings​

Use Process Data to bind supported inputs to workflow values or upstream outputs. See Common Activity Features for shared execution, error-handling, and output-persistence settings. Availability depends on the activity.

Design-Time Configuration​

Display Text​

The label displayed for this activity on the workflow canvas.

Connection Name​

Specifies how the activity authenticates with OpenAI.

  • Select IB-X OpenAI Credits to use OpenAI models through the Integration Gateway using IB-X credits.
  • Select an OpenAI Connection to use your own OpenAI API key and account.

If no connection exists, click Add Connection to create one inline.

Learn more → OpenAI Connection

Model​

The OpenAI model used to generate the response.

Prompt​

The prompt sent to the model.

Instructions​

Optional system instructions that define the assistant's behavior, role, tone, or response style.

Maximum length: 256,000 characters.

Files​

Optional collection of files supplied to the model as supporting context.

Accepts a FileReference[].

For details, see File Reference.

File URLs​

Optional collection of file URLs supplied to the model as supporting context.

Image Files​

Optional collection of image files supplied to the model.

Accepts a FileReference[].

For details, see File Reference.

Image URLs​

Optional collection of image URLs supplied to the model.

Maximum Output Tokens​

The maximum number of tokens that the model can generate in the response.

Temperature​

Controls response randomness.

  • Lower values produce more deterministic results.
  • Higher values produce more creative or varied results.

Supported range: 0 to 2.

Top P​

Controls nucleus sampling.

Supported range: 0 to 1.


Working with Files​

The activity can accept files and images directly through FileReference objects.

This is useful when working with:

  • Email attachments
  • Documents downloaded from cloud storage
  • Files produced by previous workflow activities
  • Images generated or collected during workflow execution

For example:

  • Store attachments in a FileReference[] collection using Add To Collection.
  • Bind the collection to Files or Image Files.
  • The activity automatically uploads and supplies the content to the model.

For details, see:


Common Activity Features​

Execution settings​

Configure Wait All Incoming when execution paths converge, and On Error for failure handling. Select Inherit where available to use the workflow-level error policy.

Outputs​

Response Message​

Type: String

The generated response text returned by the model.

Raw Response​

Type: String

The complete raw response returned by the OpenAI service.

Total Tokens​

Type: Integer

The total number of tokens consumed for the request and response.

Example: Summarize an attachment​

Read the email and collect its attachment File values in a file-reference collection using Add To Collection. Bind that collection to Files, select the connection and model, and set Prompt to Summarize the attached document in three bullet points.

Use Response Message in the next text-consuming activity. Raw Response is a JSON string; Total Tokens reports request/response usage. Do not pass Response Message directly to a DataTable input.

Choose a model that supports the supplied files or images and the selected options. Model-specific token, file, and sampling restrictions still apply. The activity constrains Temperature to 0–2 and Top P to 0–1; this does not guarantee that a model accepts both settings. The uploaded files are removed from the model service after the request; the source file references remain available.