Problem
The Send Notification action, configured to 'Include list item attachments' or other attachments, causes the workflow to fail with the following error:
The filename, directory name, or volume label syntax is incorrect.
Solution
Remove special characters from the file name. These limitations include:
~ ' # % & * : < > ? / \ { | }
Please note that these special character limitations are imposed by Microsoft and is enforced differently across different products and functionalities. For example, SharePoint may allow you to upload a document with a # sign, but SharePoint may fail to retrieve the same document for use as an email attachment due to the same # sign. You may find differing behavior between SharePoint 2013, 2016, and 2019.