Skip to content
Glacis Help Center home
InboxAsk a human

Artificial Intelligence (AI) Nodes

AI nodes let your workflows use artificial intelligence to read documents, extract structured data, classify content, and make decisions. Instead of writing rules for every possible scenario, you describe what you need in plain language — and the AI handles the rest. This page covers the AI nodes available in Glacis and how to use them effectively.

Available AI nodes

Node

What it does

Best for

Analyse Text

Reads text and extracts structured data from it

Parsing email bodies, classifying requests, extracting order details from text

Analyse Document

Reads attached files (PDFs, Excel, images) and extracts data

Processing invoices, packing lists, bills of lading, purchase order PDFs

AI Agent

Runs an AI agent that can reason through complex tasks

Multi-step analysis, action item extraction, content validation

Categorise Documents

Automatically classifies documents into categories

Sorting incoming attachments by type (invoice, PO, BOL, packing list)

Validate Content

Checks content for safety and integrity

Detecting suspicious emails, validating input quality

How to use Analyse Text

Analyse Text is the most commonly used AI node. It takes text from a previous step (like an email body) and extracts structured data from it.

Setting it up

  1. Add an AI: Analyse Text step to your workflow.

  2. Configure three things:

    • Prompt — tell the AI what to do, in plain language

    • Expected Output — define the structure of the data you want back (as a JSON schema)

    • Model — choose which AI model to use

Writing a good prompt

The prompt is where you tell the AI what to extract or decide. Write it like you'd explain to a colleague:

You are analyzing an incoming email to determine what type of request it is. The email is from: {{TRG_EMAIL.From}} Subject: {{TRG_EMAIL.Subject}} Body: {{TRG_EMAIL.Text Body}} Classify this email into one of these categories: - "purchase_order" — the email contains or references a new purchase order - "confirmation" — the sender is confirming dates, quantities, or prices - "shipping_docs" — the email contains shipping documents (BOL, packing list, invoice) - "question" — the sender is asking a question or requesting information - "other" — none of the above Also extract the order number if one is mentioned.

Be specific about what you want. "Classify this email" is too vague. "Classify this email into one of these five categories" gives the AI clear guardrails.

Defining the expected output

The Expected Output tells Glacis what shape the AI's response should take. This ensures you get consistent, structured data that the next steps in your workflow can reliably use.

For the email classification example above, the expected output schema would be:

{ "type": "object", "properties": { "category": { "type": "string", "enum": ["purchase_order", "confirmation", "shipping_docs", "question", "other"], "description": "The email classification category" }, "order_number": { "type": "string", "description": "The PO or order number if mentioned, otherwise empty string" }, "confidence": { "type": "string", "enum": ["high", "medium", "low"], "description": "How confident the classification is" } } }

After the AI runs, downstream steps can reference the output like this:

  • {{AI_CLASS.output.category}} — the classification result

  • {{AI_CLASS.output.order_number}} — the extracted order number

Choosing a model

Glacis supports multiple AI models. The default (Gemini 2.5 Flash) works well for most tasks. You can also configure:

  • Multiple models — the AI runs your prompt across several models and compares results (called voting). This improves accuracy for high-stakes decisions.

  • Failover model — a backup model that runs if the primary one fails.

For simple classification tasks, a single model is fine. For extracting complex order data from messy PDFs, consider enabling voting with 2–3 models.

How to use Analyse Document

Analyse Document works like Analyse Text, but it can also read file attachments — PDFs, Excel spreadsheets, images, and scanned documents.

Setting it up

The configuration is the same as Analyse Text, with one addition:

  • Documents — which files to analyse. Typically, you'll pass document IDs from a trigger or previous step.

For example, to analyse attachments from an incoming email:

Documents: {{TRG_EMAIL.[Related Document IDs]}}

When to use Analyse Document vs Analyse Text

Scenario

Use

The data is in the email body

Analyse Text

The data is in an attached PDF, Excel, or image

Analyse Document

The data is in both the email body and attachments

Analyse Document (it can read both)

Analyse Document handles scanned documents and images too — it uses OCR (optical character recognition) to read text from images.

How to use AI Agent

The AI Agent node is for more complex tasks where the AI needs to reason through multiple steps, not just extract data from a single input.

When to use it:

  • Extracting action items from a long email thread

  • Validating content against business rules that are hard to express as simple conditions

  • Any task where you'd normally ask a person to "read this and figure out what needs to happen"

Setting it up

  1. Add an AI: AI Agent step.

  2. Select or configure the agent — this defines the AI's role and capabilities.

  3. Write the user request — what you want the agent to do with the data from previous steps.

AI Agents are more powerful but slower and more expensive than Analyse Text. Use Analyse Text for straightforward extraction, and AI Agents for tasks that require judgement.

Voting — improving accuracy on critical decisions

For high-stakes AI decisions — like extracting order data that will create real purchase orders — you can enable voting. This runs the same prompt across multiple AI models and compares their answers.

How voting works

  1. You configure 2 or more models in the Models field (e.g., Gemini 2.5 Flash and another model).

  2. Glacis runs the prompt on each model independently.

  3. The results are compared. If the models agree, the answer is used. If they disagree, Glacis uses the majority answer or flags the discrepancy.

When to use voting

Scenario

Voting?

Classifying emails into categories

Usually not needed

Extracting order line items from a PDF

Recommended — errors here create wrong orders

Deciding whether to escalate an issue

Optional — depends on how critical the decision is

Parsing a simple date or number

Not needed

Limitation: Voting increases processing time and cost (each model runs separately). Only use it where accuracy matters more than speed.

Common patterns

Pattern 1: Email triage

Classify incoming emails and route them to different workflow paths:

Email Received → Analyse Text (classify email type) → Condition: is it a purchase order? → Yes: Extract order data → Create Order → No: Create Task for human review

Pattern 2: Order extraction from attachments

Extract structured order data from PDF or Excel attachments:

Email Received → Analyse Document (extract order details from PDF) → Create Order (using extracted data) → Send Confirmation Email (to the sender)

Pattern 3: Content validation

Check AI-extracted data before acting on it:

Email Received → Analyse Document (extract order data) → Analyse Text (validate: do the line items make sense? are quantities reasonable?) → Condition: is the data valid? → Yes: Create Order → No: Create Task for human review

Tips for getting good results

  1. Be specific in your prompts. "Extract order data" is vague. "Extract the PO number, seller name, list of items with quantities and unit prices, and the requested delivery date" is specific.

  2. Define your expected output schema carefully. The schema is your contract with the AI. If you need an array of line items, define it as an array. If a field is optional, mark it as such.

  3. Use realistic test data. When testing AI nodes, use real emails and documents (or close copies). Synthetic test data often doesn't expose the edge cases that real data does.

  4. Start simple, then add complexity. Get a basic extraction working first. Then add validation, confidence scoring, and edge case handling.

  5. Check the output in workflow runs. After a workflow runs, click the AI step to see exactly what the AI returned. This is the fastest way to spot problems and refine your prompts.


Need help?

If you have questions or run into issues, we're here to help: