AI Prompt Action Type
The AI Prompt action type sends a prompt to the AI whenever the action is triggered, then uses the AI’s answer inside your process - for example, summarizing an uploaded document into a field, classifying a request, or deciding which branch of a decision tree to follow.
To set up an AI Prompt action:
-
On the desired template, click the Automated Actions icon in the template designer menu
-
Give the action a name and select AI Prompt as your Action Type
-
Select a trigger and add any conditions
-
In Action setup, complete the settings below
AI Prompt settings
Section titled “AI Prompt settings”-
AI Prompt Type - Select Custom to write your own prompt, or choose a predefined prompt type such as PDF Splitter
-
AI Role Description - An optional description of the role the AI should play (for example, “You are a thorough AI financial analyst”). Shown only when the prompt type is Custom
-
Natural Language Prompt - The instructions for the AI. The more detailed and specific the prompt, the better and more reliable the results. Pro tip: ask the AI to respond using specific, predictable words that you can use in the success formula below. Use the Insert Field Token button to include values from your process
-
AI Model - Choose the level of intelligence needed
-
File Attachment (If Necessary) - Use a file attachment field token to send files from the process along with the prompt. Images, PDFs, Word documents, Excel spreadsheets, and text-based files (such as .txt, .csv, and .json) are supported. Very large text files are trimmed to their beginning, and the AI is told when that happens
-
How to Determine Success? (Optional) - A semicolon-separated list of responses to be considered successful, or a formula that evaluates to true or false. If provided, any response not in the list (or a formula that evaluates to false) is considered a failure
-
Store Result in Field - Optionally select the process field in which to store the AI’s answer
Instructions go in the prompt, not in the file
Section titled “Instructions go in the prompt, not in the file”Write everything you want the AI to do in the Natural Language Prompt. The contents of an attached file are treated as material to work on, never as instructions to obey, so a note that tells the AI what to do will not be followed if you put it inside an attached file: in a spreadsheet cell, in a document, or as text in an image.
This protects your processes. Attachments often reach a process from outside your company, through a public form, an emailed reply, or a file a supplier sent you, and nothing inside them should be able to change what your automation does.
The subject matter of a file is still read normally. If you attach a policy or a procedure that says “approve when the total is under $5,000”, the AI uses that as information when it answers your question.
Completing a task with the AI’s answer
Section titled “Completing a task with the AI’s answer”Use the Complete Task step to have the action complete a process task once the AI responds:
-
If the AI’s answer exactly matches the name of one of the task’s responses, that response is selected - this lets the AI drive your decision tree directly
-
Otherwise, the How to Determine Success? setting decides whether the task is completed with the success response or the failure response
The PDF Splitter prompt type
Section titled “The PDF Splitter prompt type”When AI Prompt Type is set to PDF Splitter, the AI reads the attached PDF, decides where the individual documents inside it begin and end, splits it into separate PDF files, and saves the resulting files to the attachment field you select. This is useful when a single scanned file contains several documents (for example, a packet of invoices).
Checking the AI’s work
Section titled “Checking the AI’s work”When the process is running in Test Mode, the prompt that was actually sent (with your field tokens filled in), the AI’s reasoning, and its answer are all written to the Instance Audit Log. Start there when an answer is not what you expected - most surprises turn out to be a field token that was empty or held something different than you assumed.
Note: AI Prompt actions count toward your account’s AI usage. If the account’s AI allowance has been used up, the action will not run until the allowance resets.