# Bika.ai on Mazaal AI

Bika.ai integration enables you to connect your workflows with Bika.ai's database capabilities.

## Authentication

This piece uses API key authentication. To set up the integration:

1. Log in to your Bika.ai account at https://bika.ai
2. Click on Your Profile
3. Click on My Settings
4. Select Developer Menu
5. Click on Create Token
6. Copy the generated API token
7. Enter this token when configuring the Bika.ai integration

**Note:** Keep your token secure. You can revoke it anytime from the API Settings page.

## Actions

### Create Record

Creates a new record in a Bika.ai database.

**Configuration**:
- **Space**: Select the space where your database is located
- **Database**: Select the target database
- **Input Format**: Choose between Dynamic Form or JSON input
  - **Dynamic Form**: Creates an interactive form with fields based on your database structure
  - **JSON**: Allows you to provide data as a JSON object with field names as keys

The action automatically detects field types and formats values appropriately:
- Text values are passed as strings
- Numbers are converted to numeric values
- "true"/"false" strings are converted to boolean values
- Comma-separated values are converted to arrays for multi-select fields

### Update Record

Updates an existing record in a Bika.ai database.

**Configuration**:
- **Space**: Select the space where your database is located
- **Database**: Select the target database
- **Record ID**: Enter the ID of the record to update
- **Input Format**: Choose between Dynamic Form or JSON input
  - **Dynamic Form**: Creates an interactive form with fields based on your database structure
  - **JSON**: Allows you to provide data as a JSON object with field names as keys

Only the fields you provide values for will be updated. Empty fields are ignored, allowing for partial updates.

## Usage Tips

1. **Error Handling**: Both actions include detailed error messages and debug information if something goes wrong.

2. **Field Types**: The integration automatically handles type conversion:
   - Numbers are properly converted from string inputs
   - Boolean values can be set using "true"/"false" text
   - Multi-select fields can be populated with comma-separated values

3. **Empty Values**: Empty, null, or undefined values are automatically filtered out from the request.

4. **Primary Fields**: Fields marked as primary in Bika.ai that don't have edit permissions will be excluded from the form.

For additional support, contact [Mazaal AI Support](support@mazaal.ai).
