How to include different PDFs based on conditional logic

  • envirostream
    Asked on June 25, 2021 at 2:26 AM

    Hi, I have created multiple PDFs to be attached to the autoresponder email.

    I understand we can create different PDFs for each user response.

    However, is there a way where I can attach the PDFs based on multiple answers?


    For Example, when the answer A & B select, the pdf connected to A & B will get attached in the email. When the answer B select, only pdf connected to B will get attached to the email?

    Thanks.



  • mehmetzahidyildirim
    Replied on June 25, 2021 at 3:29 AM

    Hello envirostream,

    Thank you for reaching us.

    1) You can duplicate your e-mail first:

    1624606173 60d585dd1f359  Screenshot 10

    2) Change attachment in the duplicated e-mail:

    1624605827 60d5848388bf6  Screenshot 21

    3) Now you can use "CHANGE E-MAIL RECIPIENT" condition in order to send different e-mail according to condition:

    1624605973 60d5851594c2e  Screenshot 32

    If you need further assistance, please don't hesitate to contact us.

  • envirostream
    Replied on June 25, 2021 at 4:03 AM

    Thanks.

    My challenge here is that it can be more than 1 conditions in the answer, and I need to attach the relevant PDF with the selected answer.

    The example above only allow me to connect one email template to one condition.


    For example,

    • when Value A & B select, I need to send out both PDF A & B.
    • when Value B select, I need to send out PDF B
    • when Value A & C select, I need to send out PDF A & C
    • when Value B & C select, I need to send out PDF B & C


    Which mean the pdf in my email template need to correspond to the value answer. My problem is not creating multiple email template and select the email template when certain condition met. Whereas, I need to have the multiple PDF in the email template can be sent out based on the value answer.

    As I can't have a fixed PDF in my email template. and I can't send multiple emails on 1 submission.

    Hope my question above makes sense to you. thanks.

  • Michal_S Jotform Support
    Replied on June 25, 2021 at 7:36 AM

    Hello!

    You can simply create multiple conditions for each email to be sent - there's no limit to that.

    So, for your first example it would look like this:

    • Condition: 132720 1 Screenshot 10
    • Email: 132721 2 Screenshot 21

    Then you can simply add a new condition where the value selected is B that links to another Email that only has PDF B selected in the PDF Attachment section, etc.

    Make sure that in your condition the All option of multiple ifs is selected.

    Please let us know if you require any further assistance.

    Thank you!

  • envirostream
    Replied on June 27, 2021 at 6:26 PM

    Hi Michael,

    Thanks for your advice. We did think of the method you mentioned but it doesn't 100% solve our challenges.

    We may have more than 20 combination answers and will need to create the same amount of email template for each combination.

    We are hoping to have an easier way to attach the PDFs.

    Alternatively, is there a way we can condition show a paragraph or text on the PDF?

    That might be my other options to finalise the PDF> thanks.

  • Rehan Support Team Lead
    Replied on June 28, 2021 at 3:41 AM

    Greetings,

    Unfortunately, conditional logic can not be applied in PDF Documents. Should you have any other questions then please let us know.

    Thanks