Zuva Power Automate Connector
Introduction
The Zuva Power Platform Connector allows you to easily integrate Zuva’s machine learning technology into your Power Automate flows.
Prerequisites
You will need a Zuva account and an API token. Get started by signing up for a free account.
You will also need a Microsoft account and Power Automate licence.
How to get credentials
Zuva has multiple regional servers. You will need to create an API token for the specific region that you wish to use.
- Create and/or sign into your account at zuva.ai.
- Navigate to the API console
- Select the region you would like to use.
- Copy the base URL for the region to your connection.
- Create a token and copy it to use in your connection.
See the API quickstart guide for more information about Zuva accounts and tokens.
Get started with your connector
To use the Zuva API connector, you can create a flow similar to the following:
Step 1: Obtain a file
For testing purposes, you can create an “Instant cloud flow” in Power Automate. Choose “Manually trigger a flow” and create the flow. Add an input, and choose the “File” type.
Step 2: Submit a file
Add a new action to your flow and start typing “Zuva” into the search box. You should see the Zuva connector and all of it’s actions appear.
Add the Submit a file
action, and choose the “File Content” from the previous step as the input.
Note: the file should not be transformed in any way (i.e, no base64 encoding). Zuva only accepts raw binary data.
Step 3: Start processing the file
Choose which service you’d like to use by adding one of the following actions:
Create Language Classification Request
Create Document Classification Request
Create Multi-Level Classification Request
Create Field Extraction Request
Create OCR Request
Each of these accepts the file ID (returned from the Submit a file
action) as input.
The field extraction additionally requires field IDs as inputs. Field IDs can be found in the Field Library
(sign-in required), from AI trainer if you have trained custom fields, or programmatically using the Get Field List
action.
Step 4: Poll for completion of the request
Use a Do Until
block (found in the “Control” section), and add the correct status check action to the inside of the block:
Get Field Extraction Request Status
Get Language Classification Request Status
Get Document Classification Request Status
Get MLC request Status
Get OCR Request Status
The Get ____ status
action takes as input the request ID from its corresponding Create ____ Request
action.
You should also add a 10 second Delay
block inside the Do until
block, to ensure that the file has sufficient time to process.
Set the condition for the Do Until
block to Is Finished?
is equal to true
.
Step 4: Get results
Finally, use one of the Get results Action corresponding to your request, using the Request ID from the original Create operation as input:
Get Field Extraction Request Text Results
Get Language Classification Request Status
Get Document Classification Request Status
Get MLC request Status
Get OCR Results Text
Get OCR Results Images
Note that for Language, Document Classification and MLC, the results are included in the Status response.
You may wish to check the Zuva documentation for more information about the structure of field extraction results.
Example flow
The following flow takes in a file, extracts a single field from it and sends an email with the raw JSON results.
Known issues and limitations
Fields per request
A maximum of 100 fields may be included in a single Create Field Extraction Request
action.
Custom fields
The connector does not support any of Zuva’s API endpoints related to training custom fields or getting an individual field’s metadata.
Differences with underlying API
Additionally, please note that connector functionality does not correspond one-to-one with the documentation for the underlying API. In particular, the connector:
- Exposes an extra
is_finished
boolean, which can be used to tell if the request is either complete or failed - All requests operate on single files, rather than batches of multiple files.
Common errors and remedies
Be sure to upload raw binary, rather than base64-encoded strings. You can use the OCR service and check that it returns the expected text.
On This Page