This document explains how to integrate with Alibaba Cloud EventBridge. By subscribing to docmind events, you can receive push notifications for file parsing results. When a file is parsed successfully, the docmind service automatically invokes a pre-configured event target, which eliminates the need to poll for results and reduces costs.
Deployment and verification
-
Log in to the EventBridge console and activate the service.
-
In the left-side navigation pane, choose Event Buses. Click the
defaultbus to open its details page.
-
Choose Event Rules and click Create Rule to configure its basic information.
On the basic information configuration page, for Name, enter docmind_event. For Description, enter Listen for file parsing results from the docmind service. Then, click Next.
-
Configure the event pattern. For Event source, search for and select
acs.docmind. Then, select the event types based on your needs.
Document conversion APIs. These APIs support conversions such as PDF to Word, image to Word, PDF to Excel, image to Excel, PDF to image, and image to PDF.
-
docmind:docConvert:TaskFailedCompleted: The document conversion task failed. -
docmind:docConvert:TaskSuccessCompleted: The document conversion task succeeded.
Document parsing (large model edition) APIs
-
docmind:docParser:TaskFailedCompleted: The document parsing (large model edition) task failed. -
docmind:docParser:TaskSuccessCompleted: The document parsing (large model edition) task succeeded.
Intelligent document parsing APIs.
-
docmind:docStructure:TaskFailedCompleted: The intelligent document parsing task failed. -
docmind:docStructure:TaskSuccessCompleted: The intelligent document parsing task succeeded.
-
Add one or more event targets as needed.
This example uses DingTalk for notifications. For Service type, select DingTalk acs.dingtalk. In the URL field, enter your DingTalk bot's Webhook URL. In the Secret key field, enter your secret key, which starts with SEC. In the Push content variable editor, configure a JSON variable template, such as {"requestId": "$.data.requestId"}. Click Confirm to save the event target.