Skip to main content

Retool AI document actions

Learn how to convert documents to text with Retool AI.

You can use the Retool AI resource to parse PDF documents and extract the text for use elsewhere. Unlike other AI actions, Retool parses the PDF directly—no files or text are sent to an AI model.

Get started

To get started with AI actions for apps, add a new AI Action query.

Convert document to text

Use the Convert document to text action to extract the text content from a PDF file and return it as text. This is useful if you need to include content from PDF documents for use in other AI actions.

You specify an input component for files, such as File Input or File Button, or reference a file from another source using {{ }} notation (e.g., a file retrieved from an Amazon S3 bucket).

  1. Select the Convert document to text action.
  2. Specify the file to use in the File source field.
  3. Click Save and then Run to perform the action.

Retool parses the PDF file and returns the extracted text. The response is available at {{ query.data }}.