At the moment at the end of the workflow, there is a sending Mail, without the information if the Upload worked like it should. I want to have, that if there is a problem with the upload, there should be a different mail.
if you want to continue your workflow if the upload fails you can use the node setting
Continue on fail.
If you do that your workflow continues with a json error message. You could use an If node after your nextcloud node to check if there is an error message and act accordingly.
Why are you expecting failed uploads? If you expect missing email attachments you could use an IF node before your upload and check if the attachment is present.