> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PyMongo

> Reference for the Tracecat PyMongo integration: registered actions, required secrets, expected inputs, and example workflow usage.

## Execute operation

Action ID: `tools.pymongo.execute_operation`

Instantiate a PyMongo client and execute an operation on a Collection object.

Reference: [https://pymongo.readthedocs.io/en/stable/api/pymongo/asynchronous/collection.html](https://pymongo.readthedocs.io/en/stable/api/pymongo/asynchronous/collection.html)

### Secrets

Required secrets:

* `mongodb`: required values `MONGODB_CONNECTION_STRING`.

### Input fields

<ParamField path="collection_name" type="string" required>
  Collection to operate on
</ParamField>

<ParamField path="database_name" type="string" required>
  Database to operate on
</ParamField>

<ParamField path="operation_name" type="string" required>
  Operation to perform on the Collection, e.g. 'find', 'insert\_one'.
</ParamField>

<ParamField path="params" type="object | null">
  Parameters for the operation

  Default: `null`.
</ParamField>
