Certainly!
You would set up the resource as normal (but without any options/headers which will be added in the App. In your App, when you choose the resource for the query there will be additional options that you can add like this:
I am unsure where your connected account ID would be coming from, but if it is the result from a different query in the app, you can use the data
property of that query in place of where I have used yourData
above.
{{ yourData }} --> {{yourOtherQuery.data}}
Once you are looking at another query's returned data, the structure of the returned value can be used, such as nested JSON properties or indexed array values.