Hi,
I'm using the "Send an email (V2)" action to send an email when a form is submitted.

The form includes an optional field to attach files.
The flow works fine when there's an attachment but I can't get it to ignore attachment when there isn't any file attached.
The only way I can think of getting this done is to create multiple conditions and check if there's any attachments. If not, then using another version of "Send an email (V2)" action which doesn't have an attachment.
That's doable if there was only one file but my form includes multiple optional fields to upload files.
Is there any way to include an expression in the attachment section of this action like this?

What I have got there at the moment is this:
if(equals(body('Parse_JSON_-_Proposal_Content'), null), null, first(body('Parse_JSON_-_Proposal_Content'))?['name'])
But I'm getting an error saying an attachment can not be null or empty.