Best answer

How to create timestamp type field with firebase in Zapier?

  • 22 January 2023
  • 5 replies
  • 242 views

Userlevel 1
It was expected to be input as Timestamp type based on json type, but only string type was input.

 

icon

Best answer by Danvers 24 January 2023, 12:19

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +14

Hi @Victor Ko 

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?

Userlevel 1

@Troy Tessalone

 

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.

 

Userlevel 7
Badge +12

Hi @Victor Ko!

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!

Userlevel 1

Hi @Victor Ko!

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! @Danvers

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.
Userlevel 7
Badge +12

Hi @Victor Ko 

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!