Workflow firebase queries have parsing issue

  • Goal:

I have a firebase query, which includes a timestamp check. I want to be able to run this query in my retool workflows as I do in my retool apps

I think the issue is retool has different parsing of parameter input in apps and workflows, I can put {{new Date()}} in a where clause in any app, it will throw error in GUI saying it expects string, but it will work fine. We can see the date object in the preview section for that input.

But in the workflow, it will show null instead of the date object when we put {{new Date()}}. As a result, we are getting an empty value.

It doesn't even run an imported query with a timestamp check, which is very weird.

I tried different values as the timestamp value, moment(), firebase Timestamp, etc. doesn't work, because the workflow query field parses every date object into null

This query works in any App and in the Query Library

But same query won't return any response in workflow

Even the query saved in the query library doesn't work when we try to call it from the workflow

Hi @Sparkspark, are we on Cloud or Self-hosted Retool?

On Cloud, I'm able to query a Firebase resource using {{ new Date()} } on Workflows:

Hi @Paulo, we are on cloud.

I don't now the reason but I'm not able to get the same result as you.


I can run a firebase query in Retool Apps, but same query isn't working in Retool Workflows. I think its about the Where value input is being override as null.

Left one is Retool Apps ------- Right one is Retool Workflows


Here you can see the interpreted value of the {{new Date()}} for both cases. One is the wanted value, other one is null.

Left one is Retool Apps ------- Right one is Retool Workflows

I see the same 'error,' seems to be a linter issue:

However, the query should still run. Could we double check if maybe there is a space after the column name on the WF query block? For example, I experience the same with a space after created_at :

Are we still having this issue?

@Paulo I'm having the exact same issue here with querying Firestore with timestamp. I've tried with both moment() and new Date() and I'm getting the same results as @Sparkspark

Would appreciate your help with this. thank you in advance!

For additional reference, I've also tried using a code block as per the screenshot to reference the data from it over to the value field. Still no luck :frowning:

Hi @sanemosquito, welcome to the forum! :wave:
Could you share a screenshot of your Resource query block?

Hi @Paulo Thanks for the warm welcome. please see the attached for the screenshot of the resource query block. As you can see there is nothing being returned when attempting to query documents with 'created_dt' field before "now". Appreciate your help. thank you.

Could we try with a hardcoded value we know we have in the database and using = instead? Just want to make sure everything else is working.

@Paulo No luck. Nothing is being returned even when using an existing value. However, when querying a different field with a different value type, it queries without an issue. So I suspect there's a problem with timestamp/datetime formatting. Please refer to the screenshots.


From you last screenshot, I see that the value for created_dt has a mmm dd, yyyy format. Is it possible that this field is a string and not a Timestamp?

@Paulo Nope - it's definitely a timestamp. Please see attached for the exact same data shown on Firebase console

1 Like

@Paulo You can see the issue in the outgoing request, Retool App and Retool Workflow sends different type of request for the exact same query. Retool Workflows request is not parsed correctly according to the firebase requirements.

I found this after we decided to use some other solution and I won't be repeating the issue to show some screenshots, but you can easily see the source of failure by looking at the requests in the networks tab in chrome.

Hope this helps.

1 Like

Thanks for sharing the screenshot and additional context. No need to repeat the issue to show some screenshots but do you mind sharing what was the solution you found?

@Sparkspark I’d love to hear your thoughts on this issue—your insights would be incredibly helpful!