function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Eugene KorsunskyEugene Korsunsky 

Gmail app and SF email server duplicate records & emails not received issues

1. I've develped an Apex class that is parsing and extracting data from emails from different sources, such as Trulia, Zillow, HotPads, Yelp, DirectLine, etc.,  forwarded via Gmail app to SF email server. For new/unique lead emails the class creates Lead records . The problem is each email received results in creating from 1 to 8 duplicate records and the relevant debug logs. When I send my  test email directly to the SF alias there is only one debug log created.  I've created a duplicate matching rule and even installed a trigger to prevent duplicates. This helped for emails from 2 sources, but not for others.  I understand that a workaround may be deleting the duplicates periodically on schedule, but can anybody suggest a real-time solution?
Is it a system problem? My guess is SF email server is not a match to Gmail server and cannot reply with email received in time, so Gmail keeps re-sending emails and SF eventually process the whole batch of the same emails accumulated in the queue without blocking the duplicates.

2. Another issue is only for DirectLine emails that are not received by SF emal server at all,  both via Gmail app and directly (no debug logs created). The DirectLine domain is in the allowed list. 

Has anybody encountered the above issues?
Thank you!


Thank you!