Using resource queries in workflow doesn't work with authentication flows when running the workflow or triggering the webhook

As soon as I create a resource query in a workflow, where the resource has an authentication flow attached, it isn't run when running the entire workflow. When I run the specific query in the workflow it works as expected.

The same resources are used in "apps" and it works fine there.

when looking at the logs for the workflow i receive this error: " Error evaluating query2: {"statusCode":401,"message":"invalid_token","errors":[{"code":"invalid_token","message":"invalid_token"}],"error":"invalid_token"}"

How do i ensure a workflow is triggering all authentication steps on resources when the webhook for the workflow is triggered or is being run?

Hey @Soren_Frisk!

This is something that's being tracked on our end. What kind of authentication are you using for your resource? One solution has been to enable shared credentials on resources that use OAuth, for instance (see this post). If that doesn't apply would you mind sharing more about your setup?

Hi @Kabirdas!

The authentication method is a custom auth implementation. Where it has one step reaching out to an API, and two steps where it saves the access and refresh tokens into env variables i then use in the Authorization header of the resource

That sounds like it should work, I'm interested in any screenshots of the setup you might be able to share just in case there's something I'm missing from your description :thinking:

One step I've often taken to debug requests in custom auth is to use a service like Pipedream to see the actual requests being sent by Retool and mock responses, similar to how I'd use the networking tab or postman echo for queries. If you're noticing anything out of the ordinary with something like that it would be great to know as well.