> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Create Automation Output Processor

POST https://{tenant_name}.benchling.com/api/v2/automation-output-processors
Content-Type: application/json

Create Automation Output Processor

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/lab-automation/create-automation-output-processor

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an AutomationOutputProcessorCreate.

- `assayRunId` (string, required)
- `automationFileConfigName` (string, required)
- `fileId` (string, required) — The ID of a blob link or the API ID of a file to process.
- `completeWithErrors` (boolean, optional) — Specifies whether file processing should complete with errors. False means any error in output file processing will result in no actions being committed. True means that if row-level errors occur, then failing rows and their errors will be saved to errorFile, and actions from successful rows will be committed.
- `folderId` (string, optional) — The API ID of the folder to set for the automation output file. Folder items created by the correpsonding output processor will be created in this folder.
- `locationId` (string, optional) — The API ID of the location to set for the automation output file. Storable items created by the correpsonding output processor will be created at this location.
- `timezone` (string, optional) — The timezone to set for the automation output file. Used as the timezone for the timestamp fields if not set in the timestamp.

## Response

### 201

Created

- `assayRunId` (string, optional)
- `automationFileConfig` (AutomationOutputProcessorAutomationFileConfig, optional)
- `file` (Blob, optional, nullable)
- `id` (string, optional)
- `status` (enum, optional)
  - Allowed values: `SUCCEEDED`, `FAILED`, `NOT_STARTED`, `RUNNING`
- `apiURL` (string, optional) — The canonical url of the Automation Output Processor in the API.
- `archiveRecord` (ArchiveRecord, optional, nullable)
- `completeWithErrors` (boolean, optional) — Specifies whether file processing should complete with errors. False means any error in output file processing will result in no actions being committed. True means that if row-level errors occur, then failing rows and their errors will be saved to errorFile, and actions from successful rows will be committed.
- `createdAt` (datetime, optional) — DateTime the Automation Output Processor was created
- `errorFile` (Blob, optional, nullable)
- `modifiedAt` (datetime, optional) — DateTime the Automation Output Processor was last modified
- `progressStats` (AutomationProgressStats, optional) — Processing progress information.
- `transforms` (list of LabAutomationTransform, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### AutomationOutputProcessorAutomationFileConfig

- `name` (string, optional)

### Blob

- `id` (string, optional) — The universally unique identifier (UUID) for the blob.
- `mimeType` (string, optional) — eg. application/jpeg
- `name` (string, optional) — Name of the blob
- `type` (enum, optional) — One of RAW_FILE or VISUALIZATION. If VISUALIZATION, the blob may be displayed as an image preview.
  - Allowed values: `RAW_FILE`, `VISUALIZATION`
- `uploadStatus` (enum, optional)
  - Allowed values: `IN_PROGRESS`, `COMPLETE`, `ABORTED`

### ArchiveRecord

- `reason` (string, optional)

### AutomationProgressStats

Processing progress information.

- `rowsFailed` (integer, optional)
- `rowsSucceeded` (integer, optional)
- `rowsUnprocessed` (integer, optional)

### LabAutomationTransform

- `apiURL` (string, optional) — The canonical url of the transform in the API.
- `blobId` (string, optional, nullable)
- `customTransformId` (string, optional, nullable)
- `errors` (LabAutomationBenchlingAppErrors, optional)
- `id` (string, optional)
- `inputGeneratorId` (string, optional, nullable)
- `modifiedAt` (datetime, optional) — DateTime the transform was last modified.
- `outputProcessorId` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `NOT_STARTED`, `RUNNING`, `FAILED`, `SUCCEEDED`

### BadRequestErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)

### LabAutomationBenchlingAppErrors

- `topLevelErrors` (list of LabAutomationBenchlingAppErrorsTopLevelErrorsItems, optional)

### LabAutomationBenchlingAppErrorsTopLevelErrorsItems

- `errorMessage` (string, optional)

## Examples

**Request**

```json
{
  "assayRunId": "string",
  "automationFileConfigName": "string",
  "fileId": "cd624536-c6ba-41b9-b802-9461689e2ea3 or file_65Cevxgm"
}
```

**Response**

```json
{
  "assayRunId": "588aca02-1a20-4b94-a40f-b3f3a0081749",
  "automationFileConfig": {
    "name": "MyInstrumentName"
  },
  "file": {
    "id": "c33fe52d-fe6a-4c98-adcd-211bdf6778f7",
    "mimeType": "text/csv",
    "name": "MyInstrumentInputFile.csv",
    "type": "RAW_FILE",
    "uploadStatus": "IN_PROGRESS"
  },
  "id": "aop_C3wGA9HF",
  "status": "SUCCEEDED",
  "apiURL": "https://benchling.com/api/v2/automation-output-processors/aop_C3wGA9HF",
  "archiveRecord": {
    "reason": "Made in error"
  },
  "completeWithErrors": true,
  "createdAt": "2024-01-15T09:30:00Z",
  "errorFile": {
    "id": "c33fe52d-fe6a-4c98-adcd-211bdf6778f7",
    "mimeType": "text/csv",
    "name": "MyInstrumentInputFile.csv",
    "type": "RAW_FILE",
    "uploadStatus": "IN_PROGRESS"
  },
  "modifiedAt": "2024-01-15T09:30:00Z",
  "progressStats": {
    "rowsFailed": 1,
    "rowsSucceeded": 1,
    "rowsUnprocessed": 1
  },
  "transforms": [
    {
      "apiURL": "string",
      "blobId": "string",
      "customTransformId": "string",
      "errors": {
        "topLevelErrors": [
          {
            "errorMessage": "string"
          }
        ]
      },
      "id": "string",
      "inputGeneratorId": "string",
      "modifiedAt": "2024-01-15T09:30:00Z",
      "outputProcessorId": "string",
      "status": "NOT_STARTED"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/automation-output-processors"

payload = {
    "assayRunId": "string",
    "automationFileConfigName": "string",
    "fileId": "cd624536-c6ba-41b9-b802-9461689e2ea3 or file_65Cevxgm"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/automation-output-processors';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"assayRunId":"string","automationFileConfigName":"string","fileId":"cd624536-c6ba-41b9-b802-9461689e2ea3 or file_65Cevxgm"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```