Confluence Data and Variables to Use in Prompts

Confluence Data and Variables to Use in Prompts

What Confluence data the AI can use

Subject to the tenant’s data-sharing settings, the AI can receive context such as:

  • page title

  • page version

  • page body

  • page space

  • page comments

  • attachment metadata

  • approval name

  • approval status

  • approval progress

  • approval steps

  • previous decisions

  • approver comments

  • approval deadlines

  • definition name and description

  • previous AI Prompt step results

  • similar past approvals from the same definition

The AI receives this information as structured context. You do not need to manually include every field in the prompt.


Confluence variables you can use in prompts

AI Prompt templates support OlivLang variables.

Common Confluence variables include:

{{ page.title }} {{ page.version.number }} {{ page.body.storage.value }} {{ page.spaceId }}

Common approval variables include:

{{ approval.name }} {{ approval.status }} {{ approval.progress }} {{ approval.decisionDeadline }} {{ approval.validityExpirationDate }} {{ approval.steps }} {{ approval.successSteps }} {{ approval.rejectionSteps }} {{ approval.expirationSteps }}

Common definition variables include:

{{ definition.name }} {{ definition.description }} {{ definition.purpose }}

Precedent approvals can be referenced with:

{{ crossApprovals }}

In most cases, you do not need to manually reference every page field. If the field is allowed by the data-sharing settings, the AI can already use it from the structured context.


Use AI results in later AI Prompt steps

AI Prompt steps can build on each other.

For example:

  1. Page summary

  2. Publishing recommendation

  3. Documentation owner approval

The Publishing recommendation step can use the result of the earlier Page summary step.

For predictable results, place related AI Prompt steps in separate sequential groups so the order is clear. Approval branches are independent. A step in a success branch cannot read results from a rejection or expiration branch, and the same applies in reverse.


Example: include AI output in an email message template

Email approval steps use tenant-wide message templates from:

Approval Path settings → Messages

You can include AI Prompt results in those templates.

Example:

Hi team, The Confluence page below is ready for review. AI summary: {{ promptSteps["Page summary"].result }} Open the approval: {{ approvalLink }} Open the page: {{ pageLink }}

Message templates can also use recipient-friendly variables such as:

{{ activeUser }} {{ approvalOriginator }} {{ approvalLink }} {{ pendingApprovalsLink }} {{ pageLink }} {{ spaceLink }} {{ stepDetails }} {{ appName }}

Example: send AI output through an HTTP step

You can use an HTTP step to send the AI result to another system.

Example request body:

{ "channel": "#content-approvals", "text": "*{{ approval.name }}* — {{ promptSteps[\"Publishing recommendation\"].result }}" }

Example: use AI output in an Automation step

You can use the AI result in an Automation step body or value template.

Example:

AI publishing review: {{ promptSteps["Publishing recommendation"].result }}

This can be useful when you want to store, forward, or reuse the AI analysis after the step completes.


Test a prompt before using it

Admins can test templates from:

Approval Path settings → AI → Prompt templates

The live preview lets you select a real approval and preview the assembled prompt before it is sent to the AI provider.

Use the preview to:

  • check whether variables resolve correctly

  • see what context the AI would receive

  • estimate token usage

  • confirm that privacy and data-sharing settings are working as expected

  • refine prompt wording before using it in an approval definition

 

The preview does not make a real AI call or spend tokens.