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

New Developer - HOW to send automatic email based on record import/input/update

I am a SFDC administrator.

My boss wants the system to automatic send him a notice once there is a new opportunity (donation) coming in.

Our new opportunity is generated through


  1. regular input data into an object
  2. salesforce data loader
  3. batch data entry (by using the object "batches")

I am trying to build a workflow, so once there is a new opportunity, an email delivery will be triggered.


However, the SFDC support analyst said it is IMPOSSIBLE to trigger workfolow rules uising Apex Data Loader or Batch processes.


I was wondering how I could solve the problem?


Thank you



u can achieve this by using apex coding using messaging.singleemail or mass email objects










Hi Kiran

Thank you so much. Actually, I am completely new to Apex Coding. Can you give me a direction on where to find the relvant coding materials?




Workflow rules always trigger, with the single exception of the Import Wizard, if they are specifically disabled (by leaving the "trigger workflow for new and updated records" option turned off). They are equivalent to database-level triggers (i.e. Apex Triggers), and are not normally circumvented. Emails will be sent normally in this scenario. For custom integrations, you may need to set the SOAP header EmailHeader's triggerUserEmail and triggerOtherEmail to true in order to send emails, but all other actions will occur normally. The Apex Data Loader will also trigger emails normally.


Edit: Support isn't always 100% correct, although they do try their best. Most likely the agent hasn't had that question before, and their immediate support manager did not have the answer available. The documentation on this sort of stuff is sketchy sometimes, but I've personally seen this behavior, so I know it does work that way, unless it's an undocumented or poorly documented change. The reason why I know it sends emails is because I once sent an email to hundreds of contacts in my test organization by accident because of a workflow rule.

Raumil SetalwadRaumil Setalwad

Hello Stanley,


According to your query I would suggest you use Apex Trigger for sending mail if any new opportunity is created in your organization for e.g..

Trigger insertOppotunity on Opportunity(after insert){
      if ( != null ){
          for (opportunity opp : Trigger.New){
                /*   Here apply logic for sending email  using SendEmail  class whose help will be available in our community   */ 

Hope this helps



Raumil Setalwad