Hi @big_dag_guy, welcome to the Community! 🎉
As the orderBy property is required so that new documents can be sorted in the correct order I’d have thought it would be best to use a timestamp type of field rather than an ID for that.
The New Document Within a Firestore Collection trigger is a polling type of trigger so it would check for new documents at regular intervals to see if there’s a new document with an ID that it hasn’t seen before. If a new document was added just after the query was run and was missed, then it should be seen the next time the Zap runs the query again which should then trigger the Zap for that document. Also want to note that the limit property is assigned automatically so that can be removed from the Query field.
Hope that helps to clarify things here. If you have further questions or there’s anything else I can assist with please let me know! 🙂
Got it, thank you. So if I’m reading the linked docs correctly, lets say that users create 5 new documents in between polls. Zapier will poll Firestore and find 5 docs it has not processed yet. Then process them and add to the “processed ids” field. And repeat. And my query should look like this:
"orderBy": [{ "field": { "fieldPath": "created_at" }, "direction": "DESCENDING" }]
That’s correct, @big_dag_guy. 🙂
So if I’m reading the linked docs correctly, lets say that users create 5 new documents in between polls. Zapier will poll Firestore and find 5 docs it has not processed yet. Then process them and add to the “processed ids” field.
Yes, when the Zap next polls Firebase/Firestore looking for new information it will find any new documents it’s not yet triggered on and then the Zap will run for each new document individually.
And my query should look like this:
"orderBy": [{ "field": { "fieldPath": "created_at" }, "direction": "DESCENDING" }]
Yes, that query looks all good to me! 🙌
Do let me know if there’s anything further I can help with on this, keen to ensure you’re all set here.