Skip to main content

Intelligence

The Intelligence step brings AutoFlow Intelligence into your flows. It has two modes:

  • Write an answer – Intelligence answers a prompt with text. The prompt can contain values of the flow (SmartFields) and files, for example a scanned invoice.
  • Answer questions – Intelligence answers several questions about one text in a single call: which answer from your list fits, yes or no, or how high something rates. Every answer is a value later steps can use.

Typical use cases:

  • Classify an incoming document (invoice, credit memo, reminder) and route it with a Decision step.
  • Rate the urgency of a customer e-mail and notify someone when it is urgent.
  • Summarise a long text or extract a value from a PDF with a prompt.
Before you start

An AutoFlow administrator switches Intelligence on in the AutoFlow Intelligence Setup and creates the provider profiles (see Build and change flows with AutoFlow Intelligence). A prompt needs a language model profile (Anthropic, OpenAI, Azure OpenAI). Questions need a TypeSafe Jev profile. Without a matching profile the step cannot be published.

Configure the step​

Add Intelligence in the flow editor (category Intelligence) and choose what Intelligence should do: Write an answer or Answer questions (classify).

Profile​

Leave it empty in most cases: a prompt uses the default language model profile, questions use the TypeSafe profile. Choose a profile only when your company has several and this step needs a specific one. The list only offers profiles that fit: language model profiles for Write an answer, TypeSafe profiles for Answer questions (classify).

Write an answer​

  • Prompt: what Intelligence should do, in your own words. Insert SmartFields for the values of the flow, for example Write a two-sentence summary of {{trigger_Description}}. Intelligence answers only with what you ask for – ask for JSON when a later step should read fields out of the answer, and read it with a Parser step.
  • Attachments: files Intelligence reads together with the prompt – PNG, JPEG, GIF and WebP images and PDF files, up to 20 MB together. A row is either a Reference to AutoFlow documents (for example the output of a Create PDF Document step) or an Inline file with name and base64 content – the same rows as in Send Email.

The answer is the output answer.

Answer questions​

  • Text to look at: what the questions are about, with SmartFields – for example the text of a document or the body of an e-mail. Add labels when you combine several values: Vendor: {{trigger_Buy-from Vendor Name}}, new line, Text: {{trigger_Description}}.
  • Questions: one card per question. Intelligence reads the text once for all questions, so ten questions in one step cost hardly more than one – ask everything about the same text in one step.

Each card has:

  • Question – the question in your own words, for example What kind of document is this?
  • Answer with – how Intelligence answers:
    • One of a list – Intelligence picks one answer from your possible answers. Add a short When to pick it to an answer when its wording alone is not clear. Answer "none" when no answer fits (on by default) makes the answer none instead of the least wrong answer. The possible answers can also come from a list in the flow – see below.
    • Yes or no – Intelligence answers true (yes) or false (no).
    • A rating – Intelligence places the text on your levels, from lowest to highest – low, medium, high to start with.
  • Name in later steps – fills itself from the question; change it if you like. Letters, digits and _ only.
  • Use in later steps – shows the SmartFields this question gives later steps and what each one holds, updated as you type.

What later steps get (for a question named category in a step with the slug Classify):

Answer withSmartFieldHolds
One of a list{{Classify_category}}one of your answers, or none
Yes or no{{Classify_category}}true for yes, false for no
A rating{{Classify_category}}the level, for example high
A rating{{Classify_category_level}}the level as a number: 1 = the first (lowest) level
every question{{Classify_category_confidence}}how sure Intelligence is, from 0 to 100

Answers from a list in the flow​

Sometimes the answers are not fixed but depend on the record – for example, which of the customer's projects is this e-mail about? Find the projects with a Find Records step first, then in the question card:

  1. Under Possible answers, choose From a list in the flow.
  2. List: click and pick the list, for example {{FindProjects_results}}.
  3. Answer from each entry: the field that is the answer, for example {{FindProjects_results.No}}. Leave it empty to use the record's primary key.
  4. When to pick it (optional): a field that helps Intelligence decide, for example {{FindProjects_results.Description}}.

The list is read every time the flow runs, up to 255 entries. The answer is the entry's value, for example the project number – use a Find Records step to load that project again in later steps. When the list is empty, the answer is none (or the step fails, if Answer "none" when no answer fits is off).

Example: route incoming documents​

  1. Intelligence, Answer questions, text to look at = the document text.
    • Question What kind of document is this?, One of a list: invoice, credit memo, reminder. Name: document_kind.
    • Question How urgent is it?, A rating: low, medium, high. Name: urgent.
  2. Case on {{Classify_document_kind}} with a path for invoice, credit memo, reminder and none – the none path notifies the accounting team.
  3. A Decision on {{Classify_urgent_level}} at least 3 sends an alert.

Good to know​

  • With the flow's log level set to debug, the execution log shows, for every question from a list, the entries and the answers read from them, and the request sent to TypeSafe Jev with its answers. If no entry gives an answer, the step fails and names the field – pick it again with .
  • Each run is logged under AutoFlow Intelligence Setup → Sessions with model, tokens and estimated cost. The flow's execution log names the session.
  • If the provider fails or the answer is cut off, the step fails like any other step, with the reason.
  • In triggers that run while someone works on the record (for example when a document is released), publishing warns you: the user waits until the answer arrives.
  • The text, the prompt and the files go to the provider of the profile on every run.
  • Questions do not read files yet – images follow in a later release. Ask about a file with a prompt.