create_log
Create a farmOS log with assets, locations, categories, and quantities; new quantities are removed if the log fails to save. Requires writes enabled.
Instructions
Create a log, optionally with locations, categories and quantities. Quantities are created first and then linked; if the log fails to save, the new quantities are removed again. Requires writes to be enabled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Log name | |
| notes | No | Free-text notes | |
| assets | No | Assets the log is about | |
| bundle | Yes | Log bundle, e.g. 'activity', 'observation', 'harvest', 'input' | |
| status | No | Log status ('abandoned' needs farmOS 4) | pending |
| locations | No | Location assets (land/structure) | |
| timestamp | No | When it happened/will happen: ISO 8601 or epoch seconds. Default: now (UTC) | |
| categories | No | Log category terms (type 'taxonomy_term--log_category') | |
| quantities | No | Quantities to create and attach | |
| is_movement | No | If true, the log moves its assets to its locations | |
| extra_attributes | No | Any other log attributes, merged in last |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||