Skip to main content
Solved

Can a schedule trigger be defined by a record?

  • September 26, 2024
  • 7 replies
  • 69 views

JeffJohnVol
Forum|alt.badge.img+16

TLDR: Can you have an automation trigger that is a scheduled date be changed by data in a record?

I was telling a friend about airtable and she asked me how hard it would be to have a notification email go out based on data in her record(s).  She was thinking about using airtable to define different appliances and systems in her airbnb's, and wanted to define data for an HVAC system (there may be several) that has air filters (of which one system may have 1 or more) and have the reminder be sent after say, 3 months.  If she doesn't get around to changing it until month 4, she wants to have the form allow her to say "yes, changed on this date, remind me again in another 3 months" Of course, that's the human talk description, I know it would actually be checkboxes and dropdowns.  She may change one sooner if she had lots of clients, but she doesn't want the notification "every 3 months", but rather, every 3 months after her last change.

Best answer by Alexey_Gusev

So, to be clear, your suggesting having the daily schedule to check the date each time?  I had 2 posts, and I'm assuming you're replying to the 2nd one.   Thanks.


No, the trigger will be 'When a record enters view'
A view filtered like this


or you can add formula field 'Notification date' DATEADD({Field}, 3 'months')
and filter view as 'When Notification Date is today'
trigger will be based on a view.

after whole setup, I would recommend to lock a view. someone playing filters can accidentally make an effect of 'unfilter all', just for a second. That's enough to run in for every record entered view, means for all records in table

7 replies

BillH
Forum|alt.badge.img+24
  • Brainy
  • 180 replies
  • September 26, 2024

I think you could accomplish this by creating a view filtering on the condition then trigger the automation on when a record enters the view.  


JeffJohnVol
Forum|alt.badge.img+16
  • Author
  • Inspiring
  • 44 replies
  • September 26, 2024

I think you could accomplish this by creating a view filtering on the condition then trigger the automation on when a record enters the view.  


So... extending what you are suggesting, perhaps have a daily run task that sees if the current date is after a scheduled date and then add a row to trigger the notification?


TheTimeSavingCo
Forum|alt.badge.img+31
  • Brainy
  • 6457 replies
  • September 27, 2024

Yeap you could, but how you set it up may vary.  Here's how I'd handle it.

You'd have a table which logged each change for each HVAC:


Which would allow you to rollup the latest change date for each system with "MAX(values)", and have a formula field add 3 months to that for the reminder date, and you could trigger an automation by having the condition "Reminder date = Today" to send out an email:


I'd also set it up so that the email sent out a prefilled form link so that she could fill it out too, and the "Update" button provides an example of that
https://airtable.com/appajHSGfgMyYVQaW/shrQ8pXwWYj0TE7IV?prefill_HVACs=recPLfiMTwkOYG2hM

This way she'd just click the link and key in the date without needing to select the HVAC that she's being emailed about

Link to base


BillH
Forum|alt.badge.img+24
  • Brainy
  • 180 replies
  • September 27, 2024

Sorry I didn't get back to this, the storm disrupted some travel plans so I had to cover.  I think Adam has a solution that would work and takes into consideration the second part of your question which I had skipped over.  Good luck and thanks Adam.


JeffJohnVol
Forum|alt.badge.img+16
  • Author
  • Inspiring
  • 44 replies
  • September 27, 2024

Yeap you could, but how you set it up may vary.  Here's how I'd handle it.

You'd have a table which logged each change for each HVAC:


Which would allow you to rollup the latest change date for each system with "MAX(values)", and have a formula field add 3 months to that for the reminder date, and you could trigger an automation by having the condition "Reminder date = Today" to send out an email:


I'd also set it up so that the email sent out a prefilled form link so that she could fill it out too, and the "Update" button provides an example of that
https://airtable.com/appajHSGfgMyYVQaW/shrQ8pXwWYj0TE7IV?prefill_HVACs=recPLfiMTwkOYG2hM

This way she'd just click the link and key in the date without needing to select the HVAC that she's being emailed about

Link to base


So, to be clear, your suggesting having the daily schedule to check the date each time?  I had 2 posts, and I'm assuming you're replying to the 2nd one.   Thanks.


TheTimeSavingCo
Forum|alt.badge.img+31
  • Brainy
  • 6457 replies
  • September 28, 2024

So, to be clear, your suggesting having the daily schedule to check the date each time?  I had 2 posts, and I'm assuming you're replying to the 2nd one.   Thanks.


Nope, I was replying to your first post, sorry for the confusion!  The setup I built it doesn't use a daily scheduled automation


Alexey_Gusev
Forum|alt.badge.img+25
  • Brainy
  • 1261 replies
  • Answer
  • September 28, 2024

So, to be clear, your suggesting having the daily schedule to check the date each time?  I had 2 posts, and I'm assuming you're replying to the 2nd one.   Thanks.


No, the trigger will be 'When a record enters view'
A view filtered like this


or you can add formula field 'Notification date' DATEADD({Field}, 3 'months')
and filter view as 'When Notification Date is today'
trigger will be based on a view.

after whole setup, I would recommend to lock a view. someone playing filters can accidentally make an effect of 'unfilter all', just for a second. That's enough to run in for every record entered view, means for all records in table