Webinar: Automating Your Simpro AP with EzzyBills – Recording

Skip to main content

EzzyBills User Guide

04. Automation with AI Extract

Overview

AI Extract is a powerful automation feature that enables you to extract information from various file types, including PDFs, image files, Word documents, and plain text files. This feature is especially useful for converting unstructured data into structured formats that can be used in automated workflows.

Getting Started

To use AI Extract, follow these steps:

  1. Describe Your Extraction Goal
    In the prompt field, describe the data you wish to extract. Be clear and specific.
  2. Upload Your File
    Upload the relevant document—this can be a PDF, image, Word document, or text file.
  3. Generate the Result
    Click the Generate Result button to let AI Extract process your file.
  4. Review and Publish
    If you are satisfied with the result, click the Publish button. Please note that publishing may take several minutes. Once published, the extraction task will be added to your task list, and you can incorporate it into your workflow.

AI Extract

Output

Default and Generic Extraction

By default, AI Extract is optimized for business documents such as invoices and purchase orders. However, for generic or custom data extraction, you prepend your prompt with the keyword: ‘generic extract’

Structuring the Output for Workflow Integration

To enable the extracted data to be used in subsequent workflow tasks, the output must be structured—typically in JSON format.

In this example all the ingredients are saved into the ‘ingredients’ field and ‘ingredients’ field is an array of strings.

Using Extracted Data in Subsequent Tasks

Once the AI Extract task is published:

  1. Create a Follow-Up AI Task
    Define a new AI task that processes the structured output from the extract.
  2. Example Follow-Up Prompt:
get the AI Extract result, 
The ai result contains a field 'ingredients' which is an array of string.
iterate through the ingredients and create a table that contains a description, quantity and unit price.
set the description equal to the ingredients, quantity=1 1 and unit price equal to 10
Then save the table.

Heres the generated code:
void calc_func()
{
var aiResultJson = getAIResult();
var aiResult = JsonConvert.DeserializeObject<AIResult>(aiResultJson);

var invoiceRows = new List<InvoiceRow>();
foreach (var ingredient in aiResult.ingredients)
{
var row = new InvoiceRow
{
description = ingredient,
quantity = 1,
unit_price = 10
};
invoiceRows.Add(row);
}

saveInvoiceTable(invoiceRows);
completeTask(); return;
}

public void getAIResult(){}
public void saveInvoiceTable(){}
public void completeTask(){}
  1. Publish and Integrate
    Publish the follow-up task and add both tasks to your workflow.

End-to-End Example

When you upload a document such as recipe.png to the workflow:

  • Step 1: AI Extract retrieves the list of ingredients.
  • Step 2: The follow-up task formats these into a structured table.
  • Result: EzzyBills automatically creates a table with the specified format based on your input document.
Sections of Article