Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
Zapier Javascript Find/Replace Special Characters

I am passing order data from Shopify to VimeoOTT using Zapier. We have been doing this for a year and it works great, except when the customer's name has special characters in it. For example "Jack & Jill (tumble)" The & or ( parenthesis ) causes an error that stops the process.

I am trying to use Zapier's Javascript Action to find and replace the name data's special characters, but I keep getting a coding error. This is my first time working with Javascript :(.

This image shows the Zapier Code Action

Here is an image showing the error I get

// this is wrapped in an `async` function
// you can use await throughout the function

nameFix = inputData.nameFix.replace(/[^a-zA-Z0-9 ]/g,'_').replace(/_{2,}/g,'_');

output = [nameFix];
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In javascript, variables must be declared before they are used using let or const:

const nameFix = inputData.nameFix.replace(...

So, that'll fix the error you're seeing.


Separately, JS steps in Zapier must return an object (which has keys and values). So, you'll want to return the result like so:

return {result: nameFix}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!