---
title: "PyMongo"
description: "Reference for the Tracecat PyMongo integration: registered actions, required secrets, expected inputs, and example workflow usage."
---

{/* Auto-generated by scripts/generate_tool_docs.py; do not edit by hand. */}
## 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>
