Adding pdf to email notification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yberges
    Senior Member
    • Jul 2022
    • 174

    Adding pdf to email notification

    hello in my workflow i add some email sending action, how i can add pdf created ?
    regards
  • lazovic
    Super Moderator
    • Jan 2022
    • 810

    #2
    Hi yberges,

    This can be useful: https://docs.espocrm.com/administrat...extpdfgenerate.

    Comment

    • yberges
      Senior Member
      • Jul 2022
      • 174

      #3
      ok great thanks

      Comment

      • yberges
        Senior Member
        • Jul 2022
        • 174

        #4
        hello lazovic just for a confirmation your link is for generate and attache PDF my pdf are alreday create i need to attache it on sending did you have some reference ?
        thanks

        Comment

        • lazovic
          Super Moderator
          • Jan 2022
          • 810

          #5
          yberges,

          This is the whole formula generating PDF file, attaching it to email and sending this email.
          Code:
          $attachmentId = ext\pdf\generate(
          'Lead',
          entity\attribute('id'),
          'pdf-template-id',
          'test.pdf'
          );
          
          $emailId = record\create('Email',
          'subject', 'Test PDF',
          'body', 'PDF is attached',
          'to', entity\attribute('emailAddress'),
          'attachmentsIds', list($attachmentId)
          );
          
          ext\email\send($emailId);
          In the first part, a PDF file is created, in the second part, an email with an attached PDF file is created, in the third, this email is sent.​

          Comment

          • yberges
            Senior Member
            • Jul 2022
            • 174

            #6
            ok using in workflow module ? (sorry i forgot to men,tion this)

            Comment

          • yberges
            Senior Member
            • Jul 2022
            • 174

            #7
            thanks

            Comment

            Working...