Effective Ways to Handle Optional Attachments in Tally Form
Have you ever encountered an error in your scenario while collecting data through a tally form? Specifically, when there's an option to add attachments, but these attachments are optional. So, when an attachment is missing, the module “create database item” does not execute. You might want to set up a rule which uses the URL of the attachment if it is available and which would ignore it if it is absent.
One might think of using “general functions” like this: {{ifempty(3.fields.Attachment #3 .url)}}{{(ignore)}}. But unfortunately, this doesn't work.
Solution
The most straightforward solution is to use a Router after your Tally trigger. The two routes with the same steps:
- If attachment exists (the current steps you have)
- If attachment doesn’t exist (the current steps you have, and do not map any File in the Notion module)
However, if you follow this approach, you would need 4 Routes as far as I can tell (and some if statements): one for when there is no file; one for when there is 1 file; one for when there are two files; one for where there are three files.
On each route, you can filter with this logic:
- {{attachment 1}} does not exist & {{attachment 2}} does not exist & {{attachment 3}} does not exist
- {{attachment 1}} EXISTS & {{attachment 2}} does not exist & {{attachment 3}} does not exist OR {{attachment 1}} does not exist & {{attachment 2}} EXISTS & {{attachment 3}} does not exist OR {{attachment 1}} does not exist & {{attachment 2}} does not exist & {{attachment 3}} EXISTS
- {{attachment 1}} EXISTS & {{attachment 2}} EXISTS & {{attachment 3}} does not exist OR {{attachment 1}} does not exist & {{attachment 2}} EXISTS & {{attachment 3}} EXISTS OR {{attachment 1}} EXISTS & {{attachment 2}} does not exist & {{attachment 3}} EXISTS
- {{attachment 1}} EXISTS & {{attachment 2}} EXISTS & {{attachment 3}} EXISTS
Another approach is to create only 1 File Upload field in Tally (and allow multiple files upload–you can also set a limit of 3 files). Use JSON Aggregation to upload one or multiple files at once in Notion.
In this case, create two routes:
- If no file exists → all the steps you have, and do not map any files in your Notion module
- If one or multiple files exist
With these solutions, you should be able to handle the error and make your scenario operational.
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.