BOT: Condition for creating a file & emailing only if records exist

I have a bot triggering on change event that creates 3 csv files and 1 pdf โ€œimagesโ€ file.

The 3 csv files are attached to email1 and sent
The 1 pdf โ€œimagesโ€ file is attached to email 2 (along with another pdf file) and sent.
A couple status changes are processed and then the bot is complete

Works great.

The Question. The pdf images file mentioned above should not generate and be attached to email2 if records do not exist. How would I add a condition to the bot to not create the pdf โ€œimagesโ€ file if records donโ€™t exist and then also not attempt to attach it to email2?

I checked out Condition on a Branch and with a virtual field checking for the count of images in the header table, it looks like I can stop the creation of the โ€˜pdf images fileโ€™ (if image count is not >0) but then how do I indicate under โ€œOther Attachmentsโ€ in email 2, that the system should not attempt to attach anything?

A million thanks for your help.


Solved Solved
0 2 78
1 ACCEPTED SOLUTION

Youโ€™ll need another branch on condition step (or use the same one from before), then build 2 separate email Tasks where the only difference is attaching or not attaching the PDF.

View solution in original post

2 REPLIES 2

Youโ€™ll need another branch on condition step (or use the same one from before), then build 2 separate email Tasks where the only difference is attaching or not attaching the PDF.

got it. worked like a charm!

Thanks as always Marc!

Top Labels in this Space