# Insert

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.MongoDB>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| InputType : `InputType`        | <p>Input type.</p><p>InputType.Document: A single JSON string to be processed.</p><p>InputType.Documents: JSON string(s) to be processed.</p><p>InputType.File: File containing data in JSON format.</p><p>Possible values:</p><ul><li><code>File</code>:</li></ul><p>Input type.</p><p>InputType.Document: A single JSON string to be processed.</p><p>InputType.Documents: JSON string(s) to be processed.</p><p>InputType.File: File containing data in JSON format.</p><ul><li><code>Document</code>:</li></ul><p>Input type.</p><p>InputType.Document: A single JSON string to be processed.</p><p>InputType.Documents: JSON string(s) to be processed.</p><p>InputType.File: File containing data in JSON format.</p><ul><li><code>Documents</code>:</li></ul><p>Input type.</p><p>InputType.Document: A single JSON string to be processed.</p><p>InputType.Documents: JSON string(s) to be processed.</p><p>InputType.File: File containing data in JSON format.</p><p><br>Default: <code>1</code><br>Example: <code>InputType.Document</code></p> |
| Document : `String`            | <p>A single JSON string to be processed.</p><p><br>Default: <code>-</code><br>Example: <code>{"foo": "bar", "bar": "foo"}</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Documents : `DocumentValues[]` | <p>JSON string(s) to be processed.</p><p><br>Default: <code>-</code><br>Example: <code>{{"foo": "bar", "bar": "foo"}, {"foo": "bar", "bar": "foo"}}</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| File : `String`                | <p>File containing data in JSON format.</p><p><br>Default: <code>-</code><br>Example: <code>c:\temp\file.json</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| {% endtab %}                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

{% tab title="Parameter: Connection" %}

| Name                          | Description                                                                                                                               |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| 🗝ConnectionString : `String` | <p>Connection string.</p><p><br>Default: <code>-</code><br>Example: <code>mongodb://foo:bar\@localhost:00000/?authSource=admin</code></p> |
| Database : `String`           | <p>Database.</p><p><br>Default: <code>-</code><br>Example: <code>foo</code></p>                                                           |
| CollectionName : `String`     | <p>Collection name.</p><p><br>Default: <code>-</code><br>Example: <code>bar</code></p>                                                    |
| {% endtab %}                  |                                                                                                                                           |

{% tab title="Result: Result" %}

| Name                | Description                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------ |
| Success : `Boolean` | <p>Document(s) added.<br>Example: <code>true</code></p>                                          |
| Id : `List<String>` | <p>List of ID(s) of the added document(s).<br>Example: <code>6357ae6e8b77e824c8381113</code></p> |
| {% endtab %}        |                                                                                                  |

{% tab title="Changelog" %}

## Changelog

### \[1.0.1] - 2023-11-22

#### Fixed

* Fixed dll error when importing the Task to Frends by adding local dll reference to the project file.

### \[1.0.0] - 2022-10-26

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
