0

I am creating a Zapier integration using the Zapier CLI and I need my Action to retrieve, as an input (stored in the bundle object), the ISO 8601-formatted time that the Zap which includes the action runs. I know how to ask the user to input {{zap_meta_human_now}} into a datetime input field to send the current ISO 8601-formatted datetime to the Action; however, I want to put this ISO-8601 datetime string in the bundle object without asking the user to input it.

How can I do this? Is there a way to set an input field as "hidden" with a default value of "{{zap_meta_human_now}}", so that the timestamp is generated and input to the action each time a Zap runs? Is the {{zap_meta_human_now}} datetime string stored in the bundle object automatically? If so, how do I retrieve it in the CLI code?

I could put a regular datetime input field with a default value of {{zap_meta_human_now}} and a helpText of "DO NOT CHANGE THIS FIELD", but that seems like a terrible way to go about this.

1 Answers1

0

If you only need the ISO time for when the zap runs, then you can use the regular JS new Date().toISOString() in your perform function. That'll execute each time the zap runs and will always be current. No need to read it from bundle.inputData.

xavdid
  • 5,092
  • 3
  • 20
  • 32