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

204
Views
Use Automator App Variables as imput for Javascript action steps

I am trying to input the content of a variable generated with the Automator app onto the next action step, to define the value of a javascript script variable. Change the variable using javascript code and push the result further to the next action step. Then turn it back into an Automator variable, or update the one previously used as input. I am sure you will find it as a simple thing, but I couldn't find a way to get it working. This question might be silly, after all. Many thanks in advance. Check the screenshot of the Automator sequence of steps. Screenshot of the actions set in Automator App

function run(input) {
    
    var str = input;
var l1 = str.replace(/ /g, "_");
    str = l1;
var l2 = str.replace(/:/g, "-");

    return l2;
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The input to an Automator action is an array, so you will need to step through the array or convert/coerce to whatever class you are wanting to work with. In your posted script, the replace() method is for a string, so you are getting an error trying to use that method on the input array.

If you just want a single input item you can use input[0] to get the first item in the array, or input.join() to join the array items together.

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!