Send e-mails with multiple (optional) attachments

Hello all,
I have a form on my webflow page where users can upload at least one file and a maximum of 4 files. The uploaded files (and other details) are to be sent as an e-mail where the files are available as attachments. However, the files are only sent as attachments if a user uploads all 4 files. Since uploading multiple files is optional, the files that were sent should always be in the attachment, regardless of the number of uploaded files.

As soon as a file is missing during the upload, “ERR_INVALID_ARG_TYPE” is returned as output and the other files are removed from the workflow and only displayed as a link in the email.
This is my current workflow:

I am looking for something like this, but it did not work:

Is there a way to catch the error “ERR_INVALID_ARG_TYPE” in the http request and replace it with e.g a custom string, so the other attachments won’t get removed? Or maybe merge the attachments beforehand, as shown in the image?

Hey @l_kappes,

Welcome to the community :cake:

In the http request node you can tell it to output the full response and to never error then handle the output in an if node.

Are the files all being uploaded to the same service or are they all different as there could be a better way to make the workflow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.