Duplicate entries when integrating Salesforce to Notion

I’m building a few pieces of automation to help coordinate the work I do with partners that are outside of my company, this requires integrating the leads and deals we’re working on which live in salesforce, tagging them with the partners that are involved or that have referred them in Notion, and then exposing them to people outside our business via a series of externally shared pages in Notion.

Salesforce → Notion “Lead Database” → Individual Notion Portals for specific partner companies

This Post is about the first step in this process: Keeping Salesforce and Notion in Sync in order to maintain a “lead database” in Notion current.

This is done with two scenarios:

  1. New Salesforce lead is created → Update Notion Database

  2. Salesforce lead is updated → Find if lead already exists, then update it, or create new lead if it doesn’t exist. In this case a search is run by tracking the unique identifier in Salesforce, which is imported into Notion to find whether a lead has already been brought it or not.

The problem is that for some reason, some leads are duplicated in the Notion Database, it only happens sometimes and the lead only appears two times. There are never 3 leads with the same identifier.

This makes me think that it’s likely a sync issue because of there being two separate scenarios, should I just time them so that one runs x amount of time after the other?

Any ideas on what I should try to look into to prevent duplicates from appearing?

Should I maybe add some automation that looks for duplicates based on that unique identifiers and deletes them on its own?

Yes, this is a good idea in my experience - making sure that the timing of the 2 automation is different, and the “update” automation runs a bit after the “create” automation.

Yes this too is a valid consideration, although I would keep it as a “plan B” if you were to still find duplicates with intervention #1 above

2 Likes

Ok, I’ve tried this out!

The new lead one is set up to run every 22 minutes, and the update watcher is set to run every 27 minutes, the thought is to avoid delays in updating the database so that they don’t miss the filter when searching if it exists, and to avoid occasional overlaps in how often they’re updating ( 20 vs 30 would coincide once every hour for example)

I’ll report back with whether or not this worked!

2 Likes