Document Processed
This event is published once a file is processed by CloudFiles Document AI using Process Document using AI action.
This event is particularly useful in scenarios where the processing of Resources needs to initiate downstream processes or workflows containing actions like Query Document or Query Document (Batch).
To use CloudFiles Events, you must first setup your flow as shown in the Intercepting CloudFiles Events article. This article will introduce you to the concepts of the event type as well as event details that are returned by the Get Event Details flow action.
Once you are familiar with these, you will understand how to interpret & use these as illustrated in the sections below.

Please use document-processed as the type filter when selecting this event in the decision element in flow builder.
Refer to the image below for a list of outputs-


1 - ProcessedDocumentID
The Processed Document ID is a unique CloudFiles identifier that represents the data of a processed document. The ProcessedDocumentID can be reused as often as needed to reference the document for various CloudFiles Document AI actions.
The ProcessedDocumentID is a mandatory input parameter for actions like Query Document or Query Document (Batch).

2 - Context
The context value specified in the input, which helps identify the event’s source or any other intended details.
3 - File
Details of the processed file specified in the input, which helps identify the file post processing.

- If the processed File is a Salesforce File, then:
- Output File's Library will be salesforce.
- Output File's Id will be ContentDocumentId of the Salesforce File.
- If an External Storage's File is processed, then the file's metadata is output.