# Attach Document

> Perform Attach Document through Odoo.

Source: [https://genhealth.ai/docs/workflows/integrations/odoo/odoo_attach_document](https://genhealth.ai/docs/workflows/integrations/odoo/odoo_attach_document)

Integration: [Odoo](https://genhealth.ai/docs/workflows/integrations/odoo.md)

- Handler: `odoo_attach_document`

- Connection type: `odoo`

## Inputs

- `model` — Model (expression, required)
  Required literal value or workflow expression.
- `record_id` — Record Id (expression, required)
  Required literal value or workflow expression.
- `s3_path` — S3 Path (expression, required)
  Required literal value or workflow expression.
- `source_document_id` — Source Document Id (expression, required)
  Required literal value or workflow expression.
- `filename` — Filename (expression)
  Optional literal value or workflow expression.
- `content_type` — Content Type (text)
  Optional text value.

## Outputs

- `attachment_id` — Attachment Id
- `record_id` — Record Id
- `filename` — Filename
- `size` — Size
- `success` — Success
- `error` — Error
- `error_name` — Error Name
- `status_code` — Status Code

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `write`
- Confirmation recommended: no
- Retry safe: no
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "model",
    "record_id",
    "s3_path",
    "source_document_id"
  ],
  "properties": {
    "model": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "s3_path": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "filename": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "record_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "content_type": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "source_document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "size": {},
    "error": {},
    "success": {},
    "filename": {},
    "record_id": {},
    "error_name": {},
    "status_code": {},
    "attachment_id": {}
  },
  "additionalProperties": true
}
```
