send email with PDF using workflow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vincent
    Senior Member
    • May 2017
    • 176

    send email with PDF using workflow

    There are some entities (e.g invoice) support email PDF. Can i set a workflow to automate this action (using workflow to send invoice pdf)? thanks.
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    Hello,



    there are new formula for send mail & pdf .. so just need create a workflow
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment


    • Vincent
      Vincent commented
      Editing a comment
      Thank you!
  • yuri
    Member
    • Mar 2014
    • 8453

    #3
    With formula:

    https://docs.espocrm.com/administrat...extpdfgenerate
    https://docs.espocrm.com/administrat...-in-attachment

    You can put the script into Update Target Record action.
    Last edited by yuri; 05-27-2020, 10:30 AM.
    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


    • Vincent
      Vincent commented
      Editing a comment
      Thank you!
  • vps
    Junior Member
    • Dec 2019
    • 9

    #4
    Hi Yuri,
    I have tried the above formulas. Unfortunately no email is sent. Do you have any idea where the problem could be?

    Code:
    $attachmentId = ext\pdf\generate(
    'Mitarbeitergesprch', entity\attribute('id'), '6006c897352394a05', 'test.pdf'
    );
    
    $emailId = record\create('Email',
    'to', 'example@example.com',
    'attachmentsIds', list($attachmentId)
    );
    
    // applying email template
    ext\email\applyTemplate($emailId, '6006ea7bb32d8065d');
    
    ext\email\send($emailId);

    Comment

    • Maximus
      Senior Member
      • Nov 2018
      • 2731

      #5
      Hi there,
      Please check the log file in the /data/logs/ directory.
      Do you have configured SMTP connection in Administration -> Outbound Emails?

      Comment

      • dreginald
        Member
        • Sep 2018
        • 89

        #6
        Kindly suggest the script to attach more than one PDF Template in one e-mail.

        Comment

        • dreginald
          Member
          • Sep 2018
          • 89

          #7

          ext\email\send($emailId); is triggering mails twice. Can someone advise on how to correct. Using version 6.0.4

          Comment

          • Maximus
            Senior Member
            • Nov 2018
            • 2731

            #8
            Hello,
            Could you provide your Formula?
            Make sure you don't have the same automation flow in another place (Formula for another entity, Workflow, BPM, Hook).

            Comment

            Working...