Avoid Notion duplicates in a database

Hi,

I am setting up a scenario to have my Salesforce client accounts displayed into a Notion dabatase. I don’t understand why, the records appear in duplicates and not the same number of times depending on the accounts… How to create a flow to rather update nor create a page in my Notion database?

Bundle 1 and 2 on the screenshots attached are the same account from salesforce.

I’ve set up some filters but they don’t happen to work…
Could you please help? Thank you!


[

](https://)

Hi Colombine,
Two thoughts to start based on what I see in the screenshots:

  1. What filter do you use in the “Search objects” Notion module?
  2. I am not sure if the timestamp filter is working as expected, since you are subtracting a date dates using a numeric operator

Hi Simo, thank you for answering :slight_smile:

  1. No filter, should I add one?
  2. I am a beginner, there might be an error here, yes. How would you say I should write this filter, to say that if the record has been edited in the last 7 days, then, we update it?

Thanks!

  1. Yes, I would probably add a filter there (“Salesforce ID” equal to “Account ID”). Then, on route #1, filter for “page ID” exists. On route #2, filter for “page ID” doesn’t exist.
  2. formatDate({{now}}; YYYY-MM-DD) <date: on or after> formatDate(addDays({{now}};-7); YYYY-MM-DD)

Thank you Simo! I added a filter on the first Search module for Salesforce regarding the last modified date. I put this, but it still triggers all the records… am i mistaking somewhere?

Hi Simo, I think I found a way editing to the filtre to “More than” but I seem to work.
But I think I have one last blocking point… :

The account manager field in Notion database is not always the good one. In Module 1, I search for the accounts, in Module 3 I search for the account team members ( a sub-object of the Account object) with a filter in module 3 on the account ID, but, the Account manager is not the right one…

Any idea of why it could be blocking? Thank you!

Hi Colombine, I am not sure about this - it looks like this has to do with the Salesforce “search records” module

I think so, with the 3rd one that permit to search for the account team members. But I don"t understand why it wont work…