Use the Ingest Content action in the Aisera package to upload a file to an Aisera data source so the content is indexed and available for retrieval in your automations.

Prerequisites

  • You must have the Bot Creator role to use the Aisera: Ingest Content action in a bot.
  • A Control Room OAuth connection must be configured and available in your Automation Anywhere Control Room.
  • You must have the Aisera tenant base URL for content ingestion. For example, https://<your-tenant>.api.aisera.cloud.
  • You must have the authorization token for the data source or Aisera GPT App you want to ingest the file into. To get this token, open the App details page in your Aisera tenant, navigate to Data Source, double-click the data source you want to use, and copy the Token value from the data source details page.
  • You must have a file to upload and a unique identifier for it. The unique file identifier is a stable reference: reusing the same identifier in a subsequent ingest request updates or replaces the previously indexed content for that identifier.

The Ingest Content action sends a multipart HTTP request to the Aisera ingestion API to upload a file to the specified data source. After Aisera indexes the file, the content becomes available for retrieval by the Ask Question of Content action. To update previously indexed content, use the same unique file identifier in a subsequent ingestion request.

Procedure

  1. In the Automation Anywhere Control Room, navigate to the Actions pane, select Aisera, drag Ingest Content, and place it in the canvas.
  2. Enter or select the following fields:

    1. In the Connection field, select the Control Room OAuth connection to use for authentication.
    2. Enter the Base URL. This is the Aisera tenant base URL for content ingestion. For example, https://<your-tenant>.api.aisera.cloud.
    3. Enter the Data source token. This is the authorization token for the data source or Aisera GPT App you want to ingest content into.
    4. Select the File to upload. For a list of supported file types, see Aisera package.
      Important: The file picker does not filter by supported file type. If you select an unsupported file type, the Aisera API returns an error. Use the Error output variable in your automation to capture and handle the error message.
    5. Enter a Unique file ID. This identifier maps the uploaded file to its indexed content in Aisera. If you use the same identifier in a later ingest request, Aisera updates or replaces the previously indexed content for that identifier.
      Important: The Unique file ID field cannot be empty. The action fails if this field is left blank.
    6. (Optional) Enter a File name. If you leave this field empty, the action uses the actual name of the selected file.
    7. (Optional) Enter the Mime type of the file. If you leave this field empty, the action detects the MIME type automatically.
  3. In the Output section, assign a Dictionary variable to store the response. The variable contains the following keys:
    Key Type Description
    trackingId String The tracking ID returned by the Aisera API for the ingest request. Use this value to monitor the status of the indexing job.
    warn String A warning message returned by the Aisera API, if any.
    error String An error message returned by the Aisera API if the request failed.
    success Boolean true if the file was uploaded successfully; false if the upload failed.
  4. Click Run to start the bot. Check the success key in the output variable to confirm the file uploaded. If success is false, read the error key for the error message returned by the Aisera API.

If the upload is successful, success is true and trackingId contains the Aisera job identifier. Aisera indexes the file asynchronously; the content becomes available for retrieval after indexing completes.

If the upload fails, success is false. Common causes include:

  • An unsupported file type was selected.
  • The Unique file ID field is empty.
  • The OAuth connection is not configured or has expired.
  • The base URL or data source token is incorrect.
  • The file cannot be read as a stream and the local file path is empty or the file does not exist at that path.

Next steps

After the file is indexed, you can query the ingested content using the Ask Question of Content action. See Ask Question of Content action.