AI Query

The AI Query job in the Task Planner can send a request to an AI platform using the configured AI connection with its API key, System Prompt and AI Model.

The request text can be provided in the job and may use placeholders from triggers. The response is delivered using the aiquery.response placeholder.

In the case of errors, such as a missing API key or connection issues, the job will fail.

Note: It should be noted that this job sends data to the AI connection, meaning that without care, you might potentially send privacy-sensitive data to a third party with this job.

Expected Format

The Expected Format option controls the desired response format from the AI. When set, the instruction Please provide your response in {format} is automatically appended to the request after a separator line.

  • Plain text: The AI responds in plain, unformatted text (default).
  • HTML: The AI responds with HTML-formatted content, using tags like <p>, <b>, etc.
  • Markdown: The AI responds in Markdown format, using syntax like bold and *italic*.

If no format is selected, the request is sent as-is without any format instruction.

Condition

A condition can be added to the AI Query job to check the response. The condition will evaluate to valid when the AI query returned a response, and invalid when no response was returned (e.g., due to connection issues or errors).

See Job Conditions and Execution Qualifications for details on how conditions affect action execution.

With the Execution Qualification setting on each action, you can determine which actions run based on the AI response:

  • At least one condition is fulfilled: The action runs only if the AI query returned a response.
  • No condition is fulfilled: The action runs only if the AI query did NOT return a response (e.g., for error notifications).
  • Execute always: The action runs regardless of the AI response.