Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!

Fusion Webhook to filter out projects last updated today

Avatar

Level 3

Hi. I want to create a scenario triggered only by a Watch event for "Updated Only" projects where the Last Update Date for the Old State does not equal today. Basically, I want the scenario to run no greater than once per day for a given project update. 

 

I have tried to use a Filter on the webhook where Old State LastUpdateDate does not equal "now". But I guess since "now" includes a timestamp, it will not filter out any update that didn't take place at that exact time of day? Is there any way I can set my webhook up as part of the Watch event to accomplish the desired behavior? Today is 7/30 and currently the webhook lets through projects where the date is 7/30:

Screenshot 2024-07-30 at 4.52.39 PM.png

 

Thank you. 

-Myles

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Level 5

I have a scenario that checks every 30 minutes for projects with no activity that are 150 < x <= 30 minutes old. Unfortunately you cannot use an instant webhook for this and must use a search module. In your case, change where I have "Entry Date" to "Last Update Date", set the criteria to less than start of work day (or what time you see fit), remove the second clause, and set the run time to everyday at end of day (or whenever you want it to run). In my case for start of day, I would do 6:00 AM which looks like, setHour(setMinute(now;0);6)

Lawson02_1-1722447436153.png

You can also refer to an older post by me where I asked a question along the same lines as you Create notification after project not converted within an hour 

 

Avatar

Level 1

taking the concept above you could try the following (un-tested)

 

Screenshot 2024-08-01 at 10.48.22 AM.png

It "should" work. The Event subscription documentation provides an example of filtering to projects with a planned completion date less than X.

Event Subscription API | Adobe Workfront

As another approach you could store the timestamp of the last time your scenario acted on a project (i.e. custom field in Workfront or data store in fusion) and then filter appropriately in the scenario.

Avatar

Level 5

I don't believe that you can use the "now" variable within a webhook nor have I done any work using the "timestamp" variable. I tested using "now" a while back when asking the question I referred to earlier but maybe you could try it again as it did not work for me. I believe that webhooks aren't very dynamic and very static but maybe I am wrong (I hope so because that would be awesome).

Avatar

Level 1

Of course, that is just run once when you set up the webhook. Maybe $$TODAY - 1d ?

Avatar

Level 3

could you use this type of filter?

 

lastUpdateDate=$$TODAY&lastUpdateDate_Mod=lt