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
James Roberts 32James Roberts 32 

Processes / flows / triggers on emails synced from Gmail

Our team are using the Gmail Lightning Sync to sync up their emails from Gmail into Salesforce. I want to trigger a field update process when new emails are synced to Leads or Contacts, but I can't see to find a way to trigger this. 

I've tried using simple workflow rules, processes, flows and even an Apex trigger, but none of them seem to fire when emails are sent and synced through the Gmail Lightning Plugin.

Does anyone have any solution?
Thanks
David Zhu 🔥David Zhu 🔥
You can create a trigger on emailmessage object.

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessage.htm
James Roberts 32James Roberts 32
Hi David – I have added a trigger, but it doesn’t seem to fire for emails synced using the Gmail Plugin. trigger EmailMessageTrigger on EmailMessage (after insert) { for (EmailMessage eMsg : Trigger.new){ Map params = new Map(); params.put('Email_Message_ID', eMsg.id); Flow.Interview.Updating_LNME_for_Email_Message_Sends UpdateLNME = new Flow.Interview.Updating_LNME_for_Email_Message_Sends(params); UpdateLNME.start(); } } Thanks, *James Roberts * Senior Sales & Marketing Operations Manager, Provenir London | New York | Singapore *T *+44 7548-712692* E* *jroberts@provenir.com *