Using the Extract action for Google Document AI
Configure the Extract action to enable your bot to send documents to Google Document AI for data extraction and retrieve the output in JSON format.
Login to your Google Cloud account and go to the Processors page to retrieve your custom endpoint. See Use your processor endpoint.
Your custom endpoint should follow this format:
You will need the parameters in bold to configure this action.
- Double-click or drag the action.
In the Document file path field, provide the file path
to the document you want to process.
注： If using this action within a Loop action to process all the documents in a folder, be sure to include a period between the variable holding the file name and the one holding the extension. For example, C:\Documents\$dictFile(name)$.$dictFile(extension)$.
Provide the following information, which is found in your custom
- Project id
- Processor id
- In the Session name field, enter the name of the session you used to connect to the Google service account in the Connect action.
Select or create a string variable to hold the output.
The action returns data in JSON format.
- Click Save.
- Initiate the JSON session with the Start session action. In the JSON text field, insert the string variable holding the output of the Extract action.
- Use the Get node value
action to parse the output of the
action and assign the node values to a list variable.
You can insert a Loop action after the Get node value action to iterate through each list item to perform an operation on each node value.
- Terminate the JSON session with the End session action.