# Find or Create Record

> Perform Find or Create Record through Airtable.

Source: [https://genhealth.ai/docs/workflows/integrations/airtable/airtable_find_or_create_record](https://genhealth.ai/docs/workflows/integrations/airtable/airtable_find_or_create_record)

Integration: [Airtable](https://genhealth.ai/docs/workflows/integrations/airtable.md)

- Handler: `airtable_find_or_create_record`

- Connection type: `airtable`

## Inputs

- `base_id` — Base Id (expression, required)
  Required literal value or workflow expression.
- `table` — Table (expression, required)
  Required literal value or workflow expression.
- `match_fields` — Match Fields (json, required)
  Required JSON value.
- `create_fields` — Create Fields (json)
  Optional JSON value.
- `typecast` — Typecast (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `created` — Created
- `match_count` — Match Count
- `match_record_ids` — Match Record Ids
- `record_id` — Record Id
- `record` — Record
- `fields` — Fields
- `success` — Success
- `error` — Error
- `error_type` — Error Type
- `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": [
    "base_id",
    "table",
    "match_fields"
  ],
  "properties": {
    "table": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "base_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "typecast": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "match_fields": {
      "description": "Required JSON value.",
      "x-workflow-field-type": "json"
    },
    "create_fields": {
      "description": "Optional JSON value.",
      "x-workflow-field-type": "json"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "fields": {},
    "record": {},
    "created": {},
    "success": {},
    "record_id": {},
    "error_type": {},
    "match_count": {},
    "status_code": {},
    "match_record_ids": {}
  },
  "additionalProperties": true
}
```
