Question

How to send an email using a workflow

  • 3 May 2023
  • 4 replies
  • 211 views

Userlevel 5
Badge +15

Hello,

I currently am trying to send an email via a workflow, so whenever my custom event and custom event action get triggered, my workflow sends an email.

How do I go about doing this? I’ve tried using a projection call “GetDefaultsForSendMail: SendMailDefaultsStruct” for BusinessOpportunityHandling as this is what is called when the email button for Business Opportunities is clicked. 

 

I noticed that in logs, this causes cmd prompts to get triggered when clicking the button, which opens up outlook to write a draft for an email, but I’d like to automatically generate and send an email without manual interaction. Is there a way to do this?

Thanks,
Bryan


4 replies

Userlevel 3
Badge +7

Hi Bryan,

There is an event action type called ‘email’. Instead of calling a workflow once the event is triggered you can send an email. Is this something you cannot achieve with email event actions? Do you specifically need the email functionality as a part of a workflow?

/Lahirumala

Userlevel 5
Badge +15

Hi @Lahirumala de Mel

Thank you for the reply! I appreciate it.

I saw the event action email type but I was unsure if I could modify the recipient, body or subject of the email. Is this something that can be done? I didn’t see it as an option. I need to have the email send out the individual Business Opportunity with some other information related to the sales person and the contact we are emailing. I went with a workflow since I know I can read a projection call to get the email I need to send to.

Thanks,
Bryan

Userlevel 3
Badge +7

I guess variables in the format of &USER_MAIL_ADDRESS can be used in email parameters like to, cc, subject and message as a way of customizing each mail sent.
 

 

Userlevel 5
Badge +15

Hi @Lahirumala de Mel

Unfortunately , you cannot pull the contact email for the business opportunity into this event action without modifications. Do you know how I could do this? Creating a custom field that references that value seems not efficient and not the best way to go about this. Do you know what the format that PL/SQL custom attribute field would be for this? IFS doesn’t seem to like basic sql statements to pull data, and gives me a random ORA error on fields I’m not even using in my script.
Thanks,
Bryan

Reply