> For the complete documentation index, see [llms.txt](https://docs.xenioo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xenioo.com/actions-and-operations/database/save-raw-model.md).

# Save Raw Model

This action will insert or update a record in a given collection.

<figure><img src="/files/wp6wj2AH3ctRkqralip3" alt=""><figcaption></figcaption></figure>

### Settings

The action uses the following settings:

| Setting    | Description                                                                          | [Parsed](/actions-and-operations/dynamic-parsing.md) |
| ---------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| Bot        | The bot that is providing collection access. The current bot is selected by default. | :no\_entry:                                          |
| Collection | The collection to be used for the action                                             | :no\_entry:                                          |
| JSON       | The full json source for the record to be updated or inserted                        | :white\_check\_mark:                                 |

### Remarks

This action will store the whole JSON in the selected collection regardless of the structure, as long as it is valid.

### Trigger

This action has no triggers.

### Variables

This action produces the following variables after being triggered:

| Variable                   | Description                                                    |
| -------------------------- | -------------------------------------------------------------- |
| last\_database\_object\_id | The unique id of the record that has been updated or inserted. |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| SMS              | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action requires an active [Database ](broken://pages/-LdYpe93z-UqrvvQdX7V)package.
