I am building a workflow to run on form submission, and I want the email body to have the form response data. I'm using the SendGrid connector to send the email.
However, there seem to be no functions for sanitising email addresses and escaping HTML. This means that if in my form, I ask for an email address, and I want my email to CC this address, they could put "email1@example.com, email2@example.com" and it would end up having two emails CC'd in it.
They can also include custom HTML in any of the form responses and if I want to put these in the message body, anyone who responds would be able to insert whatever HTML they want...
Am I being thick, or is there really no sanitisation functions? This seems like a pretty big thing to be missing...
It's not missing, you need to add a compose action and use one or more replace functions in the expression. Have a look at https://www.enjoysharepoint.com/power-automate-replace
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Thanks for the response, Rob!
I would say that this is still a missing feature since it has to be done manually. In my case, the form has about 20 fields. so this is horrendously messy; I'll hold off on doing this for now, if it is the only way.
It is slightly concerning that this isn't built in (or even the default), since Microsoft markets PowerAutomate as something for "everyone". I wouldn't expect someone with no programming background to even know that you need to sanitise inputs.
User | Count |
---|---|
93 | |
44 | |
21 | |
17 | |
16 |
User | Count |
---|---|
137 | |
50 | |
42 | |
39 | |
29 |