[SalesForce] Using Process Builder to react to new email being sent from account

I would like to create a record when a new email is sent from an account. I tried to create a new process that fires when a new Task (Subject starts with "Email") but the process never fires. I even removed the criteria, and set the process to fire when a new Task is created, but it still doesn't fire.

I tested creating a Task manually and the process fires. However, sending an email, which creates a Task, does not trigger the process.

It appears Salesforce sends an email and creates a Task to record the event without raising the record created event. I'd be open to using APEX and a trigger but prefer to use Process Builder if possible.

Is there a way to know when an email is sent so I can intercept it and create a record with some of the email's information?

Best Answer

I believe you are subject to this when a task is created as a result of Send an email:

https://help.salesforce.com/apex/HTViewSolution?id=000213837&language=en_US

Workflow rule not triggered after clicking on send e-mail button from the object, in spite of the completion of the newly created task.

This is an expected behaviour. Please find the explanation below

  • When Salesforce sends an email from a record, it accesses the email author page (Javascript page)
  • When send is clicked, email is sent from the object. An internal workflow then adds the email to the activity history as a completed task.
  • This action of adding the completed task does not trigger additional workflow (i.e. your task workflow) because it was generated from an internal workflow. Similar behaviour is seen for Process builder on Task that has email as a scheduled action.

This behaviour concerns the standard email scenario, where in email is stored in a task. When Enhanced Email is enabled, both a Task and an Email Message are created, it is possible to trigger a Workflow or Process Builder of that record. Considerations for Setting Up Enhanced Email

Mass mail, does not use Enhanced Email, only a task, and as such, you cannot trigger a workflow / Process on those records.

Related Topic