How 3 makers, 2 devs and a princess came together to save kittens for a hackathon

Published Oct 23 2021 08:53 AM 1,734 Views
 

 

solution-overview.png

 

The Story (Michael)

 

Just before Southcoast Summit 2021 got started, the organizers hosted the Automate Everything - SS2021 Hackathon where every solution revolves around Flic buttons. Wait, you don't know what a Flic button is? It's basically a wireless smart button that lets you control devices, apps and services. Push once, twice or hold the button and let each variant trigger a different action. There are multiple use cases in business but also in personal life in which Flic buttons make your life easier. Check out the Flic homepage to learn more.

 

PetrolPushTitle.png

 

Meet Petrol Push. A modern day organization that has a clear mission: Save kittens. There are hundreds of kittens all over Britain that get stuck in trees, get lost within the urban jungle or need help in any other kind of way. Luckily Petrol Push underholds a huge fleet of volunteers to rescue kittens every day.

 

the challenge
As you may know there is a petrol shortage happening right now and of course you wonder, how can Petrol Push keep up their noble mission? Flic Buttons and the Microsoft Power Platform gave them the ability to come up with a solutions to help all their volunteers in their day to day work.

 

the solution
Every Petrol Push car got a Flic button installed and whenever Petrol Push volunteers pass a gas station, they can indicate with a push of a button, whether the gas station has fuel available or not. This information gets stored on a map so every Petrol Push employee knows where fuel is available and where it's not. This way the volunteers can keep their focus on their mission. They don't need to drive around searching for fuel or worry where to gas up. The community of volunteers takes care of that.

 

Petrol Push cares deeply about their volunteers so they don't want to put them in danger in any way. That's why this solution comes with a little extra. Petrol Push workers don't have to check the map over and over again to see whether anything has changed. If one of the volunteers found a gas station where fuel is available, the button gets pushed and the fleet will get notified with a song. That way the drivers know when to check the map for updates.

 

Within these times it might happen that our drivers get in trouble themselves, run out of gas, have a flat tire or something else. Once again, Petrol Push cares about their volunteers deeply so the Flic button provides the opportunity to call other volunteers on the road for help. Once again with a song, so no other driver needs to check their phone. The position gets indicated on the map though, so that help can be arranged quickly. It's only the supervisor that gets an additional text message in order to provide further information.

 

Note: you will probably know by know, but this use case exemplifies the ability to combine geographic location with notifications that are not based on text. In this way, we want to draw attention to how versatile Power Platform solutions are and we also want to think about the people who can only use devices in a limited way. Please use this use case to customize it to your needs. And always remember, only as a community we are strong, so let's be inclusive

 

Now, let's dive into details and see how this solution actually works

 

The Flic and the flow (Tomasz)

 

In a big picture, the flow was built to get information about location of a driver who triggered it, next to lookup details of the closest petrol station (by using Azure Maps API). Finally to save the station's data together with status into database, so later it can be displayed with a proper color of a pin, inside the app. But in details, it's much more interesting.

 

PetrolFlow - part1.png

 

The flow can be triggered by any driver (1). Also, for any Flic event, but that will be described later. Next, bot looks up details of the button itself (2), to get its owner (3). This information will be later used to record data along with information about the driver.

 

PetrolFlow - part2.png

 

Next the flow calls Azure Maps custom connector via a dedicated child flow (1), by passing latitude and longitude of a driver's location. Coordinates are obtained using GPS from driver's phone that is paired with Flic button. Obviously this should be done using the action directly within the parent flow, however for some unknown reasons we were facing an issue while saving process with the action inside, so we decided to move it into a child flow. Don't judge :)
Data returned by the child flow, that represents details about the nearest petrol station is then parsed (2).

 

Finally bot using postal code is filtering existing stations' data to get a match (3). This is done using ODATA expression:
 
woi_postalcode eq '@{first(body('Parse_JSON')?['results'])?['address']?['extendedPostalCode']}'. Then it saves its row ID into variable (4). Naturally, if there's no station for the given postal code, variable will be empty. **We also made an assumption**, that there can be one station for a given postal code :)

 

PetrolFlow - part3.png

 

Process now checks, if station's row ID is empty (1) - if yes, it means it has to be created. Creation (2) of the record takes all the details returned from Azure Maps API, like full address, station name, lat and lon, information about driver who reported it and finally - the postal code. After that row ID of the created station is being saved into variable.

 

PetrolFlow - part4.png


 

Now process moves to check what kind of action occurred on the Flic. There are 3 possible activities:

 

- Single click - means that there's petrol on the station,
- Double click - means that there's no petrol on the station,
- Long press - means there's an issue and driver requires assistance.

 

To check what action occurred, we are using switch action (1). For each branch process executes the same actions, just with different statuses. First, bot creates an entry in Activities table (2), to record latest status (to one from Petrol, No petrol, Issue) for the station together with driver details who reported it.

 

After that is done, it updates status (again to one from Petrol, No petrol, Issue) of the station record itself (3). Then it saves created activity record OData id into a variable. And finally it relates records (4) - petrol station together with the created activity record.

 

PetrolFlow - part5.png

 

What is also worth to mention is that the whole process is built using the try-catch pattern. All actions that are executed in terms of the business logic are stored in the "Try" scope (1). If anything fails within the scope, it is caught by the "Catch" scope (2), that has it's "Run after" settings configured to only be executed if previous actions fails, times out or is skipped.

 

Process in the "Catch" scope first filters (3) results of the "Try" scope, using the expression result('Try') to leave only those entries which contain information about errors: @equals(createArray('Failed', 'TimedOut'), ''). Next for each such record (4) it is adding information about the details to a string variable. Finally, variable's contents is sent to admin as a notification (5) and the whole process ends up with "Failed" outcome.

 

Show me something beautiful - The canvas app (Carmen)

With the data stored in Dataverse, the canvas app can be created to display the available information and inform the people where they can find fuel. The canvas app consists of a header (with the company logo, name and refresh icon) and a map control.

 

We are using the built-in map control, which allows us to display the gas stations with their appropriate color, automatically center on the user's current location and display additional information about each gas station when selecting the location pin.

 

To get the location pins on the map, we added the Dataverse table as a source in the Items property of the map control. We are currently not doing any filtering, but this could be added if needed. The latitude, longitude, labels and colors is each contained in a specific column within the data source. These are provided as values for the following properties (where the text between quotes is the name of the column in the Dataverse table):

 

- ItemsLabels = "woi_name"
- ItemsLatitudes = "woi_latitude"
- ItemsLongitudes= "woi_longitude"
- ItemsColors = "woi_color"

 

The woi_colors columns is defined as a calculated column that is influenced by the value of the Petrol Status column in the same table. Petrol Status contains the last known status of fuel at the respective station. The colors are defined as hex values with the following mapping:
Last Known Status Color Color name
Petrol "#66FF00" Light Green
No petrol "#FF0000" Red
Issue "#FFBF00" Amber
 

 

The color of the grouped pins is defined by the PinColor property of the map control. It is set to Green, which is a darker color than the green used for the stations with fuel.

 

When a pin is selected, the info card is shown. This is defined by setting the InfoCards property of the map to Microsoft.Map.InfoCards'.OnClick. The fields that are shown on the info card are defined by editing the **Fields** in the properties pane of the map. Four fields are shown on the info card:

 

- Name
- Address
- Postal code
- Modified on (to know when the station's status was last updated)

 

This can be seen on the below screenshot.

 

 

App-MapFields.png

The resulting app shows a map with all identified gas stations and their last known status, indicated with the color of the pin. Selecting a specific gas station provides the user with more information on that station.
 
App-Details.png

 

We need a real map - The custom connector to Azure Maps (Lee)

 

A key part of the solution is populating a list of petrol stations and their status based on presses of the Flic button. We initially looked to use the built-in Bing maps Power Automate connector and actions to find the current address when a Flic button was used. However, this would return the nearest address, which is not necessarily a petrol station (e.g. it could be a house on the opposite side of the street which is deemed nearer).

 

To work around this, we created an Azure Maps resource in Azure. Azure Maps can return a list of addresses within a certain radius that fit a particular "POI (point of interest) category" - in this case a petrol station. Using the subscription-key (API key) from the Azure Maps resource, we were able to create a custom connector in Power Automate and query for the nearest petrol stations to the longitude and latitude when the Flic button was pressed.

 

Bring me the vibes - The Spotify connector(Yannick)

 

We like to celebrate victories and help each other in times of need, and what better way than use music for this? We have a sound system in the office connected to Spotify so let's use that to keep everyone updated on things that happen on the road!
A new Power Automate flow will trigger every time a new petrol station status is logged, excluding when no petrol was available. In the case someone found Petrol at a gas station, we get super excited for our colleague and play Fuel by Metallica in the office to have a small party. When someone gets in trouble, for whatever reason, we play Trouble by Coldplay  (so we know we need to rush to rescue) and a text message is sent to the manager.

 

Integrating with Spotify isn't too difficult (the API is well-documented) but requires the creation of a custom connector with following API actions:

 

- Get a User's Available Devices: fetch a list of all devices currently connected to the Spotify service
- Start/Resume a User's Playback: play a song on a specific device

 

When combining both, we can first fetch all connected devices and then filter them on the device id of our office sound system. If the device is connected, we can play the appropriate song for the occasion with the second API call.  
And lastly, for the text message we'll use Twilio. Luckily they have an existing connector within Power Automate so it's only a matter of registering for a Twilio account, getting a number to send messages from and configuring the action in our flow.

 

The princess and the push (Luise)

 

Straight from the beginning of the hackathon, we took care of documenting our architecture decisions and how we would implement them. We set up a GitHub repository, invited everyone in the team so they could commit their files. We continued to document all major steps so that everyone could use this as a reference to explain our solution, although each member was only in charge of their workload. Getting all information and documenting while building ensured accuracy but also gave an opportunity to think through the app and reflect on decisions.

 

Documentation includes screenshots of the flows, explains the data model and environment variables. We also published the solution itself in this repository to give community the chance to play with our app.

 

What can we learn from this epic quest? (everybody)

 

As a group, we discussed the hackathon for quite a while even after it had ended, and we came up with, for us, four important lessons this experience has taught us.

 

1. Do one thing the right way, instead of a million things in a messy way

What helped us build this solution in a short timespan, was that each person of the team was responsible for a specific part of the solution. There was no context switching between the app studio and building the cloud flow for example. Instead, we made some agreements in the beginning of the day and let each other know verbally and in the documentation if anything needed to change. This allowed all of us to focus on their own part, resulting in finished pieces to the puzzle.

 

2. Take care of documentation

Since development was decentralized, it was important we could keep each other up to date on what we were doing. Therefore, we documented from the start. Since we were working against the clock, we had one person who constantly went around the table to see what each of us was working on and to make sure it was captured in the documentation. After the individual pieces were finished, this allowed us to piece them together more easily.

 

3. 1 + 1 = 3

Or in our case 6 x 1 = 10 (or something). Each of us has a different background, no two are the same. Because of this, we were able to share different perspectives and we were able to find the most efficient way to create the different pieces of the puzzle: e.g. Azure maps for station identification, canvas apps for a quick user interface and cloud flows for logic. Since we were not limited to one area of expertise, our solution combines the best of different worlds. In the process, we all learned from each other, either technical skills or an approach how to tackle something. And since we were all eager to learn from and share with each other, we had a lot of fun doing it. 👍🏼👍🏼

 

4. We are all developers

Each of us is building or creating something on a daily basis, be that using no-code, low-code or code-first platforms and tools. During the hackathon, we realized that our commonalities are more important than our differences. We share a common problem-solving and solution-oriented approach. We can define logic and we do it in very similar terms (if - then - else, anyone?). We can conceptualize solutions and explain them to each other. And then each of us can find some way using their own tools to build that solution. This is what makes us developers, not the language or tool set we build things in, but the approach and mindset we share. All of us are developers, and you can be one too.
 
NZ6_5087-focus (2).jpg
 
%3CLINGO-SUB%20id%3D%22lingo-sub-2877335%22%20slang%3D%22en-US%22%3EHow%203%20makers%2C%202%20devs%20and%20a%20princess%20came%20together%20to%20save%20kittens%20for%20a%20hackathon%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2877335%22%20slang%3D%22en-US%22%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22solution-overview.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319468iD5F7EB047AA17964%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22solution-overview.png%22%20alt%3D%22solution-overview.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%E2%80%83%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--321882481%22%20id%3D%22toc-hId--321882478%22%3E%3CSPAN%3EThe%20Story%20(Michael)%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EJust%20before%20Southcoast%20Summit%202021%20got%20started%2C%20the%20organizers%20hosted%20the%20%3C%2FSPAN%3E%3CSTRONG%3EAutomate%20Everything%20-%20SS2021%20Hackathon%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bwhere%20every%20solution%20revolves%20around%20Flic%20buttons.%20Wait%2C%20you%20don't%20know%20what%20a%20Flic%20button%20is%3F%20It's%20basically%20a%20wireless%20smart%20button%20that%20lets%20you%20control%20devices%2C%20apps%20and%20services.%20Push%20once%2C%20twice%20or%20hold%20the%20button%20and%20let%20each%20variant%20trigger%20a%20different%20action.%20There%20are%20multiple%20use%20cases%20in%20business%20but%20also%20in%20personal%20life%20in%20which%20Flic%20buttons%20make%20your%20life%20easier.%20Check%20out%20the%20%3C%2FSPAN%3E%3CA%20title%3D%22Flic%20homepage%22%20href%3D%22https%3A%2F%2FFlic.io%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%3EFlic%20homepage%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%26nbsp%3Bto%20learn%20more.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrolPushTitle.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319470i0F180A726FC4B81C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PetrolPushTitle.png%22%20alt%3D%22PetrolPushTitle.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%E2%80%83%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EMeet%20Petrol%20Push.%20A%20modern%20day%20organization%20that%20has%20a%20clear%20mission%3A%20Save%20kittens.%20There%20are%20hundreds%20of%20kittens%20all%20over%20Britain%20that%20get%20stuck%20in%20trees%2C%20get%20lost%20within%20the%20urban%20jungle%20or%20need%20help%20in%20any%20other%20kind%20of%20way.%20Luckily%20Petrol%20Push%20underholds%20a%20huge%20fleet%20of%20volunteers%20to%20rescue%20kittens%20every%20day.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSTRONG%3Ethe%20challenge%3C%2FSTRONG%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EAs%20you%20may%20know%20there%20is%20a%20petrol%20shortage%20happening%20right%20now%20and%20of%20course%20you%20wonder%2C%20how%20can%20Petrol%20Push%20keep%20up%20their%20noble%20mission%3F%20Flic%20Buttons%20and%20the%20Microsoft%20Power%20Platform%20gave%20them%20the%20ability%20to%20come%20up%20with%20a%20solutions%20to%20help%20all%20their%20volunteers%20in%20their%20day%20to%20day%20work.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSTRONG%3Ethe%20solution%3C%2FSTRONG%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EEvery%20Petrol%20Push%20car%20got%20a%20Flic%20button%20installed%20and%20whenever%20Petrol%20Push%20volunteers%20pass%20a%20gas%20station%2C%20they%20can%20indicate%20with%20a%20push%20of%20a%20button%2C%20whether%20the%20gas%20station%20has%20fuel%20available%20or%20not.%20This%20information%20gets%20stored%20on%20a%20map%20so%20every%20Petrol%20Push%20employee%20knows%20where%20fuel%20is%20available%20and%20where%20it's%20not.%20This%20way%20the%20volunteers%20can%20keep%20their%20focus%20on%20their%20mission.%20They%20don't%20need%20to%20drive%20around%20searching%20for%20fuel%20or%20worry%20where%20to%20gas%20up.%20The%20community%20of%20volunteers%20takes%20care%20of%20that.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EPetrol%20Push%20cares%20deeply%20about%20their%20volunteers%20so%20they%20don't%20want%20to%20put%20them%20in%20danger%20in%20any%20way.%20That's%20why%20this%20solution%20comes%20with%20a%20little%20extra.%20Petrol%20Push%20workers%20don't%20have%20to%20check%20the%20map%20over%20and%20over%20again%20to%20see%20whether%20anything%20has%20changed.%20If%20one%20of%20the%20volunteers%20found%20a%20gas%20station%20where%20fuel%20is%20available%2C%20the%20button%20gets%20pushed%20and%20the%20fleet%20will%20get%20notified%20with%20a%20song.%20That%20way%20the%20drivers%20know%20when%20to%20check%20the%20map%20for%20updates.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWithin%20these%20times%20it%20might%20happen%20that%20our%20drivers%20get%20in%20trouble%20themselves%2C%20run%20out%20of%20gas%2C%20have%20a%20flat%20tire%20or%20something%20else.%20Once%20again%2C%20Petrol%20Push%20cares%20about%20their%20volunteers%20deeply%20so%20the%20Flic%20button%20provides%20the%20opportunity%20to%20call%20other%20volunteers%20on%20the%20road%20for%20help.%20Once%20again%20with%20a%20song%2C%20so%20no%20other%20driver%20needs%20to%20check%20their%20phone.%20The%20position%20gets%20indicated%20on%20the%20map%20though%2C%20so%20that%20help%20can%20be%20arranged%20quickly.%20It's%20only%20the%20supervisor%20that%20gets%20an%20additional%20text%20message%20in%20order%20to%20provide%20further%20information.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CEM%3ENote%3A%20you%20will%20probably%20know%20by%20know%2C%20but%20this%20use%20case%20exemplifies%20the%20ability%20to%20combine%20geographic%20location%20with%20notifications%20that%20are%20not%20based%20on%20text.%20In%20this%20way%2C%20we%20want%20to%20draw%20attention%20to%20how%20versatile%20Power%20Platform%20solutions%20are%20and%20we%20also%20want%20to%20think%20about%20the%20people%20who%20can%20only%20use%20devices%20in%20a%20limited%20way.%20Please%20use%20this%20use%20case%20to%20customize%20it%20to%20your%20needs.%20And%20always%20remember%2C%20only%20as%20a%20community%20we%20are%20strong%2C%20so%20let's%20be%20inclusive%3C%2FEM%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ENow%2C%20let's%20dive%20into%20details%20and%20see%20how%20this%20solution%20actually%20works%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--2129336944%22%20id%3D%22toc-hId--2129336941%22%3E%3CSPAN%3EThe%20Flic%20and%20the%20flow%20(Tomasz)%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EIn%20a%20big%20picture%2C%20the%20flow%20was%20built%20to%20get%20information%20about%20location%20of%20a%20driver%20who%20triggered%20it%2C%20next%20to%20lookup%20details%20of%20the%20closest%20petrol%20station%20(%3CSTRONG%3Eby%20using%20%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3EAzure%20Maps%20API%3C%2FSTRONG%3E%3CSPAN%3E).%20Finally%20to%20save%20the%20station's%20data%20together%20with%20status%20into%20database%2C%20so%20later%20it%20can%20be%20displayed%20with%20a%20proper%20color%20of%20a%20pin%2C%20inside%20the%20app.%20But%20in%20details%2C%20it's%20much%20more%20interesting.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrolFlow%20-%20part1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319471i337E9C00F7D73F95%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PetrolFlow%20-%20part1.png%22%20alt%3D%22PetrolFlow%20-%20part1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EThe%20flow%20can%20be%20triggered%20by%20any%20driver%20(1).%20Also%2C%20for%20any%20Flic%20event%2C%20but%20that%20will%20be%20described%20later.%20Next%2C%20bot%20looks%20up%20details%20of%20the%20button%20itself%20(2)%2C%20to%20get%20its%20owner%20(3).%20This%20information%20will%20be%20later%20used%20to%20record%20data%20along%20with%20information%20about%20the%20driver.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%E2%80%83%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrolFlow%20-%20part2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319472i070F6BFD2307CC11%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PetrolFlow%20-%20part2.png%22%20alt%3D%22PetrolFlow%20-%20part2.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%E2%80%83%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ENext%20the%20flow%20calls%20%3C%2FSPAN%3E%3CSTRONG%3EAzure%20Maps%20custom%20connector%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bvia%20a%20dedicated%20child%20flow%20(1)%2C%20by%20passing%20latitude%20and%20longitude%20of%20a%20driver's%20location.%20Coordinates%20are%20obtained%20using%20GPS%20from%20driver's%20phone%20that%20is%20paired%20with%20Flic%20button.%20Obviously%20this%20should%20be%20done%20using%20the%20action%20directly%20within%20the%20parent%20flow%2C%20however%20for%20some%20%3C%2FSPAN%3E%3CEM%3Eunknown%20reasons%26nbsp%3B%3C%2FEM%3E%3CSPAN%3Ewe%20were%20facing%20an%20issue%20while%20saving%20process%20with%20the%20action%20inside%2C%20so%20we%20decided%20to%20move%20it%20into%20a%20child%20flow.%20Don't%20judge%20%3A)%3C%2Fimg%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EData%20returned%20by%20the%20child%20flow%2C%20that%20represents%20details%20about%20the%20nearest%20petrol%20station%20is%20then%20parsed%20(2).%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EFinally%20bot%20using%20postal%20code%20is%20filtering%20existing%20stations'%20data%20to%20get%20a%20match%20(3).%20This%20is%20done%20using%20ODATA%20expression%3A%20%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%3CCODE%3Ewoi_postalcode%20eq%20'%40%7Bfirst(body('Parse_JSON')%3F%5B'results'%5D)%3F%5B'address'%5D%3F%5B'extendedPostalCode'%5D%7D'%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E.%20Then%20it%20saves%20its%20row%20ID%20into%20variable%20(4).%20Naturally%2C%20if%20there's%20no%20station%20for%20the%20given%20postal%20code%2C%20variable%20will%20be%20empty.%20%3C%2FSPAN%3E%3CSPAN%3E**We%20also%20made%20an%20assumption**%3C%2FSPAN%3E%3CSPAN%3E%2C%20that%20there%20can%20be%20one%20station%20for%20a%20given%20postal%20code%20%3A)%3C%2Fimg%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrolFlow%20-%20part3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319473i2A10C7FC90971F39%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PetrolFlow%20-%20part3.png%22%20alt%3D%22PetrolFlow%20-%20part3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EProcess%20now%20checks%2C%20if%20station's%20row%20ID%20is%20empty%20(1)%20-%20if%20yes%2C%20it%20means%20it%20has%20to%20be%20created.%20Creation%20(2)%20of%20the%20record%20takes%20all%20the%20details%20returned%20from%20Azure%20Maps%20API%2C%20like%20full%20address%2C%20station%20name%2C%20lat%20and%20lon%2C%20information%20about%20driver%20who%20reported%20it%20and%20finally%20-%20the%20postal%20code.%20After%20that%20row%20ID%20of%20the%20created%20station%20is%20being%20saved%20into%20variable.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrolFlow%20-%20part4.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319474i08436340A12FBF89%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PetrolFlow%20-%20part4.png%22%20alt%3D%22PetrolFlow%20-%20part4.png%22%20%2F%3E%3C%2FSPAN%3E%3CP%3E%E2%80%83%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E2%80%83%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ENow%20process%20moves%20to%20check%20what%20kind%20of%20action%20occurred%20on%20the%20Flic.%20There%20are%203%20possible%20activities%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSTRONG%3ESingle%20click%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B-%20means%20that%20there's%20petrol%20on%20the%20station%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSTRONG%3EDouble%20click%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B-%20means%20that%20there's%20no%20petrol%20on%20the%20station%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSTRONG%3ELong%20press%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B-%20means%20there's%20an%20issue%20and%20driver%20requires%20assistance.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ETo%20check%20what%20action%20occurred%2C%20we%20are%20using%20switch%20action%20(1).%20For%20each%20branch%20process%20executes%20the%20same%20actions%2C%20just%20with%20different%20statuses.%20First%2C%20bot%20creates%20an%20entry%20in%20%3C%2FSPAN%3E%3CSTRONG%3EActivities%20table%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B(2)%2C%20to%20record%20latest%20status%20(to%20one%20from%20Petrol%2C%20No%20petrol%2C%20Issue)%20for%20the%20station%20together%20with%20driver%20details%20who%20reported%20it.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EAfter%20that%20is%20done%2C%20it%20updates%20status%20(again%20to%20one%20from%20Petrol%2C%20No%20petrol%2C%20Issue)%20of%20the%20station%20record%20itself%20(3).%20Then%20it%20saves%20created%20activity%20record%20OData%20id%20into%20a%20variable.%20And%20finally%20it%20relates%20records%20(4)%20-%20petrol%20station%20together%20with%20the%20created%20activity%20record.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PetrolFlow%20-%20part5.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319475i543BCD42F0020ED6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PetrolFlow%20-%20part5.png%22%20alt%3D%22PetrolFlow%20-%20part5.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWhat%20is%20also%20worth%20to%20mention%20is%20that%20the%20whole%20process%20is%20built%20using%20the%20%3C%2FSPAN%3E%3CSPAN%3E%3CSTRONG%3Etry-catch%3C%2FSTRONG%3E%20pattern%3C%2FSPAN%3E%3CSPAN%3E.%20All%20actions%20that%20are%20executed%20in%20terms%20of%20the%20business%20logic%20are%20stored%20in%20the%20%22Try%22%20scope%20(1).%20If%20anything%20fails%20within%20the%20scope%2C%20it%20is%20caught%20by%20the%20%22Catch%22%20scope%20(2)%2C%20that%20has%20it's%20%22Run%20after%22%20settings%20configured%20to%20only%20be%20executed%20if%20previous%20actions%20fails%2C%20times%20out%20or%20is%20skipped.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EProcess%20in%20the%20%22Catch%22%20scope%20first%20filters%20(3)%20results%20of%20the%20%22Try%22%20scope%2C%20using%20the%20expression%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3Eresult('Try')%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%20to%20leave%20only%20those%20entries%20which%20contain%20information%20about%20errors%3A%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3E%40equals(createArray('Failed'%2C%20'TimedOut')%2C%20'')%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E.%20Next%20for%20each%20such%20record%20(4)%20it%20is%20adding%20information%20about%20the%20details%20to%20a%20string%20variable.%20Finally%2C%20variable's%20contents%20is%20sent%20to%20admin%20as%20a%20notification%20(5)%20and%20the%20whole%20process%20ends%20up%20with%20%22Failed%22%20outcome.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22show-me-something-beautiful---the-canvas-app-carmen%22%20class%3D%22code-line%22%20data-line%3D%2263%22%20id%3D%22toc-hId-358175889%22%20id%3D%22toc-hId-358175892%22%3EShow%20me%20something%20beautiful%20-%20The%20canvas%20app%20(Carmen)%3C%2FH2%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWith%20the%20data%20stored%20in%20Dataverse%2C%20the%20canvas%20app%20can%20be%20created%20to%20display%20the%20available%20information%20and%20inform%20the%20people%20where%20they%20can%20find%20fuel.%20The%20canvas%20app%20consists%20of%20a%20header%20(with%20the%20company%20logo%2C%20name%20and%20refresh%20icon)%20and%20a%20map%20control.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWe%20are%20using%20the%20built-in%20map%20control%2C%20which%20allows%20us%20to%20display%20the%20gas%20stations%20with%20their%20appropriate%20color%2C%20automatically%20center%20on%20the%20user's%20current%20location%20and%20display%20additional%20information%20about%20each%20gas%20station%20when%20selecting%20the%20location%20pin.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ETo%20get%20the%20location%20pins%20on%20the%20map%2C%20we%20added%20the%20Dataverse%20table%20as%20a%20source%20in%20the%20%3CSTRONG%3EI%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%3Etems%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bproperty%20of%20the%20map%20control.%20We%20are%20currently%20not%20doing%20any%20filtering%2C%20but%20this%20could%20be%20added%20if%20needed.%20The%20latitude%2C%20longitude%2C%20labels%20and%20colors%20is%20each%20contained%20in%20a%20specific%20column%20within%20the%20data%20source.%20These%20are%20provided%20as%20values%20for%20the%20following%20properties%20(where%20the%20text%20between%20quotes%20is%20the%20name%20of%20the%20column%20in%20the%20Dataverse%20table)%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSPAN%3E%3CSTRONG%3EItemsLabels%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3E%22woi_name%22%3C%2FCODE%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSPAN%3E%3CSTRONG%3EItemsLatitudes%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3D%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3E%22woi_latitude%22%3C%2FCODE%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSPAN%3E%3CSTRONG%3EItemsLongitudes%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3E%3D%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3E%22woi_longitude%22%3C%2FCODE%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSPAN%3E%3CSTRONG%3EItemsColors%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3D%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3E%22woi_color%22%3C%2FCODE%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EThe%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3Ewoi_colors%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%20columns%20is%20defined%20as%20a%20calculated%20column%20that%20is%20influenced%20by%20the%20value%20of%20the%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3EPetrol%20Status%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%20column%20in%20the%20same%20table.%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3EPetrol%20Status%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%20contains%20the%20last%20known%20status%20of%20fuel%20at%20the%20respective%20station.%20The%20colors%20are%20defined%20as%20hex%20values%20with%20the%20following%20mapping%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3E%20Last%20Known%20Status%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3E%20Color%20%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3EColor%20name%20%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3EPetrol%20%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3E%22%2366FF00%22%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3ELight%20Green%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3ENo%20petrol%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3E%22%23FF0000%22%20%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3ERed%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3EIssue%20%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3E%22%23FFBF00%22%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2233.333333333333336%25%22%3E%3CSPAN%3EAmber%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EThe%20color%20of%20the%20grouped%20pins%20is%20defined%20by%20the%20%3C%2FSPAN%3E%3CSTRONG%3EPinColor%3C%2FSTRONG%3E%3CSPAN%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3Eproperty%20of%20the%20map%20control.%20It%20is%20set%20to%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3EGreen%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%2C%20which%20is%20a%20darker%20color%20than%20the%20green%20used%20for%20the%20stations%20with%20fuel.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWhen%20a%20pin%20is%20selected%2C%20the%20info%20card%20is%20shown.%20This%20is%20defined%20by%20setting%20the%20%3C%2FSPAN%3E%3CSPAN%3E%3CSTRONG%3EInfoCards%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3Bproperty%20of%20the%20map%20to%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3EMicrosoft.Map.InfoCards'.OnClick%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E.%20The%20fields%20that%20are%20shown%20on%20the%20info%20card%20are%20defined%20by%20editing%20the%20%3C%2FSPAN%3E%3CSPAN%3E**Fields**%3C%2FSPAN%3E%3CSPAN%3E%20in%20the%20properties%20pane%20of%20the%20map.%20Four%20fields%20are%20shown%20on%20the%20info%20card%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20Name%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20Address%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20Postal%20code%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3E%20Modified%20on%20(to%20know%20when%20the%20station's%20status%20was%20last%20updated)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EThis%20can%20be%20seen%20on%20the%20below%20screenshot.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22App-MapFields.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319476iC32E7F0A0181BA18%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22App-MapFields.png%22%20alt%3D%22App-MapFields.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EThe%20resulting%20app%20shows%20a%20map%20with%20all%20identified%20gas%20stations%20and%20their%20last%20known%20status%2C%20indicated%20with%20the%20color%20of%20the%20pin.%20Selecting%20a%20specific%20gas%20station%20provides%20the%20user%20with%20more%20information%20on%20that%20station.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22App-Details.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319477i561A0D1A159072D3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22App-Details.png%22%20alt%3D%22App-Details.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1449278574%22%20id%3D%22toc-hId--1449278571%22%3E%3CSPAN%3EWe%20need%20a%20real%20map%20-%20The%20custom%20connector%20to%20Azure%20Maps%20(Lee)%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EA%20key%20part%20of%20the%20solution%20is%20populating%20a%20list%20of%20petrol%20stations%20and%20their%20status%20based%20on%20presses%20of%20the%20Flic%20button.%20We%20initially%20looked%20to%20use%20the%20built-in%20Bing%20maps%20Power%20Automate%20connector%20and%20actions%20to%20find%20the%20current%20address%20when%20a%20Flic%20button%20was%20used.%20However%2C%20this%20would%20return%20the%20nearest%20address%2C%20which%20is%20not%20necessarily%20a%20petrol%20station%20(e.g.%20it%20could%20be%20a%20house%20on%20the%20opposite%20side%20of%20the%20street%20which%20is%20deemed%20nearer).%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ETo%20work%20around%20this%2C%20we%20created%20an%20Azure%20Maps%20resource%20in%20Azure.%20Azure%20Maps%20can%20return%20a%20list%20of%20addresses%20within%20a%20certain%20radius%20that%20fit%20a%20particular%20%22POI%20(point%20of%20interest)%20category%22%20-%20in%20this%20case%20a%20petrol%20station.%20Using%20the%20%3C%2FSPAN%3E%3CSPAN%3E%3CCODE%3Esubscription-key%3C%2FCODE%3E%3C%2FSPAN%3E%3CSPAN%3E%20(API%20key)%20from%20the%20Azure%20Maps%20resource%2C%20we%20were%20able%20to%20create%20a%20custom%20connector%20in%20Power%20Automate%20and%20query%20for%20the%20nearest%20petrol%20stations%20to%20the%20longitude%20and%20latitude%20when%20the%20Flic%20button%20was%20pressed.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1038234259%22%20id%3D%22toc-hId-1038234262%22%3E%3CSPAN%3EBring%20me%20the%20vibes%20-%20The%20Spotify%20connector(Yannick)%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWe%20like%20to%20celebrate%20victories%20and%20help%20each%20other%20in%20times%20of%20need%2C%20and%20what%20better%20way%20than%20use%20music%20for%20this%3F%20We%20have%20a%20sound%20system%20in%20the%20office%20connected%20to%20Spotify%20so%20let's%20use%20that%20to%20keep%20everyone%20updated%20on%20things%20that%20happen%20on%20the%20road!%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EA%20new%20Power%20Automate%20flow%20will%20trigger%20every%20time%20a%20new%20petrol%20station%20status%20is%20logged%2C%20excluding%20when%20no%20petrol%20was%20available.%20In%20the%20case%20someone%20found%20Petrol%20at%20a%20gas%20station%2C%20we%20get%20super%20excited%20for%20our%20colleague%20and%20play%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fopen.spotify.com%2Ftrack%2F6FUwPb4mGlUDbx42uspXaZ%3Fsi%3D127b17aad3f2448d%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EFuel%20by%20Metallica%3C%2FA%3E%3CSPAN%3E%26nbsp%3Bin%20the%20office%20to%20have%20a%20small%20party.%20When%20someone%20gets%20in%20trouble%2C%20for%20whatever%20reason%2C%20we%20play%20%3C%2FSPAN%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fopen.spotify.com%2Ftrack%2F0R8P9KfGJCDULmlEoBagcO%3Fsi%3D97cdd52cd87449c5%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ETrouble%20by%20Coldplay%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E(so%20we%20know%20we%20need%20to%20rush%20to%20rescue)%20and%20a%20text%20message%20is%20sent%20to%20the%20manager.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EIntegrating%20with%20Spotify%20isn't%20too%20difficult%20(the%20API%20is%20well-documented)%20but%20requires%20the%20creation%20of%20a%20custom%20connector%20with%20following%20API%20actions%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.spotify.com%2Fdocumentation%2Fweb-api%2Freference%2F%23%2Foperations%2Fget-a-users-available-devices%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGet%20a%20User's%20Available%20Devices%3C%2FA%3E%3C%2FSPAN%3E%3CSPAN%3E%3A%20fetch%20a%20list%20of%20all%20devices%20currently%20connected%20to%20the%20Spotify%20service%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E-%3C%2FSPAN%3E%20%3CA%20href%3D%22https%3A%2F%2Fdeveloper.spotify.com%2Fdocumentation%2Fweb-api%2Freference%2F%23%2Foperations%2Fstart-a-users-playback%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%3EStart%2FResume%20a%20User's%20Playback%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%3A%20play%20a%20song%20on%20a%20specific%20device%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWhen%20combining%20both%2C%20we%20can%20first%20fetch%20all%20connected%20devices%20and%20then%20filter%20them%20on%20the%20device%20id%20of%20our%20office%20sound%20system.%20If%20the%20device%20is%20connected%2C%20we%20can%20play%20the%20appropriate%20song%20for%20the%20occasion%20with%20the%20second%20API%20call.%20%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EAnd%20lastly%2C%20for%20the%20text%20message%20we'll%20use%20Twilio.%20Luckily%20they%20have%20an%20existing%20connector%20within%20Power%20Automate%20so%20it's%20only%20a%20matter%20of%20registering%20for%20a%20Twilio%20account%2C%20getting%20a%20number%20to%20send%20messages%20from%20and%20configuring%20the%20action%20in%20our%20flow.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--769220204%22%20id%3D%22toc-hId--769220201%22%3E%3CSPAN%3EThe%20princess%20and%20the%20push%20(Luise)%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EStraight%20from%20the%20beginning%20of%20the%20hackathon%2C%20we%20took%20care%20of%20documenting%20our%20architecture%20decisions%20and%20how%20we%20would%20implement%20them.%20We%20set%20up%20a%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FLuiseFreese%2FHacksouthCoastSummit%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EGitHub%20repository%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%2C%20invited%20everyone%20in%20the%20team%20so%20they%20could%20commit%20their%20files.%20We%20continued%20to%20document%20all%20major%20steps%20so%20that%20everyone%20could%20use%20this%20as%20a%20reference%20to%20explain%20our%20solution%2C%20although%20each%20member%20was%20only%20in%20charge%20of%20their%20workload.%20Getting%20all%20information%20and%20documenting%20while%20building%20ensured%20accuracy%20but%20also%20gave%20an%20opportunity%20to%20think%20through%20the%20app%20and%20reflect%20on%20decisions.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EDocumentation%20includes%20screenshots%20of%20the%20flows%2C%20explains%20the%20data%20model%20and%20environment%20variables.%20We%20also%20published%20the%20solution%20itself%20in%20this%20repository%20to%20give%20community%20the%20chance%20to%20play%20with%20our%20app.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1718292629%22%20id%3D%22toc-hId-1718292632%22%3E%3CSPAN%3EWhat%20can%20we%20learn%20from%20this%20epic%20quest%3F%20(everybody)%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EAs%20a%20group%2C%20we%20discussed%20the%20hackathon%20for%20quite%20a%20while%20even%20after%20it%20had%20ended%2C%20and%20we%20came%20up%20with%2C%20for%20us%2C%20four%20important%20lessons%20this%20experience%20has%20taught%20us.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1886113193%22%20id%3D%22toc-hId--1886113190%22%3E%3CSPAN%3E1.%20Do%20one%20thing%20the%20right%20way%2C%20instead%20of%20a%20million%20things%20in%20a%20messy%20way%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CDIV%3E%3CSPAN%3EWhat%20helped%20us%20build%20this%20solution%20in%20a%20short%20timespan%2C%20was%20that%20each%20person%20of%20the%20team%20was%20responsible%20for%20a%20specific%20part%20of%20the%20solution.%20There%20was%20no%20context%20switching%20between%20the%20app%20studio%20and%20building%20the%20cloud%20flow%20for%20example.%20Instead%2C%20we%20made%20some%20agreements%20in%20the%20beginning%20of%20the%20day%20and%20let%20each%20other%20know%20verbally%20and%20in%20the%20documentation%20if%20anything%20needed%20to%20change.%20This%20allowed%20all%20of%20us%20to%20focus%20on%20their%20own%20part%2C%20resulting%20in%20finished%20pieces%20to%20the%20puzzle.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-601399640%22%20id%3D%22toc-hId-601399643%22%3E%3CSPAN%3E2.%20Take%20care%20of%20documentation%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CDIV%3E%3CSPAN%3ESince%20development%20was%20decentralized%2C%20it%20was%20important%20we%20could%20keep%20each%20other%20up%20to%20date%20on%20what%20we%20were%20doing.%20Therefore%2C%20we%20documented%20from%20the%20start.%20Since%20we%20were%20working%20against%20the%20clock%2C%20we%20had%20one%20person%20who%20constantly%20went%20around%20the%20table%20to%20see%20what%20each%20of%20us%20was%20working%20on%20and%20to%20make%20sure%20it%20was%20captured%20in%20the%20documentation.%20After%20the%20individual%20pieces%20were%20finished%2C%20this%20allowed%20us%20to%20piece%20them%20together%20more%20easily.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1206054823%22%20id%3D%22toc-hId--1206054820%22%3E%3CSPAN%3E3.%201%20%2B%201%20%3D%203%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CDIV%3E%3CSPAN%3EOr%20in%20our%20case%206%20x%201%20%3D%2010%20(or%20something).%20Each%20of%20us%20has%20a%20different%20background%2C%20no%20two%20are%20the%20same.%20Because%20of%20this%2C%20we%20were%20able%20to%20share%20different%20perspectives%20and%20we%20were%20able%20to%20find%20the%20most%20efficient%20way%20to%20create%20the%20different%20pieces%20of%20the%20puzzle%3A%20e.g.%20Azure%20maps%20for%20station%20identification%2C%20canvas%20apps%20for%20a%20quick%20user%20interface%20and%20cloud%20flows%20for%20logic.%20Since%20we%20were%20not%20limited%20to%20one%20area%20of%20expertise%2C%20our%20solution%20combines%20the%20best%20of%20different%20worlds.%20In%20the%20process%2C%20we%20all%20learned%20from%20each%20other%2C%20either%20technical%20skills%20or%20an%20approach%20how%20to%20tackle%20something.%20And%20since%20we%20were%20all%20eager%20to%20learn%20from%20and%20share%20with%20each%20other%2C%20we%20had%20a%20lot%20of%20fun%20doing%20it.%20%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%40B1B24116D7E68839E1C5A616992231F4%2Femoticons%2F1f44d_1f3fc.png%22%20alt%3D%22%3Athumbs_up%3A%22%20title%3D%22%3Athumbs_up%3A%22%20%2F%3E%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%40B1B24116D7E68839E1C5A616992231F4%2Femoticons%2F1f44d_1f3fc.png%22%20alt%3D%22%3Athumbs_up%3A%22%20title%3D%22%3Athumbs_up%3A%22%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-586294531%22%20id%3D%22toc-hId-586294534%22%3E%3CSPAN%3E4.%20We%20are%20all%20developers%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CDIV%3E%3CSPAN%3EEach%20of%20us%20is%20building%20or%20creating%20something%20on%20a%20daily%20basis%2C%20be%20that%20using%20no-code%2C%20low-code%20or%20code-first%20platforms%20and%20tools.%20During%20the%20hackathon%2C%20we%20realized%20that%20our%20commonalities%20are%20more%20important%20than%20our%20differences.%20We%20share%20a%20common%20problem-solving%20and%20solution-oriented%20approach.%20We%20can%20define%20logic%20and%20we%20do%20it%20in%20very%20similar%20terms%20(if%20-%20then%20-%20else%2C%20anyone%3F).%20We%20can%20conceptualize%20solutions%20and%20explain%20them%20to%20each%20other.%20And%20then%20each%20of%20us%20can%20find%20some%20way%20using%20their%20own%20tools%20to%20build%20that%20solution.%20This%20is%20what%20makes%20us%20developers%2C%20not%20the%20language%20or%20tool%20set%20we%20build%20things%20in%2C%20but%20the%20approach%20and%20mindset%20we%20share.%20All%20of%20us%20are%20developers%2C%20and%20you%20can%20be%20one%20too.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NZ6_5087-focus%20(2).jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319478i44FFA7D637B742B7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22NZ6_5087-focus%20(2).jpg%22%20alt%3D%22NZ6_5087-focus%20(2).jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2877335%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22solution-overview.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F319469i47DBBD6061E79354%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22solution-overview.png%22%20alt%3D%22solution-overview.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBetterTogether%20story%20about%20a%20team%20with%20diverse%20backgrounds%20building%20a%20solution%20at%20SouthCoastSummit%20hackathon%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Version history
Last update:
‎Oct 24 2021 03:33 AM
Updated by: