Hi everyone, I'm developing a small tool designed to send a notification to a contact once a flight I'm on has departed.
I've successfully set up a Google Sheets template for upcoming flights. Today's flight data is being pulled from FlightAware via its API.
Once the flight has departed, a notification is sent, and the scenario concludes.
My current challenge is needing the scenario to pause for 30 minutes and then re-run the API request if the flight hasn't departed yet.
So, I'm looking for a module that checks for departure. If it hasn't departed, it should wait for 30 minutes and, if necessary, repeat the request and the waiting period.
I've managed to achieve this using a sleep module with 300 seconds repeated 6 times, but this quickly hits the 40-minute scenario limit.
For instance, I arrive at the airport about 1 hour and 30 minutes before departure (which is essentially the trigger, entering a geofence). Considering average departure delays, I need a total pause of at least 2 hours, broken down into 30-minute intervals.
I saw a video demonstrating a workaround, but I consistently encounter an error:
The error message I receive is: "The operation was completed with a warning. Failed to map ‘value’: Function ‘if’ finished with error! Function ‘formatNumber’ finished with error! ‘NaN’ is not a valid number or using unsuitable separator."
I should also mention that I am currently on the free plan.
I'm looking forward to any ideas, suggestions, or improvements.
Wishing you always safe landings,
Daniel
If you are on a Free plan, the Maximum scenario execution time is 5 minutes.
Hello, I can think of so many improper ways to use your scenario. Like, thanks for the money, you’ll never catch me…
Anyways, instead of sleeping, consider integrating callin.io break error handler as a way to delay things by up to 12 hours.
I admit, you have the new challenge of forcing an error, and then picking up after it.
Alternatively, why not push the delay to a data storage, and then using a second scenario that monitors that data storage, then runs the first script again.
What you want is possible, just your scenario structuring will have to change to accommodate more than one scenario at play or using incomplete executions
.
Hi, I've been struggling with this for three days straight and can't get it to work. I've tried with ChatGPT and other tools, but it's not functioning.
Would it be okay to share the blueprint with you so you could quickly implement one of the break error handlers? I'm at a loss, and my patience is wearing thin, especially after purchasing the larger package.
Please share the blueprint here. I'll use this chance to learn as well.
Thanks, highly appreciated!!!
Maybe just a couple of quick thoughts on the topic. I need to run this basically from entering the airport until final departure, so let's say every 30 minutes. Will this work out if we have to keep in mind the 40-minute execution timeout limitation?
Blueprint 5 is the scenario which is posted above.
blueprint (5).json (52.0 KB)
I have created another scenario in the hope that I can make it run, where it's maybe easier to fix it - the watch emails module.
I have a Flightradar24 Silver membership where I can receive emails when a flight that I entered has departed - but the scenario will run every day.
Therefore, my scenario watches my inbox and parses the text only on the day of the flight and puts it in a notification.
Problem is here the scheduling. I need it only on the day of a departing flight (which is noted in my Google Sheet). It runs once when I enter the airport, but the email comes only at departure. I need something like if entered place X at a defined date in Google Sheets, then check all 30 minutes my mail. If found, send notification and the scenario is done. The blueprint is the v6
blueprint (6).json (41.7 KB)
What is easier to fix? I'm fine with any of the scenarios
Thanks for the help, it's highly appreciated!
Hi there! To answer your first question, using the Break error handler appears to reset the scenario's time limit. Also, note that the break time before retrying is over 12 hours.
Next, for running only when you're flying and staying relevant to your departure time zone, this relates to a larger system involving the following components:
- Flight logger - I use Tripit, which provides reminders for upcoming flights. A mail monitor could use this to create a flight schedule, which is then checked by a later module, such as the in-air notifier.
- Timezone awareness - This might be better implemented as a function rather than a scenario.
- Flight delay handler - This could simply push information to the flight logger from the in-air notifier.
- In-air notifier - Checks if a flight is logged, confirms the plane has departed, sends a notice if true, otherwise adds the flight to the flight logger.
Reviewing your notes again, it's possible that the in-air notifier could be a common scenario invoked by one or two other scenarios that track upcoming flights.
Hi, thanks for your message! I managed to get it working with a small workaround using my flightradar subscription and their alerts. It's not the perfect solution for now as I need to enter the flights there in advance, but it does work.