Question

Date formatting in first step of webhook

  • 10 June 2022
  • 7 replies
  • 516 views

I need the current date and the date for 7 days ago in the first step of a webhook to insert into my call (no time, just formatted MM/DD/YYYY).  I figured that I could do create a first step and use the formatter in the first step based on {{zap_meta_human_now}}, but Zapier wont let me create a first step with the formatter.  What’s the best way to handle this?


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

7 replies

@techman123

Try these Zap steps…

  1. Trigger: Schedule - Daily
  2. Action: Formatter > Date / Time > Format
  3. Action: Webhook - GET Request
    1. CAKE
  4. Action: Webhook - POST Request

I am attempting to setup a test, but since this method uses a “Webook - Get”, instead of a “Retrieve Poll”, I do not see a way to choose a “Deduplication Key”.  Without deduplication, wouldn’t STEP 4 fire for every record in the GET request, every time it is run?  I only want to send new records.

Userlevel 7
Badge +9

Hiya @techman123! Thanks so much for clarifying your workflow and keeping us in the loop on your progress with support!


I wanted to double check if Troy’s latest recommended steps helped? Keep us posted! 🙂

Userlevel 7
Badge +14

@techman123

Try these Zap steps…

  1. Trigger: Schedule - Daily
  2. Action: Formatter > Date / Time > Format
  3. Action: Webhook - GET Request
    1. CAKE
  4. Action: Webhook - POST Request

I am pulling transactions from one system’s reporting API (using Cake Marketing) via a webhook, and I am posting that data to another reporting system.  Within the webhook, there are required fields “start_date” and “end date”.  The start date should be yesterday’s date or the day before, and the end date today or possibly tomorrow. I would use the formatter, but it doesn’t seem like you can create a step 1 with formatter that would go before the step 2 with a webhook.

Userlevel 7
Badge +14

@techman123 

Can you further describe the workflow you are trying to automate?

What apps are involved?

Thank you.  After going back and forth with support, we it was determined that it is not possible to manipulate a date to be used in a webhook call unless it is custom coded, primarily, since the formatter cannot be used as a first step preceding a webhook.  A feature request has been made, because it would only make sense, since maybe your web hook needs a custom formatted date.

Userlevel 7
Badge +9

Hey there, @techman123! Great question and welcome to the Community! 🎉
I wonder if this similar question might be helpful:

Eager to hear what the Community is able to surface for ya! 🤗