Skip to main content

Hello,

I have a form that collects a series of notes which is then passed to Zapier to upload to our CRM via an API. This works well until the notes contain certain characters such as “ / *.

The notes are broken down into multiple fields, eg. General Notes, Exercise Notes, Strategy Notes, etc...

Is it possible to have zapier filter multiple fields for these characters or do I have to use a find/replace formatter for each one.

Appreciate any help and happy to provide further details if needed.

@JamesDW 

You could use a Zapier code block, this example is JavaScript.  The code uses regular expressions to remove special characters from a text string.  Modify the regex string to fit your needs.

 

// Input Data

const bodyTxt = inputData.bodyTxt;

// bodyTxt contains "Hello / what are * you doing? .. What .."

 

//Regular expression to remove special characters (excluding spaces)

let regex = /x^a-zA-Z0-9\s]/g;

let modTxt = bodyTxt.replace(regex, '');

 

output = p{bodyTxt: bodyTxt, modTxt: modTxt}];

 

bodyTxt

Hello / what are * you doing? .. What ..

modTxt

Hello what are you doing What

 

Zap Support

GetUWIred


Brilliant, thank you very much!


That’s fantastic news @JamesDW🎉 Thanks so much for circling back to confirm that did the trick. And big thanks to @GetUWired for that awesome suggestion of using a Code by Zapier action for this! 🙌

Please do reach back out in Community again if you need any further help at all. In the meantime, happy Zapping! ⚡️