---
schema_version: "1"
id: d527fb4b9d75c91448fce16d4c988330c8928a649618873432124172980a5c21
title: Queries with AWS
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/6.6/toolbox-aws-operations-queries-with-aws.md
canonical_url: https://docs.mulesoft.com/rpa-builder/6.6/toolbox-aws-operations-queries-with-aws
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3da88bef1ab940d6eb8a33aa1f315b94fe019e8c98d787bdfbfb37bd7505d4eb
description: MuleSoft Documentation Site
release: "6.6"
latest: false
---
---
product: RPA Builder
version: 6.6
---

# Queries with AWS

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

The Queries with AWS Action Step enables you to extract specific data from a document by specifying
queries in natural language so that the response contains the data you need, without having to apply
further filtering on the JSON output to get the relevant values.

For example, if you are processing a credit card statement, you can specify queries such as:

- "What is the customer name?"

- "What is the credit card company name?"

- "What is the account number?"

- "What is the payment due date?"

This action step processes the document in a synchronous fashion (Amazon does not store the
document) and automatically converts PDF files to PNG images. You can adjust the fidelity of the
conversion in the properties grid.

## Inbound Variables

- **Alias text**

- **Query text**

- **Directory Path**

- **File Name**

- **Password**

- **Read text from page**

- **Read text to page**

- **AWS Credentials**

  Or, if **Use custom settings** is selected in the wizard:

  - **Client Id**

  - **Client Secret**

  - **Session Token**

  - **Use Session Token**

  - **Region Endpoint**

- **Json Path**

## Outbound Variables

- **Raw Json**

  The complete AWS response

- **Normalized Json**

  The parsed result based on the normalized result and defined Json path

- **First answer**

  A string containing the first result based on the specified query

- **All answers**

  An array containing all results received as a response to the specified query

- **Answers count**

  The number of matching answers to the specified query

- **Confidence first answer**

  The confidence value of the first result as a floating point number.

## Wizard

![50%](/mulesoft/current/en-us/rpa-builder/6.6/_images/queries-with-aws-wizard.png)

- **Authentication Settings**

  The AWS credentials to use for authentication

  - **Pin credentials**

    Use this option to reference an existing **Credentials for AWS** configuration.

  - **Use custom settings**

    Use this option to manually specify an AWS **Cliend ID**, **Client Secret**, **Region
    Endpoint**, and **Session Token** for this action step.

- **Response settings**

  - **JsonPath Expression**

    The Json path to the property of the response object

- **File Settings**

  - **Directory path**

    The path to the directory where the file is located

  - **File name**

    The name of the file to analyze. Supported file types: PDF, JPEG, and PNG

- **PDF Settings**

  These settings show when the selected file is a PDF.

  - **Automatically detect the best quality for conversion**

    Disable this option to manually adjust the image quality.

  - **Image Quality**

    Specifies the quality of the image created from the PDF. The value ranges from `10` (lowest
    quality) to `100` (highest quality).

    This property is not available in the Wizard.

  - **PDF file is password protected**

    Specifies if the selected PDF file is password protected. When selected, specify the password to
    open the file in the **Password to open PDF file** filed.

  - **Read entire file**

    Instructs the service to read the entire file.

  - **Read page range**

    Instructs the service to read the selected range of pages.

    - **From page**

      Specify from which page the service starts reading the file.

    - **To page**

      Specifies until which page the service reads the file.

    - **Read to end of file**

      Instructs the service to continue reading until the end of the file.

- **Query Settings**

  - **Query text**

    Specifies the query to extract the data from the document

    The maximum length for this field is 200 characters.

  - **Alias text**

    Specifies an alias for the query, for ease of location

    The maximum length allowed for this field is 200 characters.

  - **The query results in…​ otherwise the action step results is…​**

    Specifies the behavior of the Action Step based on the result

    The first dropdown menu enables you to select the expected result of the query: **a single
    answer**, **one or more results**, or **multiple results**. If this selection matches the query
    result, the Action Step finishes successfully. When the expected result does not match the
    actual result from the query, the Action Step results either in **a warning** or **an error**,
    depending on the value configured in the second dropdown menu.

- **Analyze Query**

  Enables you to test the configured query and see the results in the Wizard

## See Also

- [Credentials for AWS](https://docs.mulesoft.com/rpa-builder/6.6/toolbox-aws-operations-credentials-for-aws)

- [Amazon Textract: Best Practices for Queries](https://docs.aws.amazon.com/en_us/textract/latest/dg/bestqueries.html)

- [Building JSONPath Expressions](https://docs.mulesoft.com/rpa-builder/6.6/building-jsonpath-expressions)
