Workflow Issue - Server Side Only

New Workflow problem I've had but only just noticed.

I have a workflow that I thought was running correctly but have since realised that it's actually not completing all the steps due to an error within a branch.

I have a query called MJ_fetchJob. When I run this one step at a time, the MJ_fetchJob is passed to the branch successfully, the correct branch is activated and all is good.

However, when run server side, this MJ_fetchJob variable is not populated. I've tested this theory by using the console.log to write out the value of the variable and when run server side, it is undefined.

How do I resolve this please?

Hey @Ross_JWHI! What's happening in your MJ_fetchJob query? Is there custom auth by any chance?

Hey Victoria,

No, normal OAuth 2.0 using the standard Bearer OAUTH2_TOKEN.


Got it! Then OAuth 2.0 should be supported in Workflows as long as you're sharing credentials between users. :slight_smile:

Hi Victoria,


I am using Client Credentials Flow which according to the above shares access across users.

Can someone please take a look at this, I've been trying now for a few weeks to get this to work and I just keep hitting invisible walls.

I have a another workflow that's throwing errors today such as "Workflow has failed and unfortunately could not find an error message" so I just can't make any progress and if I can't resolve this soon, I'm going to have to not use Workflows.

I am also having issues similar to this @Ross_JWHI & @victoria as mentioned in the following thread:

I run the workflows manually and everything handles itself perfectly but when it comes to automating the process it runs into errors (although a little differently to yours).

Didn't get any updates on the past thread, hopefully this one can see some light.

Hey @tomrezoando! What are the errors you're running into?

Hi @victoria thanks for replying.

Not using branches like Ross but having the workflow fail on automation when it was scheduled.

Have a workflow that one a day: Grabs transactions from an API --> alter the format of the data --> write to a DB. When these steps were performed individually in order it worked fine (in fact the automation when I first wrote it a month or so ago also worked) however when it came to running everyday, it would fail saying that there were duplicates in the DB which was impossible (note that it was saying every record in the DB was a duplicate which is outside of the scope that the workflow was trying to achieve).

I hadn't checked on the script in the past week but it has started working as intended successfully since 7 days ago which is amazing but I had made no changes on my end. Suspecting that it was a bug that is getting fixed during the beta.

If you'd like more info I am happy to provide to help testing.


That’s so strange…but that’s also great news!

Glad it’s working for you now and sorry it caused problems while it wasn’t.

Please do let us know if you run into any weird behavior again :+1:

I am currently experiencing a similar issue. Workflow hits an endpoint at Ship Station to get shipment information. When I run the workflow manually, all good.. when it runs scheduled I get:

Have tried changing the time but same result.
Request is triggered via a function call:


Seems basic and straightforward.. Any suggestions?

Hey @Bre! Is the Header just supposed to be Authorization: Basic, or do you need to pass in any other credentials?

Hi @victoria

That's it.. this works fine as-is in postman as well as when I manually run the blocks sequentially. When the workflow is triggered by sched or if I run the entire workflow with the run button, it fails.

I've blacked out the top of the token in the headers there as it was visible.. it doesn't just read "Basic".

Hey again Bre! Sorry for the delay here, I was checking with the Workflows team to see if they had any insights here. I suspect that there's some unsupported functionality here. It seems pretty common for a manual run to work but an automatic run to not work since the two ways to run a Workflow run differently. The manually run Workflows run client side and the automatically run Workflows run server side. Any sort of custom auth isn't expected to work, though it does seem like your query is pretty straightforward.

To double check, how are you automatically triggering your query? It looks like you're running it like SSGetOrder(order_id)?


If so, this may be the issue! You'll want to do something more like:

SSGetOrder.trigger({additionalScope:{order_id: 5}})

Hi Victoria, thanks for the reply! I will give that a go and see if it behaves better.

1 Like