It was expected to be input as Timestamp type based on json type, but only string type was input.
It was expected to be input as Timestamp type based on json type, but only string type was input.
Hi
Good question.
Can you provide more detail about what you are trying to do, the issue you are encountering, and screenshots with all of your Zap steps?
Thanks for answering my problem. The problem is actually very simple. When saving a new document to firestore, I want to store the current time in a Timestamp type field. However, I couldn't find a related example, and I tried setting the key in json format to "__time__", but it was recognized as a String type.
Hi
Got it, thanks for the extra information :)
You can enter the value {{zap_meta_human_now}}
to add a timestamp of the current date/time into your Zap. The format of the {{zap_meta_human_now}} output is MM/DD/YY hh:mmAM/PM and it will use the timezone of your Zapier account (or the individual Zap if that’s set to something different) to calculate the time. If you’d like the time in a different format or timezone, this help doc explains some of your options:
Insert the time of Zap runs into a field.
I hope that's clear, please let us know if you have any questions!
Hi
Got it, thanks for the extra information :)
You can enter the value {{zap_meta_human_now}}
to add a timestamp of the current date/time into your Zap. The format of the {{zap_meta_human_now}} output is MM/DD/YY hh:mmAM/PM and it will use the timezone of your Zapier account (or the individual Zap if that’s set to something different) to calculate the time. If you’d like the time in a different format or timezone, this help doc explains some of your options:
Insert the time of Zap runs into a field.
I hope that's clear, please let us know if you have any questions!
Hi!
Thanks for the reply. I have already tried the method I found out through countless web surfing. I think the ability to specify the field type should be added when setting the firestore value.
Hi
Thanks for your reply, I see what you mean now - it’s not that you need to make a timestamp it’s that you need to tell Firebase that the value you’re giving is a timestamp (as opposed to an integer/string). That isn’t currently possible but we do have a feature request open for this. I've added your email address as another vote for this addition. I don't have an ETA of when or if this will happen, but we will definitely email you if it does become a reality.
Thanks!
Hey folks,
Just reaching out with a small update to share that the team have decided not to pursue this feature request at this time. If anything changes on the status of this feature request in future we’ll be sure to let you know right away!
For now, the only way to get around this would likely be to use an API Request (Firebase / Firestore) action. It’s a bit more advanced since you’d need to reference Firebase / Firestore’s API documentation to set up the request correctly to create the document and set the datatypes, but we have a more general guide that you might find helpful: Set up an API request action.
Please do reach out in Community if you have any questions in the meantime.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.