Best answer

Set a date value as e.g. "Next Wedesday"


Userlevel 2

I think I dreamed this, but I can’t find out how to do it now. 

I’m triggering a Zap based on a new YouTube video and creating a task in Notion, which should be due on the following Wednesday. 

Any thoughts on an efficient way of setting this up without a lookup table, or is that the best way? 

Thanks! 

icon

Best answer by Danvers 23 May 2022, 12:44

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.

10 replies

Userlevel 7
Badge +14

Hi @ironsjon 

Good question.

There are a couple different ways to solve for this.

  1. Code step
  2. Date/Time Modifiers
    1. You’ll first need to determine the current date to then determine how many days until the following Wednesday
      1.  

Userlevel 7
Badge +9

Hey @ironsjon! If the field is a date/time field ( it will look like this):

 Date/time field

Then you can simply type in “next Wednesday” (without the quotations) and the Zap will know what to do! More info on supported date/time values can be found here: https://zapier.com/help/create/basics/different-field-types-in-zaps#formats-supported

Let us know if you run into any issues getting that set up - we want to make sure you’re good to go here!

Userlevel 2

Then you can simply type in “next Wednesday” 

 

Hey @jesse! Thanks so much for your help! Well that’s what I thought. And I’ve tested that with Google Calendar and it works as expected. 

I see now that Notion isn’t telling Zapier to expect a date field, although the field is a date. So Zapier is just sending “Next Wednesday” and that’s crashing and burning. 

So it’s a Notion thing. I guess their API connection thing is still quite new. I’ll drop them a line and ask them to add this to the wishlist. 

Thanks again! 

Userlevel 2

Hello again @jesse. I had a friendly chat with the API folks at Notion. They confirm that the date field here is wrapped in a mention, as follows: 

"mention": {
"type": "date",
"date": {
"start": "2022-05-25",
"end": null,
"time_zone": null
}

so it *is* a date, but Zapier is seeing the mention first and non parsing it as such. 

Do you think this is solvable? Do you have a direct line, or should I fire this off to support? 

Thanks! 

 

 

Userlevel 7
Badge +12

Hi @ironsjon

Thanks for the extra info about the mention field Notion, that’s really good to know!

I had a bit of play with a Zap and there’s actually a really simple way to get the date you need in whatever format you want. 

  1. Add a Formatter by Zapier step to the Zap
  2. Select the Time/date option and for the transform choose ‘Format’
  3. Type ‘Next Wednesday’ in the input field
  4. Choose whatever output format will work with Notion and leave the ‘From’ Format blank

 

When I tested this step, it works exactly how you’d expect, next Wednesday’s date in the format I specified:

 

 

I hope that helps! Let us know if you find a date format that works well with Notion 😊

Userlevel 2

Hi @ironsjon

Thanks for the extra info about the mention field Notion, that’s really good to know!

I had a bit of play with a Zap and there’s actually a really simple way to get the date you need in whatever format you want. 

 

 

@danvers Simply perfect. I had looked at the Formatter, but I was obviously doing something wrong. 

Works a treat. Many thanks for the tip!

Userlevel 2

By the way, @Danvers I did run into a snag. 

If I try to then format that date in a custom format (not one of the 14 offered) I cannot enter anything. 

This page lists the parameters I could use, but how do I enter them? I just get a drop down with fields from previous steps, instead of letting me type something like “D MMM”. 

(This isn’t for the date field itself, that works, but now you solved my first problem, I’m on a roll! ;-) ). 
 

 

Userlevel 7
Badge +14

@ironsjon 

Custom values can be entered here:

 

Userlevel 7
Badge +12

@ironsjon just to add a little more detail to Troy’s reply here - choose the ‘Custom’ option for the ‘To Format’ and then click in the box to type whichever format you’d like.

Nice detective work on finding the list of formats you can use! 

Userlevel 2

Ah, you two! Thanks @Danvers and @Troy Tessalone. I got there in the end. The dropdown was irritating me and I overlooked that I could just type. 

Thanks for your help!