Setting up OrderBy clause for Zapier FireStore trigger integration

I’m working on connecting my FireStore database to Zapier using a trigger setup. The main issue I’m facing is understanding how to properly format the OrderBy query in the configuration.

I’ve created a timestamp field in my collection specifically for ordering purposes, but I’m struggling with the correct syntax. When I look at the Zapier interface, there’s a field where I need to enter the OrderBy query, but I’m not sure what format it expects.

My collection has documents with various fields including a time-based field that I want to use for sorting. I need the trigger to fire based on the most recent entries first. Has anyone successfully set this up before? What’s the proper way to structure the OrderBy parameter in this context?

Any guidance on the correct query format would be really helpful since the documentation isn’t very clear on this specific integration.

Firestore-Zapier orderBy can be a pain. I learned this the hard way building a notification system - make sure your timestamp field exists on every document in the collection. If it’s missing from even one doc, orderBy fails silently and you’ll be scratching your head wondering why nothing works. You can do compound ordering too (createdAt desc, priority asc) but you’ll need a composite index in Firestore. Test with a few sample docs before going live - trust me, debugging these integrations after they’re running sucks.

Just got this working last week! Use the exact field name from Firestore - no quotes needed. If your timestamp field is ‘createdAt’, put createdAt desc in the orderby box. Zapier’s also picky about extra spaces, which took me forever to figure out.

I encountered a similar issue when integrating Firestore with Zapier. To format the OrderBy clause correctly, you should specify the field name and the order in a specific way. For instance, to get entries in descending order by your timestamp field, you can use “timestamp desc”. Alternatively, if you prefer to see the oldest entries first, you would use “timestamp asc”. It’s crucial to ensure that the field name is an exact match with what you’ve set up in Firestore, as it is case-sensitive. Avoid overthinking the syntax; a straightforward approach generally works best. Lastly, verify that the timestamp field is indexed in Firestore, as this can impact the functionality of the order.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.