Actions36
- Record Actions
- Table Actions
- Field Actions
- Index Actions
- Relationship Actions
- Query Actions
- System Actions
- Batch Actions
Record → Create Record
AI-generatedSummary
Create a new record in a specified SurrealDB table, optionally using a provided record ID, with customizable data and connection settings.
Inputs
- Table (required) — The SurrealDB table name to create the record in (e.g., 'person', 'product', 'order'). You can also specify a full record ID like 'person:john', and the table part will be extracted automatically.
- Record ID (Optional) — An optional ID for the new record. If omitted, SurrealDB auto-generates one. Can include a table prefix (e.g., 'person:john').
- Data (JSON) (required) — A JSON object containing the data with which to create or update the record.
- Options — Optional settings to override default namespace and database for this operation.
- Connection Pooling — Settings to configure connection pooling behavior like max/min connections, timeouts, retries, and health checks for better performance.
Output shape
a single record object representing the created record with its fields, including the record ID.
The operation returns the record as created by SurrealDB. If an ID was provided, it will be used; otherwise, an auto-generated ID will appear. The output reflects the data submission result, suitable for downstream processing in the workflow.
Examples
Example 1: Create a person record with specified ID and data
Table set to 'person', Record ID to 'person:john', Data with fields for a person record.
Example 2: Create a product record with auto-generated ID
Table set to 'product', Record ID left empty, Data containing product attributes.