Firestore insert document query in workflow stores {{ moment() }} as string instead of timestamp

Hello,
I've encountered an issue regarding storing timestamps in Firestore documents.

When I execute a query through the normal editor, triggered by a button click, the current date is stored correctly as a timestamp in my Firestore document:


However, the problem arises when I use a workflow. Within a loop block in the workflow, I employ a Firestore insert document query with the same JSON value for insertion. Unfortunately, during the execution of this workflow, the timestamp is saved as a string instead of a timestamp format in the Firestore document:


image

This discrepancy is puzzling since the same query, when used in a workflow versus in the editor, results in different behaviors for storing a timestamp. My expectation is for consistent behavior across both methods: the {{ moment() }} function should store the current time as a timestamp in both cases, not as a string.

I would appreciate any guidance or solutions to ensure uniform behavior. Thanks!

Hey @jensbecker!

Your best option here is to use custom libraries with the Firebase SDK since there’s no raw firestore option in Workflows. With that said, custom libraries will be supported soon :+1: