Hi @MSotoZuñiga
I can help you with that.
The error message “No module named ‘hubspot.crm.associations.batch’” means that the Python client library you are using does not have the `hubspot.crm.associations.batch` module. This module was added in the HubSpot Python client library version 8.0.0, so you need to make sure that you are using the latest version of the library.
You can check the version of the library by running the following command:
```
pip show hubspot
```
If the version is not 8.0.0 or higher, you need to update the library by running the following command:
```
pip install --upgrade hubspot
```
Once you have updated the library, you should be able to create a batch of associations between deals and companies without any errors.
Here is an example of how to create a batch of associations between deals and companies using the Python client library:
```python
import hubspot
client = hubspot.Client()
deals = [
{
“id”: “deal-123456”,
},
{
“id”: “deal-789012”,
},
]
companies = [
{
“id”: “company-123456”,
},
{
“id”: “company-789012”,
},
]
batch_associations = []
for deal in deals:
for company in companies:
batch_associations.append({
“deal_id”: deal[“id”],
“company_id”: company[“id”],
})
client.crm.associations.batch.create(batch_associations)
```
This code will create a batch of associations between the deals and companies in the `deals` and `companies` lists. The associations will be created in the HubSpot CRM.
Hope this will helps you out. Please mark it as Solution Accepted to help other Community member. Thanks!