I’m building a content marketing tracker and I’d like to be able to add an analytics and reporting status which automatically triggers 30 days after a piece of content is marked as published. What would be the best way to handle this in an automation?
Automation to Run After Record has held a Status for X Days
Best answer by ScottWorld
Sorry I’m a total javascript noob. So my automation trigger is when record meets condition (status: complete). Then the script should be
IF(DATEADD({Last Modified}, 30, "days")=TODAY(), "it's been 30 days")
THEN(???)
I’m not sure the syntax for identifying my single select field “Status” and setting a selection.
You don’t need a script to do this, you just need to create 2 fields:
(1) a modified time field that only updates when the status field changes, and
(2) a formula field that yields a result (such as the number “1”j when both conditions are true:
(a) status field is “published”, and
(b) status field was modified on or greater than 30 days ago.
The formula is the tricky part. After you get that formula created, you would just trigger your automation based on the presence of the number “1” in that formula field.
Something like this might work, although I haven’t tested this:
IF(AND(Status="Published",DATETIME_DIFF(TODAY(),{Status Modified Time},'days')>=30),1)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.