Workflow Issue - Data Not Available in JS Module

Hello... Have a workflow that's working perfectly.

  • Step 1: Rest API to get results back
  • Step 2: JS to loop through the results from Step 1 to clean the data and only grab the columns I need before moving to Step 3 where I insert the cleaned data into my database.

When I manually run each step, the workflow works perfectly.

When I Publish it and Run it as a full workflow the issue seems to be:

I get an empty array in Step 2. I've tried several hacks in my JS to see if I can get the data in different ways. Most of my hacks work when manually running each step but still an empty array in Production runs.

Any ideas?

1 Like

When you examine the workflow runs, what do you see as input/output from the steps? That should help you get some idea of where things are not as expected.

1 Like

Hey @Ben_Smith! Welcome to the community. :wave:

You specifically mention that you publish the workflow before running it but I want to highlight that as a common issue, so it's worth double checking. It's also possible that there is something wonky with the way your resource's environments are configured, if you're testing in development but triggering the workflow in production.

I'll also echo @jg80's question and add that any information you can share about the configuration of your API resource would be helpful, too!