# "Add or create" when in import/sync in bulk

**URL:** <https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630>\
**Category:** Get Help\
**Created:** [September 20, 2025, 12:11pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630 "2025-09-20T12:11:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RonMakesSystems](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/ronmakessystems/32/14122_2.png) [@RonMakesSystems](https://community.fibery.io/u/RonMakesSystems)\
**Post date:** [September 20, 2025, 12:11pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630/1 "2025-09-20T12:11:50Z")

</div>

I’m facing an issue I’m not finding a way to solve…

When contacts are synced from email, I want them to create/link to a “company” using their email domain, matching to company domain. The problem is when syncing an email, it may create multiple contacts at the same time, and then the automation happens in batch. But this means that the solution I was trying (2 automations, one that tried to link an existing one, then checks a box that it searched for it, and other to create that triggers when that box is checked and it didn’t find one) doesn’t work. If no company exists, it create a new company for each contact as when it ran, there was no company existing.

What i suspect is happening:  
3 contacts are created with the same company domain.  
For each, it tries to link a company with existing domain.  
All come back with nothing link  
Automation 2 triggers to create a company for each of them. (even though they have the same company)

If each contact was processed separately (or the if-then logic was in one automation) then it would work. But right now it doesn’t. Has anyone done something like this and could help me out to find a solution?

Thanks a lot!!

What I haven’t tried yet:

1. Scripting, although i suspect it might have a similar issue as all scripts run in parallel in batch?
2. Letting it make duplicates, then running a de-duplication automation as well after.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 20, 2025, 12:31pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630/2 "2025-09-20T12:31:04Z")

</div>

It’ll possibly be solvable when the ‘[upsert](https://community.fibery.io/t/september-4-2025-see-all-access-changes-in-activity-log/9526)’ (create-or-update) functionality has been rolled out to all relevant services.

---

<div class="post-metadata">

**Author:** ![RonMakesSystems](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/ronmakessystems/32/14122_2.png) [@RonMakesSystems](https://community.fibery.io/u/RonMakesSystems)\
**Post date:** [September 20, 2025, 2:08pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630/3 "2025-09-20T14:08:16Z")

</div>

Any ideas for a current solution?

I’m not even sure if the upsert will work as it runs in bulk…

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 20, 2025, 2:25pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630/4 "2025-09-20T14:25:04Z")

</div>

When upsert runs for a batch, you can choose the desired behaviour, if/when there are duplicates within the batch.

---

<div class="post-metadata">

**Author:** ![RonMakesSystems](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/ronmakessystems/32/14122_2.png) [@RonMakesSystems](https://community.fibery.io/u/RonMakesSystems)\
**Post date:** [September 20, 2025, 2:26pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630/5 "2025-09-20T14:26:42Z")

</div>

Will try this with scripting on Monday. I’ll update here. Thanks Chris!

---

<div class="post-metadata">

**Author:** ![RonMakesSystems](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/ronmakessystems/32/14122_2.png) [@RonMakesSystems](https://community.fibery.io/u/RonMakesSystems)\
**Post date:** [September 22, 2025, 2:02pm UTC](https://community.fibery.io/t/add-or-create-when-in-import-sync-in-bulk/9630/6 "2025-09-22T14:02:10Z")

</div>

Solved with scripting!

Here’s how:  
All actions in no-code scripts are in a loop to run for each entity in the batch. In scripting, you can script for something to happen once outside of the loop. So before anything else, it checks what companies need to be created and creates those. Then there’s a no-code action to update the company of the contact using filters of the website url. I tried using the new create-or-update, but was unsuccessful. This works quite nicely now though.
