How to use database custom query as a repeat expression

Hi All,

I have a database custom query in an API. When I add a repeat step for the custom query, I get a status 500 error.

Can a custom query be used as an expression to run a repeat or is it a bug?

Screenshot 2025-06-18 at 4.20.30 pm

This is the error under stack.

Error: core.repeater: repeat is required.
    at App.parseRequired (/opt/node_app/lib/core/app.js:759:15)
    at App.repeat (/opt/node_app/lib/modules/core.js:23:29)
    at App._exec (/opt/node_app/lib/core/app.js:722:49)
    at App.exec (/opt/node_app/lib/core/app.js:655:16)
    at /opt/node_app/lib/modules/core.js:289:29
    at Array.map (<anonymous>)
    at App.parallel (/opt/node_app/lib/modules/core.js:285:42)
    at App._exec (/opt/node_app/lib/core/app.js:722:49)
    at App._exec (/opt/node_app/lib/core/app.js:689:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

It certainly can, and does work!

The only thing I could think of why it isn’t working for you, is that the data isn’t returned, and the repeat action does not have anything to work with :thinking: Custom Queries in general are returned as an array I believe, so if data is returned it should 100% repeat it

Please provide screenshot because from what you saying is not clear - you adding a repeat step against the result of your custom query?
If yes - double check that your query response an array.

Thank you for your responses, Evaldas and Notum.

Here's a screenshot of the API showing custom query and repeat steps. It also shows that I have selected the custom query as expression in the data bindings.

The custom query is returning the data correctly. If I add the repeat step, it gives an error.

It is working. I didn't realise I had both the custom query and repeat steps in a Parallel group, and the repeat step was not returning any data because it was executing at the same time as the source expression.

Thank you for the help, it is much appreciated.