Add functionality to "Send message Task"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Laimonas
    Senior Member
    • May 2021
    • 197

    Add functionality to "Send message Task"

    Hi there,

    We are missing one functionality, when we use workflow and flowchart "Send Message Task" / "Send mail".
    It would be great if there were an additional button "Add field" and a place to write "Formula", which we could use to add additional parameters to the Email that we send. Please see the picture attached.
    Attached Files
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi Laimonas,

    As a temporary solution, I can suggest you to use Execute Formula Script using this formula:
    Code:
    $emailId = record\create(
             'Email',
             'to', $recipientEmail,
             'status', 'Draft',
             'parentId', entity\attribute('id'),
             'parentType', entity\attribute('type')
    );
    
    ext\email\applyTemplate($emailId, 'some-email-template-id');
    ext\email\send($emailId);
    The value of the $recipientEmail variable can also be easily pulled out using formulas. I can help you in this matter if you wish.

    Comment


    • yuri
      yuri commented
      Editing a comment
      I wouldn't call it a temporary solution. It's a good solution.
  • yuri
    Member
    • Mar 2014
    • 8440

    #3
    It's already possible to update an email record with Task > Update Created Record. The email entity will be available in the list. Place the task flow element after the Send Message element in the process flow.

    Plus it's possible to use process variables in the email template (see docs).
    Last edited by yuri; 07-14-2022, 03:55 PM.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...