Notify nyc

This week we want khổng lồ highlight a Flow that lets you constantly kiểm tra traffic conditions and notify you on the best time to lớn start your commute.Simply mở cửa the Flow mobile app, press the button, và specify the travel time you want khổng lồ target.The Flow will notify you as soon as traffic drops below the threshold. I'll go through the steps behind this flow, and you can also find it now in the template gallery.

Bạn đang xem: Notify nyc

*

I often find myself constantly refreshing Bing Maps in the evening, waiting for the optimal time to lớn start my commute home.I know if I leave at the wrong time I may spend an extra 30 minutes waiting in traffic.In just a few minutes, I was able to lớn build a Flow that will automatically monitor traffic conditions for me, và notify my phone once traffic has subsided.The Flow mobile phầm mềm can send my current location, while the Bing Maps connector will give me the current travel time with traffic.Awesome new features like expression editing in the Flow designer allow me khổng lồ write a simple expression to lớn convert the seconds returned from Bing Maps commute time, into the minutes I want khổng lồ specify on my button.

*

The until loop allows me lớn continue checking the Bing Maps route until the commute time is less than the time I specified when pressing the Flow button.I’m also able lớn set a limit on the until loop, so that after 30 minutes of checking a notification is sent khổng lồ my phone khổng lồ leave anyway with the current estimated commute time.

Building the Flow

Let’s walk through how this flow was built step-by-step.The first component is the trigger.I’m using the button trigger so I can invoke this manually using the Flow mobile app.I’ve added a single input đầu vào called “Minutes” where I can provide the number of minutes I want khổng lồ wait for traffic to be under.

*

Next I’m adding an until loop.The until loop can sometimes be tricky khổng lồ understand, but the until loop allows me to keep executing an kích hoạt until something happens.In this case I want to keep checking traffic until travel time is below the minutes I specified.I showroom the until loop (under the “…More” when adding a new step), and showroom a “Get route” step from the Bing Maps connector.We’ll leave the until condition blank for now.

Xem thêm: Phật Giáo Vùng Mê - Truyên Tranh Tình Yêu Quý Tộc Tập 10

Follow these instructions to get a Bing Maps API key, and once you have a key you can địa chỉ cửa hàng the “Get route” action.I’m going khổng lồ pass in the latitude & longitude of my current location (provided by the button trigger).You’ll notice I added a comma between latitude and longitude so it’s a valid coordinate.I provide my destination address (my home), & let it know I want time with traffic when driving.

*

If I leave the until loop here, it will hotline “Get Route” instantly right after it finishes until it reaches the limit.For my flow I want to add in a delay before checking traffic again.I’m going to showroom a “Delay” kích hoạt and have it wait 1 minute (this is also within my Until loop).This way it waits for 1 minute before checking traffic again.

*

Now that my until loop has the actions I need, I can phối the condition at the vị trí cao nhất of the loop.My condition is to loop until the travel duration with traffic is less than or equal to lớn my threshold.So I showroom Travel duration traffic on the left hand, và select is less than or equal to as the operator. This next part requires some calculation though, as you can see from the outputs that “Travel Duration Traffic” is in seconds.My button trigger has minutes, so I need to convert minutes to lớn seconds for the comparison to lớn work.To vị that I’m going khổng lồ click the Expression tab of the outputs, and write the following expression:

mul(int(triggerBody()<'text'>), 60)

Expressions are evaluated from the inside-out.First it grabs the “text” from my trigger (button trigger), which is the number of minutes I am looking for.I then convert that khổng lồ an integer (number with no decimals) using int().Finally, I multiply that number by 60.After clicking OK I have the following condition cài đặt on my until loop.You’ll notice I also phối the limits lớn only perform this loop 30 times or for 30 minutes, whichever comes first.That way after 30 minutes even if traffic is still bad I'll get a notification to head home.

*

Finally, I need to lớn send a notification lớn my device when it’s a good time lớn leave.I’m going to địa chỉ cửa hàng a condition after my until loop lớn see if traffic is currently below the threshold.I need this kiểm tra because it’s possible 30 minutes passed before the threshold was met, meaning the until loop would complete.The condition is the same one from above — kiểm tra to see if current travel time is less than or equal to the number of seconds I am willing lớn sit in traffic.If the current travel time is less than my threshold, I use the notification kích hoạt to send a notification to leave now for the commute I’m looking for.If I never hit my threshold, I still send a notification letting me know I never hit the threshold.

*

Flow for Productivity and Flexibility

Not only did baoveangiang.com Flow enable this powerful & intelligent automation of my day, I can easily customize it khổng lồ any scenario.Instead of a button trigger, I could replace with a schedule trigger khổng lồ automatically start checking traffic every day at 5:00pm, or perhaps I want to configure the Flow khổng lồ notify me exactly when I need lớn leave if I want to lớn get to the airport by a certain time.These types of customizations become as simple as modifying a few conditions and inputs, và highlight the productivity that comes from baoveangiang.com Flow.

Try this flow out yourself, andfind it nowin the template gallery.Follow these instructions to get a Bing Maps API key, & make sure you have a di động device with the baoveangiang.com Flow mobile tiện ích installed.Have any ideas of how khổng lồ make this better?Feel không tính tiền to reach out to lớn me on Twitter