Check if Document Contains an Item

Determines if a document contains a specific item.

Overview

This procedure determines if a document contains a specific item (text, table, etc.). When checking for tables, it performs additional processing to identify table structures with specific confidence thresholds.

Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

if the document contains {"text" | the table} then

What does it do?

Checks if the document contains the specified text.

Where does it go?

This phrase should be written on a new line.

Is it required?

✅ Yes — This phrase is required.

Does it require data?

✅ Yes — Either replace text with the text to search for in the document or use the table to search for a table in the document. If searching for a table, a reference to the table must be previously defined with specific column criteria. You can specify specific columns to search for by using the table whose column contains "column-name" and replacing column-name with the name of the column. See the examples below for more details.

Examples

1. Check if Document Contains Text

This example checks if the document contains specific text content.

get the file as a scanned document
if the document contains "important notice" then
    # perform actions when text is found

2. Check if Document Contains Table

This example checks if the document contains a table structure.

get the file as a scanned document
if the document contains the table then
    # perform actions when table is found

3. Check for Sensitive Information

This example checks if the document contains sensitive information.

get the file as a scanned document
if the document contains "social security number" then
    # handle sensitive information processing

Last updated

Was this helpful?