Announcement

Collapse
No announcement yet.

send email with PDF using workflow

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    Hello,



    there are new formula for send mail & pdf .. so just need create a workflow

    Comment


    • Vincent
      Vincent commented
      Editing a comment
      Thank you!

  • #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.

    Comment


    • Vincent
      Vincent commented
      Editing a comment
      Thank you!

  • #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


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

      Comment


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

        Comment


        • #7

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

          Comment


          • #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...
            X