Process Document using AI
The Process Document Flow action is a specialized feature that converts documents and related forms into digitized formats. This includes extracting data into a machine-readable format that can be utilized by other features for further data processing. By providing the context and destination parameters for the document, the feature ensures optimal document location and efficient data extraction.
The Process Document action requires the following parameters -
- Context - used to specify the document's destination more precisely
- File ID - ID of the document to be processed
- Destination parameters - Various parameters that specify where the folder must be created
This action gives the following output parameters -
- Processed Document IDs - Document IDs of the files processed
- Context - For retrieving accurate path details
In this article we will dive into the details of the input & output parameters.
The flow action Process Document using AI triggers a platform event upon completing the document processing. To retrieve the event, set the condition "Triggering cldfs_CloudFiles_Event_e > Type" equal to "document-processed" Then, use Get Event Details to obtain the processed document ID, which can be used in future features.
In your Flow Builder, search for the element named "CloudFiles: Process Document using AI". You can find this action in the CloudFiles category when you click on the "Action" element in the "Add Element" box. Select the action to insert it into the flow, and then configure the input parameters. Here is a list of all input parameters with a summary. For details, check out the individual sections below -
- Context: Pass the record ID of the document.
- Drive ID: Input the Drive ID of the document to be processed.
- File ID: Enter the ID of the file or folder.
- Library: Specify one of the following options: SharePoint, Google, OneDrive, Dropbox, Box, CloudFiles, or retrieve it from Get Event Details.
The Context parameter is used to specify the document's destination more precisely. You can either directly denote the destination or use Outputs from Get Event Details > Uploaded File Details > RecordId for this purpose.
The cloud storages like google drive, sharepoint etc… offer multiple 'drives' where documents can be uploaded. Drive ID can be copied form the metadata dialog as shown below.
Alternatively, use the output value of “Get Event Details > Uploaded File Details > DriveId” as it retrieves the uploaded file's details.
This is the ID of the document to be processed. You can obtain it from “Outputs from Get Event Details > Uploaded File Details > Id”.
This parameter specifies the desired cloud-based drive where you wish to create the folder. This is a simple text field where you can enter one of the following options like sharepoint, google, onedrive, cloudfiles (for AWS S3). Alternatively, you can use the output value from “Get Event Details” by using “Get Event Details > Uploaded File Details > Library”.
The output of this action processes a document and triggers a platform event, which can be retrieved using the "document-processed" event. Through this event, you can obtain the "processed document IDs" or the "context." This enables precise tracking and management of processed documents, ensuring that you can efficiently locate and utilize the generated documents within your workflows.
This is used as an input value for the query document flow action, allowing it to pass the query to the aforementioned document.
This parameter helps in retrieving accurate path details.