Deploying apps

Commercial & Enterprise

Deployments transform your apps into production-scale automation workflows that connect to your business systems. You can configure automated processing that pulls documents from upstream sources like email or cloud storage, implement human review workflows for quality assurance, and send processed results to downstream systems like databases or notification endpoints.

Creating deployments

Deployments let you configure an app to run at scale with automation, integration, and human review.

  1. In Workspaces, select the Deploy tab, then click Add deployment.

  2. Specify options for your deployment, then click Save.

    • Name — Specify a unique name to help users differentiate the deployment across all workspaces they have access to.

    • Description — Specify an optional description for the deployment.

    • App — Select the app and app version that you want to run at scale for this deployment. Available apps include all apps that are accessible to you, whether prebuilt, shared within your organization, or created by you.

    • Workspace — Select the workspace where you want to run the deployment and store run results. If you enable reviews, only members of this workspace can review results.

    • Runtime configurations — If the selected app includes custom or secret keys, specify runtime values for the keys. You can’t delete keys or modify key names or types specified in the app, but you can add new keys for use in deployment integrations.

    • Integrations — Configure pre- and post-processing options, either pulling file or folders from upstream systems or sending results to downstream systems. For details, see Configuring integrations.

    • Notifications — Configure email or webhook notifications when runs start, complete, fail, or when items are queued for review. For details, see Configuring notifications.

    • Review — To manually verify results that fail validation, enable human review, then select a review strategy.

      • Review by file — Sends only files that fail validation for human review, and assigns reviews by file.

      • Review by run — Sends entire runs for human review if any file fails validation, and assigns reviews by run.

      Enterprise Enterprise organizations can configure additional review options:

      • Review queue — Assign a group within the deployment workspace to conduct initial reviews. You can select whether reviews are assigned manually or round robin, with reviews assigned to group members in turn. If you select round robin assignment, admins and managers are excluded from reviews by default, but you can optionally include them.

      • Escalation queue — Assign a group within the deployment workspace to review files flagged for further evaluation. Like review queues, you can select assignment method and optionally include admins and managers in reviews.

        Queue options aren’t available in personal workspaces.
      • Service-level agreement — Specify efficiency targets for human review in minutes, hours, or days. Timing begins when a deployment run begins, and the SLA is satisfied on a given file when it’s marked as reviewed. The Review tab indicates time remaining against the SLA to help reviewers prioritize.

    • Data retention — To automatically delete future deployment runs on a specified cadence, enable automatic run cleanup. Specify how long to keep run data (default 90 days) and indicate whether to delete source files.

Configuring integrations

Use integrations to pull files or folder contents from upstream systems for processing or to send results to downstream systems.

Google Drive isn’t supported for upstream or downstream integrations.

Upstream integrations

  • Connected drive — Pull files or folders from a connected drive directory on a set schedule or any time new contents are detected. When you add a connected drive as a new integration, all existing contents are processed. If the integration runs when new files are detected, the drive is checked for new content every 3 minutes.

    Each file or folder is processed as a single run.

    Contents are copied from the selected directory to a parallel processing folder in your default drive that’s created to manage file handling. By default, the input folder is cleared when processing begins. For scheduled runs, you can opt to retain contents in the connected drive to address certain advanced use cases, but be aware that this can trigger duplicate runs.

  • Connected mailbox — Pull files from a connected mailbox on a set schedule. When you add a connected mailbox as a new integration, it processes existing emails received after a specified start date. If no date is specified, it processes emails from one schedule interval ago. For example, if the integration is scheduled to run daily, it begins processing emails from one day ago.

    Use integration configuration options to limit input to specified comma-separated values. For example, depending on mailbox type, you can pull emails based on header details (from, to, subject) or key words (contains). When using more than one filter field, fields are combined with AND logic, while multiple values within a filter are combined with OR logic.

    By default, email attachments are treated as separate files, but you can disable Process attachments to exclude them. Inline images are treated as part of the email body.

Downstream integrations

Results are sent only after required reviews are closed. During configuration, you can test the connection by sending results from a previous app run to your downstream integration.

  • Email — Send results to an email address in CSV, XLSX, or JSON format. In projects with classes, separate CSV files are generated for each class.

  • Connected drive — Send results in CSV, XLSX, or JSON format to a connected drive. In projects with classes, separate CSV files are generated for each class.

  • Custom function — Send results in JSON format using a custom Python function.

Integration function

For advanced integrations, you can write a custom integration function in Python.

For example, you might use an integration function to send results to a webhook:

1import requests
2
3# Construct a list of records information
4concise_records = []
5for record in results['records']:
6 concise_record = {
7 "fields": record.get("results"), # Note: This might be intended to be "fields" or a similar key
8 "classification_label": record.get("classification_label"),
9 "record_index": record.get("record_index")
10 }
11 concise_records.append(concise_record)
12
13# Post endpoint call template
14url = "https://example.com/my_own_webhook"
15response = requests.post(url, json=concise_records)
16if response.status_code == 200:
17 print("POST request successful")
18else:
19 print(f"POST request failed with status code {response.status_code}")
20 return None

Integration functions accept these parameters:

ParameterRequired?Description
resultsRequiredResults of the app run in JSON format. Individual documents within the app run are exported as records[0].results.
keysOptionalAccess runtime configurations and secrets. Use keys['custom']['<key-name>'] for custom values and keys['secret']['<key-name>'] for org-defined secrets.

For additional guidance about custom functions, see Writing custom functions.

Configuring notifications

Notifications inform you when a deployment run starts, completes, fails, or when items are queued for review.

Runs are considered complete when they finish processing without requiring review, or when runs with required reviews are closed.

Supported notifications include:

  • Email — Send a rich text notification to specified email addresses when runs reach designated checkpoints. Messages include a link to access run results or reviews, as applicable. You can preview and test notification emails, but you can’t change the subject or content of messages.

  • Webhook — Send HTTP POST requests to a specified endpoint URL when runs reach designated checkpoints. Payloads contain event details like timestamp, run ID, status, and contextual information. You can add custom headers, preview the payload format, and send test notifications to validate the integration.

Running deployments

While deployments are most beneficial when automated with upstream integrations, you can run them on demand if necessary.

  1. In Workspaces, select the Deploy tab, then click the name of the deployment you want to run.

  2. Click Run deployment.

  3. If the deployment includes custom or secret keys, specify runtime values for the keys in the Advanced settings section as needed.

    You can use the runtime values specified in the deployment as-is, or you can override the values by entering a different value.
  4. Select files to process.

  5. Click Run.

    When the run completes, click the run ID to view results.