Problems sending email

Arthur Sanchez
Giga Guru

I created an email in my 'Logic and automation' of my application, I managed to format the email so that it is sent to a specific user and assign a Google email to him, but he doesn't send the email, what's left for me to be able to send ? Shouldn't it run from the moment I created the Email?

4 REPLIES 4

Maddysunil
Kilo Sage

@Arthur Sanchez  

Creating an email in the 'Logic and Automation' section of your application is typically just a part of the process. To actually send the email I think you need to set up an action that triggers the sending of the email.

You can write business rule trigger the email, below is the sample code:

 

 

(function executeRule(current, previous /*null when async*/) {
    // Check if the record meets the conditions to trigger the email
    if (current.some_field === 'some_value') {
        // Get the email template
        var emailTemplate = gs.getProperty('your_email_template_sys_id'); // Replace 'your_email_template_sys_id' with the Sys ID of your email template
        
        // Get the recipient's email address
        var recipientEmail = 'example@example.com'; // Replace with the actual email address
      
        // Send the email
        gs.eventQueue('email.send', current, 'Your email subject', emailTemplate, recipientEmail);
    }
})(current, previous);

 

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

I'm doing it this way, I don't want to add code, but I don't know what's wrong

1.png

 

2.png

 

3.png

 

4.png

 

5.png

 

swathisarang98
Giga Sage
Giga Sage

Hi @Arthur Sanchez  ,

 

Could you please share some snapshot of what you have configured ?

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

1.png2.png3.png4.png5.png