---
schema_version: "1"
id: b6e1bb133894e9be7c7b1e1367daee0add96eccaddefd45280198b19e1305fa3
title: Processing Documents and Retrieving Results With RPA
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/idp/automate-document-processing-with-rpa.md
canonical_url: https://docs.mulesoft.com/idp/automate-document-processing-with-rpa
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 4547a5d13803904677f158caa8cb6b37aff624e5cddf3cfd9ab0c0ea5ededd9a
description: MuleSoft Documentation Site
latest: true
---
---
product: IDP
---

# Processing Documents and Retrieving Results With RPA

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

You can execute your published document actions with MuleSoft RPA by using the Submit Document to
MuleSoft IDP and Retrieve Results from MuleSoft IDP action steps in your automation projects. After
you publish a document action to Anypoint Exchange, it becomes available for consumption in RPA. You
must create a connected app and obtain the access token before you can use the IDP action steps in
RPA.

If you aren’t using RPA to execute your document actions, configure and call the IDP API, as
described in
[Processing Documents and Retrieving Results With the API](https://docs.mulesoft.com/idp/automate-document-processing-with-the-idp-api).

## Before You Begin

Ensure you have the following Anypoint permissions:

Execute Published Actions

Enables a user to execute a published document action and retrieve the results of the execution.

## Create a Connected App

To communicate with the IDP API, create a connected app with the following details:

- Type: `App acts on its own behalf (client credentials)`

- Scopes: `Execute Published Actions`

After you create the connected app, copy its **ID** and **Secret** for further use.

For more information, see
[Connected Apps in Anypoint Platform](https://docs.mulesoft.com/access-management/connected-apps-overview).

## Execute the Published Document Actions

To execute the published document actions, use the Submit Document to MuleSoft IDP action step in
RPA. This action step enables you to browse through your published document actions and execute them
by providing an Execution ID and the path to the file to process. Use the Execution ID when
configuring the Retrieve Results from MuleSoft IDP action step to pull the results from the
execution.

When you query a published document action, IDP uses the model selected in each prompt to extract
the data for the corresponding field.

The Submit Document to MuleSoft IDP action step executes document actions by impersonating a user in
your organization. Therefore, you must use authentication credentials of a user that has the Execute
Published Actions permission in Anypoint Platform.

See
[Submit Document to MuleSoft IDP](https://docs.mulesoft.com/rpa-builder/latest/toolbox-mulesoft-idp-submit-document-to-mulesoft-idp)
for configuration details.

## Retrieve the Results of the Execution

To retrieve the results of a document action execution, use the Retrieve Results from MuleSoft IDP
action step in RPA. This action step enables you to query the results of a document action execution
by providing an Execution ID that you used before in the corresponding Submit Document to MuleSoft
IDP execution.

When you query a published document action, IDP uses the model selected in each prompt to extract
the data for the corresponding field.

See
[Retrieve Results from MuleSoft IDP](https://docs.mulesoft.com/rpa-builder/latest/toolbox-mulesoft-idp-retrieve-results-from-mulesoft-idp)
for configuration details.

## See Also

- [Analyzing Documents Using Pre-Built Schemas](https://docs.mulesoft.com/idp/creating-document-actions)

- [Publishing Document Actions](https://docs.mulesoft.com/idp/publishing-document-actions)
