What this action does
Sends a document from your storage to the CloudFiles AI engine with a prompt, and returns structured output for use in later flow steps — extraction, classification, checklist validation. The document never leaves your storage permanently; processing is transient.
Input parameters
| Parameter | Description | |
|---|---|---|
Resource IDString |
required | The document to process. Get it from the widget, ⚡ Get Folder Contents, or a ⚡ File Uploaded event. |
PromptString |
required | What to extract or decide, e.g. Extract invoice number, total, and due date. See Precision Prompting for patterns. |
Output FormatPicklist |
optional | json (default) · csv · text. JSON output maps cleanly to flow variables. |
Output parameters
| Parameter | Description | |
|---|---|---|
AI ResponseString |
The model output in the requested format. | |
Credits UsedInteger |
AI credits consumed by this call. |
AI credits
△
Requires Document AIThis action needs an active Document AI subscription and consumes AI credits per call — see the credits FAQ. Flows calling it fail with a 403 if the product isn’t licensed (same pattern as the workflow 403).
// Apex equivalent Types.ProcessDocumentPayload p = new Types.ProcessDocumentPayload(); p.resourceId = '01DEF'; p.prompt = 'Extract invoice number, total, and due date'; String out = Client.processDocumentUsingAI(p, null);
