How to attach file from entity field in Workflow email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smachado
    Member
    • Feb 2024
    • 32

    #1

    How to attach file from entity field in Workflow email

    Hello community,

    I have created a custom entity in EspoCRM called CConfirmacionPedidos.
    This entity has a file field called adjuntoPedido, where I upload a PDF (the customer’s quotation).

    My goal is that, when I send an email through a Workflow (Advanced Pack), the uploaded PDF is automatically attached to the email.

    I already tried the following in the Workflow "Send Message" task:
    • In Attachments Variable, I set:
      adjuntoPedido
    • I also tested with:
      adjuntoPedidoId
    • The record has a PDF uploaded in that field.
    • The workflow is triggered from the same entity (CConfirmacionPedidos).
    • The user has full permissions (view, edit, delete).

    However, the email is always sent without any attachment.

    If I manually attach a file in the email template, it works, but that is not useful because each record has a different PDF.

    Could someone explain the correct way to use Attachments Variable in a Workflow?
    Do I need to reference it as adjuntoPedido only, or with the entity name like CConfirmacionPedidos.adjuntoPedido?
    Or is there some configuration required to allow Workflow to attach files automatically?

    Thanks in advance for your help
  • dreginald
    Senior Member
    • Sep 2018
    • 155

    #2




    Comment

    Working...