Skip to main content

How to use AI to validate documents in the process

  • July 14, 2026
  • 0 replies
  • 2 views
vinicius.pereira
Community Manager

đŸ‘€  For pipe admins

🔐  Available on all plans with AI Credits

🎯  For processes with validation of receipts, invoices or documents

 

Someone sends a payment receipt. An analyst opens the file, checks the amount, verifies the date and records the result in the system. This work happens dozens of times a day in reimbursement, procurement and compliance processes. It is repetitive, scales poorly and concentrates human attention on tasks that always follow the same logic.

Pipefy's Document Understanding lets the AI Agent read the content of images and PDFs and apply validation criteria automatically. It is not text extraction. It is judgment with criteria: the agent checks whether the document meets the conditions you defined and records the result in the card. By the end of this article, you will know when to use this capability, how to configure the right criteria and where the process still needs human review.
 

📖 What you'll understand here:

 

What Document Understanding does and what it does not do

The agent with Document Understanding can read the content of PDFs and images, extract specific information and apply criteria defined in the instruction. Native PDFs (generated by a system) produce more accurate results. Scanned PDFs and photos of physical documents work, but with a higher risk of error, especially when the image quality is low.

What works well: extracting specific fields from standardized documents, identifying the document type, verifying the presence of mandatory information and filling card fields with the extracted data.

 

The agent does not guarantee accuracy in: handwritten documents, tables with a complex structure, images with low resolution or a lot of visual noise, and technical drawings. For these cases, Document Understanding is not the right tool without mandatory human review.

 

An important limitation about value comparison: the agent can extract a value from a document and fill a card field, but numeric comparisons (e.g. whether the invoice amount matches the order amount) have variable accuracy. The recommended practice is to use the agent to extract the value and configure an automation with a formula to do the comparison.

 

Three use cases and how the agent acts in each one

 

  • Payment receipt in reimbursement

The colleague attaches the receipt in the @Payment receipt field. The agent reads the file, extracts the amount and the date, and fills @Extracted amount and @Receipt date. A separate automation compares @Extracted amount with @Requested amount and records the result in @Validation status. Separating extraction from comparison ensures more reliability than asking the agent to do both things in the same instruction.

 

  • Invoice in accounts payable

The agent verifies whether the issuer's tax ID is present, extracts the service description and the total amount, and fills the corresponding fields in the card. Validating whether the tax ID is on the list of approved suppliers can be done by the agent using the pipe data access ability, consulting a database of registered suppliers.

 

  • Identity document in onboarding

The agent identifies whether the document is an ID card or driver's license, extracts the name and checks whether it matches the @Colleague name field. The result is recorded in @Valid document (Yes/No) and @Document type. For documents with an expiration date, the agent extracts the date and an automation checks whether it is within the deadline.

 

In all three cases, the pattern is the same: the agent extracts and fills fields, the automations do the logical comparisons. Splitting responsibilities between agent and automation produces more reliable results that are easier to debug when something goes wrong.

 

How to define validation criteria in the instruction

The agent's instruction is where you define what it should verify. A vague instruction produces inconsistent results. A specific instruction produces predictable results.

Recommended structure for document validation instructions:

  • What to read: reference the attachment field with the dynamic syntax. Document Understanding is activated automatically when the agent finds an attachment field in the instruction.
  • What to extract: list the specific fields the agent should identify in the document. Be precise: "the total amount on the footer line" is better than "the amount".
  • What to fill: specify the card fields that will receive the extracted data and the values accepted in each one.
  • What to do when it cannot read: always include an instruction for the case of an unreadable file, unsupported format or missing information. Without it, the agent leaves fields blank or fills them with unexpected values.

 

Example instruction for a reimbursement receipt:

Read the file in @Payment receipt.

Extract the total amount and fill @Extracted amount.

Extract the transaction date and fill @Receipt date.

If the file cannot be read, fill @Validation status with "Inconclusive".

Do not compare values. Do not move the card. Do not send notifications.

 

When the agent rejects a valid document

False negatives happen. A receipt with a non-standard layout, an invoice with a complex table or a photo taken in poor light can generate an incorrect result. The process needs to be prepared for this from the configuration stage, not as a contingency afterward.

  • Configure a human review phase for all cards with @Validation status equal to "Rejected" or "Inconclusive". The agent triages at volume. The analyst reviews the flagged cases.  
  • Make the @Reason field mandatory in the agent's instruction for the rejected cases. The analyst needs to know why the agent rejected it before reviewing the document.  
  • Monitor the rate of inconclusive results in the first weeks. If a specific type of document generates many incorrect results, adjust the instruction or guide the requesters on the expected submission format.

 

Files outside the supported limits (PDF with more than 30 pages, more than 30 images per run, unsupported formats) are not processed and do not consume credits. The agent does not record an error directly in the card in these cases. For visibility, check the automation Logs in the pipe header. 

Â