cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Formulas to Set up Automation

collin_baker_4
Deputy Chef I
Deputy Chef I

hi all, 

currently i am trying to make an automation with wrike intergrate that then connects to wrike itself. the purpose of the auto mation is so that when the last task of a phase is completed, the next phase will enter a "holding period" until the following monday, where it will then send its task out to be completed. i have been trying to create a recipe for this, but for some reason my formula keeps giving me syntax errors. 

here are few examples of formulas i have tried that give me syntax errors. 
(now + 7.days).beginning_of_week
now.next_week.beginning_of_week
today() + 7
today() + (9 - weekday(today()))
NOW() + 7
now.plus_days(8 - .now.cwday)
from my understanding, the variable "now" should work but no matter how i type it, it gives me a syntax error. the same goes for any interger.
any help would be greatly appreciated!




1 ACCEPTED SOLUTION

Bhagya_pola
Deputy Chef III
Deputy Chef III

Hi @collin_baker_4 ,

(now + 7.days).beginning_of_week  - this is working fine I didn't get any error. (output: "2025-06-26")


now.next_week.beginning_of_week - I think next_week is not available in workato, correct me if I am wrong :).


today() + 7   -  This is working fine too (output: "2025-06-26")


today() + (9 - weekday(today())) -
you can do that in this way    today() + (9 -today.to_time.wday),


NOW() + 7  - 
It should be like this  now() + 7  and this results in adding 7 seconds from now

now.plus_days(8 - .now.cwday)  - I don;t think we have plus_days in Workato or a standard ruby method yet you can try in this way   now + (8 - now.wday).days

 

View solution in original post

2 REPLIES 2

Bhagya_pola
Deputy Chef III
Deputy Chef III

Hi @collin_baker_4 ,

(now + 7.days).beginning_of_week  - this is working fine I didn't get any error. (output: "2025-06-26")


now.next_week.beginning_of_week - I think next_week is not available in workato, correct me if I am wrong :).


today() + 7   -  This is working fine too (output: "2025-06-26")


today() + (9 - weekday(today())) -
you can do that in this way    today() + (9 -today.to_time.wday),


NOW() + 7  - 
It should be like this  now() + 7  and this results in adding 7 seconds from now

now.plus_days(8 - .now.cwday)  - I don;t think we have plus_days in Workato or a standard ruby method yet you can try in this way   now + (8 - now.wday).days

 

thank you! although it still appeared as a syntax error, the code did work this time. my guess is i may have been messing up the formula somewhere else