Data: AI prompt

Send prompt to the AI and store the response.

Help Centre › Functions & Formulas

Send prompt to the AI and store the response.

Add it to a process

In the process designer, open the Add step tab. Find AI prompt under Data, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
AI promptYesThe prompt to send to AI
VariableYesName of the variable where the result will be stored Default: data.

What it gives back

  • {chat}
  • {data} – AI response (parsed as JSON if possible)

See all Data steps.

Syntax

AI(prompt, [model], [temperature], [max_tokens])

The AI function syntax has the following arguments:

  • prompt - Required. The text prompt or instruction you want to send to the AI model.
  • model - Optional. The AI model to use (e.g., "gpt-4"). If not specified, the default model will be used.
  • temperature - Optional. A value between 0 and 1 that controls the randomness of the output. Higher values produce more random results.
  • max_tokens - Optional. The maximum number of tokens to generate in the response.

Example

FormulaDescriptionResult
=AI("Summarize the following text: 'Automize is a powerful automation platform.'", "gpt-4", 0.5, 50)Generates a summary of the provided text using the GPT-4 model."Automize is a robust platform for creating automated workflows."
=AI("Translate 'Hello, world!' to Spanish", "gpt-4", 0.3, 20)Translates the given text into Spanish using the GPT-4 model."¡Hola, mundo!"

Errors

ErrorDescription
AI service unavailableThe AI service could not be reached.
Invalid promptThe prompt is empty or invalid.

For a full list of formula errors, please read Formula errors.

Tips

  • Be specific and clear in your prompts for better results.
  • Use variables in prompts to include dynamic data, e.g. 'Summarise: {document_text}'.

Related functions

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.