1. Home
  2. AI & Integrations
  3. AI Features
  4. AI Agent: Attachment Extraction

AI Agent: Attachment Extraction

Overview

The Attachment Extraction agent reads a file attached to a record — such as a receipt, invoice, or document — and uses your connected AI provider to extract specific data from it. The extracted values are written back into fields on the record, removing the need for manual data entry.

You configure which fields to populate by defining Field Prompts: one per output field, each with optional instructions to guide the AI on exactly what to extract. For table-type fields, you can define prompts at the column level to handle structured line-item data.

Note: This feature requires an AI Connection to be set up in Platform Settings before you can create an AI Agent action. See the AI Connection article for setup instructions.

Prerequisites

Before creating this action, make sure you have:

  • At least one AI Connection configured under Platform Settings
  • A form with an attachment field containing the files to process
  • Output fields on the form to receive the extracted values

Creating the Action

Actions are created from the Actions section in your app.

  • In the left-hand navigation, select Actions.
  • Click + Create Action.
  • In the New Action dialog, open the Select Action Type dropdown and select AI Agent. Additional fields will appear.
  • Enter an Action Name (up to 128 characters).
  • Optionally, add a Description.
  • Under Select Form, choose the form this action will run against.
  • Under AI Connection, select the AI connection to use. Connections are managed in Platform Settings.
  • Under Agent Type, select Attachment Extraction. Two new sections will appear: Select Attachment Field and Field Prompts.

Configure the attachment field and prompts as described in the Configuration Reference section below.

  • Click Create to save the action. The action configuration editor will open, where you can review and adjust settings.

Configuration Reference

The fields below appear in both the New Action dialog and the action configuration editor after creation.

Action Details

FieldDescription
Select Action Type *Set to AI Agent. Cannot be changed after creation.
Action Name *A short name to identify this action in the Actions list. Maximum 128 characters.
DescriptionOptional. A note describing what this action does.
Select Form *The form whose records this action will process.
AI Connection *The AI service connection to use. Connections are configured in Platform Settings.
Agent Type *Set to Attachment Extraction for this agent.

Select Attachment Field

The attachment field on the form that contains the file to be processed. The AI agent will read the file in this field when the action runs.

FieldDescription
Select Attachment Field *The attachment-type field on the form whose file will be sent to the AI for extraction.

Note: The form must have at least one attachment field for this option to appear. If the field is empty on a record when the action runs, the agent will not produce any output for that record.

Field Prompts

Field Prompts tell the AI which fields to populate and how to extract the right value for each one. Each prompt entry maps one output field to a set of extraction instructions.

Use + Add Field Prompt to add entries. Use the – button to the left of an entry to remove it.

FieldDescription
Field *The output field on the form where the extracted value will be written.
PromptOptional instructions for the AI describing what to extract for this field — for example, where it typically appears on the document, how it is labelled, or any formatting rules. Leave blank to rely on the field name and the top-level Context Prompt alone.

Tip: Well-written per-field prompts significantly improve extraction accuracy, especially for documents where field labels vary (e.g. Receipt No., Invoice Ref., Ref.) or where multiple similar values exist (e.g. transaction date vs. print date vs. due date).

Table Field Prompts

When a selected Field is a table-type field, the entry expands to show a nested Column Field section. This allows the AI to extract structured line-item data — such as the rows of an invoice — directly into a table field on the form.

Use + Add Table Field Prompt inside the table entry to add column-level prompts. Each column prompt maps one column of the table field to extraction instructions.

FieldDescription
Field *Set to the table-type field on the form.
Column Field *A column within that table field. Add one entry per column you want the AI to populate.
Prompt (column)Optional instructions for the AI describing what value to extract for this column across all rows — for example, the item name, quantity, unit price, or line total.

Note: For each row found in the document, the AI will create a new row in the table field. If a column value is not present in the document, that cell will be left empty.

Context Prompt

A free-text field that applies to the action as a whole. Use this to give the AI context about the type of document being processed and any general extraction rules that apply across all fields.

You can reference field values in the prompt by typing @ to insert a field token. This allows the prompt to include dynamic content from the record being processed.

Example: “You are extracting data from a purchase receipt or invoice. The document may be a photo or a PDF. Extract all available fields accurately. If a value is not present on the document, leave the field empty — do not guess.”

Change Record Stage After Execution

A toggle that, when enabled, reveals a Stage dropdown. When the AI agent finishes processing, the record will automatically move to the selected stage.

FieldDescription
Change Record Stage After ExecutionToggle off by default. Enable to automatically advance the record to a specific stage once the agent completes.
StageAppears when the toggle is enabled. Select the stage the record should move to after the agent runs.
Updated on August 28, 2026
Was this article helpful?

Related Articles