# Hubspot Plugin Error

**URL:** <https://forum.mautic.org/t/hubspot-plugin-error/19427>\
**Category:** Product Support\
**Created:** [May 11, 2021, 8:16pm UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427 "2021-05-11T20:16:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jptx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jptx/32/1751_2.png) [@jptx](https://forum.mautic.org/u/jptx)\
**Post date:** [May 11, 2021, 8:16pm UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427/1 "2021-05-11T20:16:45Z")

</div>

**Your software**  
Mautic Version: 2.15.1 (self-hosted)  
PHP Version: PHP 7.2.18  
Database Type: mysql\_aurora  
Database version: 5.7

**Your problem**  
My problem is:  
We are using the hubspot plugin and it is creating company duplicates in the mautic\_companies table. For instance, we have ~120M records in this table yet we only have between 750-950 companies listed in hubspot. It looks like it is creating a full set of duplicates every 2.5 minutes. Can you guide me to fix this issue?

Also, once we get the issue fixed, what is the best way to handle de-duping the company list?

These errors are showing in the log: Nothing obvious in the error log

Steps I have tried to fix the problem: Reviewed plugin settings and API key

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [May 11, 2021, 8:39pm UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427/2 "2021-05-11T20:39:02Z")

</div>

Hi there!

FYI, there are a lot of releases between 2.15.1 and now, including a release that addressed some [very critical security issues](https://www.mautic.org/blog/community/security-release-all-versions-mautic-prior-2-16-5-and-3-2-4).

We have had a few fixes for the Hubspot integration in those releases: [Pull requests · mautic/mautic · GitHub](https://github.com/mautic/mautic/pulls?q=is%3Apr+hubspot+is%3Aclosed).

You may find the fix in those PRs (I could not see anything obvious), but any fixes are most likely going to be based on Mautic 3 code, so you really should be updating to a newer version sooner rather than later.

It sounds like it is trying to create new companies every time it syncs rather than to look for / merge so you may need to look at the integration settings and what you are using as unique identifiers.

---

<div class="post-metadata">

**Author:** ![jptx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jptx/32/1751_2.png) [@jptx](https://forum.mautic.org/u/jptx)\
**Post date:** [May 11, 2021, 9:12pm UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427/3 "2021-05-11T21:12:27Z")

</div>

Thank you. An upgrade is on our radar, but figured we wanted to address this issue before porting 120M duplicate company records.

I just went into the plug-in config. One thing we didn’t have set was company website as a unique identifier. I fixed that and it gave me a warning that it may de-dupe company records. Based on marking that as a unique identifier, will the system de-duplicate the company records automatically?

Thanks in advance - JP

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [May 12, 2021, 8:58am UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427/4 "2021-05-12T08:58:52Z")

</div>

You would need to run the dedup cron job: `mautic:contacts:deduplicate`

---

<div class="post-metadata">

**Author:** ![jptx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jptx/32/1751_2.png) [@jptx](https://forum.mautic.org/u/jptx)\
**Post date:** [May 13, 2021, 2:03pm UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427/5 "2021-05-13T14:03:49Z")

</div>

Hi there - is there a dedup cron job for companies vs. contacts? Is that available in the upgrade?

From my tech guru that’s helping me…

\*This process runs for contacts only, I tried running with running this command as \*  
_php /var/www/html/app/console mautic:companies:deduplicate._

\*There is no function as companies. Following are the available options. \*

\*There are no commands defined in the “mautic:companies” namespace. \*

- 

```
                                                                 *

```

- Did you mean one of these? \*

- 

```
 mautic:emails *

```

- 

```
 mautic:contacts *

```

- 

```
 mautic:campaigns *

```

- 

```
 mautic *

```

- 

```
 mautic:email *

```

- 

```
 mautic:social *

```

- 

```
 mautic:integration:pipedrive *

```

- 

```
 mautic:citrix *

```

- 

```
 mautic:webhooks *

```

- 

```
 mautic:queue *

```

- 

```
 mautic:plugins *

```

- 

```
 mautic:integration *

```

- 

```
 mautic:segments *

```

- 

```
 mautic:unusedip *

```

- 

```
 mautic:messages *

```

- 

```
 mautic:iplookup *

```

- 

```
 mautic:transifex *

```

- 

```
 mautic:translation *

```

- 

```
 mautic:install *

```

- 

```
 mautic:assets *

```

- 

```
 mautic:migrations *

```

- 

```
 mautic:theme *

```

- 

```
 mautic:maintenance *

```

- 

```
 mautic:update *

```

- 

```
 mautic:broadcasts*
```

---

<div class="post-metadata">

**Author:** ![jptx](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jptx/32/1751_2.png) [@jptx](https://forum.mautic.org/u/jptx)\
**Post date:** [May 17, 2021, 2:26pm UTC](https://forum.mautic.org/t/hubspot-plugin-error/19427/6 "2021-05-17T14:26:51Z")

</div>

Hey Ruth - appreciate all of the insight. Figured I’d ping you directly to see… is there a dedup cron job for companies? We’re not seeing one that’s native. We did upgrade to 3.2.4 this weekend.
