Skip to main content
Limited Release
This action is in limited release and is not generally available.

Prompt AI

The Prompt AI action sends a prompt to an AI model and returns the response. This is the simplest way to use AI in your workflows, supporting both plain text and structured JSON responses.

When to Use This Action

Use this action when:

  • You want AI to analyze, summarize, classify, or transform text in your workflow
  • You need to extract structured data from unstructured text (e.g., priority, category, and summary from an email)
  • You want a straightforward single-turn AI response without tool use

Don't use this action for:

  • Complex multi-step AI tasks: Use Invoke AI Agent when you need the AI to call tools, query APIs, or reason across multiple steps.

Configuration

FieldDescription
PromptThe prompt to send to the AI. Supports text expressions with {{variable}} syntax for dynamic content. Write clear, specific instructions for what you want the AI to do.
Response FormatChoose how the AI should respond: Simple (plain text) or Structured (JSON matching a defined schema).
Output SchemaDefine the structure of the AI response using the schema editor. Only shown when Response Format is "Structured". Each field you define becomes a property in the returned JSON object.
Expanded ResponseWhen enabled, wraps the response in an object: {"Response": "<the AI response>"}. Useful when you need to access the response by name (e.g., {{custom.result.Response}}).

Returned Variables

When you configure Store the results in Variable:

Simple mode:

VariableTypeDescription
(root)stringThe AI's text response

Structured mode:

VariableTypeDescription
(root)objectJSON object matching your Output Schema
<PropertyName>variesEach property defined in your schema

Access properties via {{custom.<variableName>.<PropertyName>}}.

Example Use Cases

Simple Text Analysis

Prompt: Summarize this email in one sentence: {{email.body}}
Response Format: Simple

Structured Data Extraction

Prompt: Extract the following from this email: {{email.body}}
Response Format: Structured
Output Schema:
- Priority (enum): "low", "medium", or "high"
- Category (string): The type of request
- Summary (string): Brief description

Notes

  • No external AI account or API key is required. AI actions are provided by MSPintegrations.
  • In structured mode, the AI retries up to 5 times if it returns invalid JSON
  • All schema properties are required in structured mode