I don’t find anywhere in the forum or AppSheet reference documentation a clear, comprehensive list of invalid characters in filenames. In case anyone finds it helpful, I did my best via some testing to figure out which characters get replaced by a hyphen when an AppSheet automation task creates a file on Google Drive. I needed this in the context of the technique explained in Creating an action to open a saved file, where it’s critical to be able to replicate the filename of a file created through an automation task.
Here’s what I came up with:
# * | \ : ' " / ? < >
There are various posts regarding techniques for sanitizing filenames. Most focus on nested SUBSTITUTE() functions (for a clear example see the screenshot in the “Adjust the initial value for each reference column” section of @MultiTech 's document on data importing), sometimes in combination with @Suvrutt_Gurjar 's nifty use of EXTRACTMENTIONS(). I ended up using @Steve 's idea of a spreadsheet formula. Here’s that formula from Google Sheets, where the string to be sanitized is in column A:
=REGEXREPLACE(A2, "[#*|\\:'""/?<>]", "-")
I didn’t test whether the create file automation task may trim leading or trailing spaces. Regardless, just to be safe, I did use the spreadsheet trim function in forming my filename:
=TRIM(REGEXREPLACE(A2, "[#*|\\:'""/?<>]", "-"))