Using Create datetime

18 views
Skip to first unread message

Jack Buss-Keating

unread,
Oct 7, 2022, 7:56:09 AM10/7/22
to Foresight Community
Hello all,

I am new to Foresight and was wondering how best to use 'Create datetime' functionality?

Thank you,
Jack

Jason Huang

unread,
Oct 7, 2022, 8:12:07 PM10/7/22
to Foresight Community, jack.bus...@henry.org.uk
Hello,

Good question. We created the Create datetime action to delay some actions, much longer than the Wait action, which only allows a short delay for 10 minutes at most. That's our initial intention. 
The Create datetime action works in this way. Given a datetime variable, do a series of time change steps, then output a new datetime variable. For example, given a datetime A, add 3 days, and out the new datetime as B. If A is 2022-10-07 09:00:00 +03:00, then B is 2022-10-10 09:00:00 +03:00. If A is 2022-10-20 15:30:00 -04:00, then B is 2022-10-23 15:30:00 -04:00.
 
One use case is to create dependent calendar events, e.g. automatically create another calendar event 7 days after an event. This can be done by a rule New calendar event trigger => Create datetime action => Create calendar event action. If any events are created in your calendar, then another event is created in 7 days momentarily. 
Another use case is to delay some actions far away from now. For example, if a Google Workspace user is suspended, automatically delete the user in 6 months (we're still working it). This can be done by creating 2 rules. Rule 1:  User suspended trigger => Create date time action => Create calendar event action. Rule 2: Calendar event started trigger => Delete user action. In Rule 1, if any user is suspended, a calendar event is created in your Google Calendar in 6 months. After 6 months, the event trigger Rule 2 and the rule delete the user. If within 6 months you don't want the user to be deleted, just delete the calendar event. You can replace the User suspend trigger in Rule 1 and Delete user action in rule 2 with other trigger and action types by your own needs.

What kind of workflow do you look for? I can share more insights. 
Thanks.
Reply all
Reply to author
Forward
0 new messages