Need help cleaning up text data in my Zapier automation
I’m running into an issue with my automated workflow and hoping someone can point me in the right direction. I have a lead generation form connected to Facebook that feeds into Zapier for processing.
The problem is that some users are adding emoji characters to their responses, particularly in the name field. When I look at the data that comes through, names like “Sarah” show up as “Sarah:tada:” in the system.
In Zapier’s activity logs, I can see these emojis get converted to Unicode escape sequences. For example:
I want to keep the actual name part but remove all the emoji characters before the data gets passed to the next step in my workflow. Is there a way to clean this up within Zapier, or do I need to use a code step to handle the emoji removal?
Had this exact problem with customer feedback automation. I use Zapier’s Code step with JavaScript instead of regex - catches way more emoji variants and won’t break when new ones come out. Here’s the snippet I’ve been running for 8 months without issues: inputData.text.replace(/[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}\u{1f17e}-\u{1f17f}\u{1f18e}\u{3030}\u{2b50}\u{2b55}\u{2934}-\u{2935}\u{2b05}-\u{2b07}\u{2b1b}-\u{2b1c}\u{3297}\u{3299}\u{303d}\u{00a9}\u{00ae}\u{2122}\u{23f3}\u{24c2}\u{23e9}-\u{23ef}\u{25b6}\u{23f8}-\u{23fa}]/gu, ''). Much more reliable than basic regex patterns.
honestly, skip the regex headache and just use a webhook to a cleanup service. regex101.com has an api that strips emojis automatically - way easier than debugging unicode ranges every time new emojis drop.
To clean up emoji characters in your Zapier workflow, you can utilize the built-in Text Formatter with the “Replace” action. No need for custom code here. Simply insert the regex pattern: [\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}] into the pattern field and leave the replacement field empty. I’ve handled similar issues before, and this method reliably removes emojis while preserving the underlying text, preventing those confusing Unicode escape sequences from cluttering your logs.