Exercise - Build a flow that uses information like locations or date

Completed

You can build instant flows that use information like Global Positioning System (GPS) data, date information, or email. This information is available as trigger tokens. Trigger tokens are data points that are known and available to the device that an instant flow is running on. These tokens change, based on factors like the current time or the current geographic location of the device.

For example, if you run an instant flow on a phone, the phone probably knows the time at your current location, the date, and your current address. In other words, the time and date, and the address where the phone is located, are determined when the instant flow runs. They're automatically available for use in any instant flows that are run on the device.

You can use these trigger tokens to build useful flows that minimize repetitive tasks. Such tasks include providing your location to someone or tracking how much time you spent on a particular job or service call.

List of instant trigger tokens

Here's the list of instant trigger tokens that are available to you when you create instant flows.

Parameter Description
City The city where the device that's running the flow is located.
Country/Region The country/region where the device that's running the flow is located.
Full address The full address where the device that's running the flow is located.
Latitude The latitude where the device that's running the flow is located.
Longitude The longitude where the device that's running the flow is located.
PostalCode The postal code where the device that's running the flow is located.
State The state where the device that's running the flow is located.
Street The street where the device that's running the flow is located.
Timestamp The time in the area where the device that's running the flow is located.
Date The date in the area where the device that's running the flow is located.
User name The user name of the person who's signed in to the device that's running the flow.
User email The email address of the person who's signed into the device that's running the flow.

Create an instant flow that uses trigger tokens

When you create an instant flow, you can use trigger tokens to add rich functionality to it.

Let's create an instant flow on a mobile device to let your colleagues know you're working from home today.

Although the procedures in this unit show screenshots from an Apple iOS device, the experience is similar on Android and Windows Phone devices.

Prerequisites

Create the Instant flow

Note

As of January, 2024, searching for templates in Power Automate mobile app is unavailable. We first create the flow using Power Automate on a desktop computer and then switch to Power Automate Mobile to configure and see the flow run.

  1. From the Power Automate home page, select Templates from the left hand menu.

  2. Search for Working from home today and select the Send a "Working from home today" email to your colleagues service.

    Screenshot of a 'Working from home today' email.

  3. Make sure your connections have a green check mark next to them. You might need to sign in to the Office 365 Users connection and create a connection to Notifications. Select Continue.

  4. Now we switch to Power Automate mobile to edit and run the flow.

  5. Open the Power Automate mobile app and sign in with your organizational credentials.

    Note

    When you first sign in, you may need to select the environment from the top right hand side.

  6. Select the three dots next to the flow name and select Edit.

  7. Once the flow opens and you can see the actions, select the Apply to Each action and then select the Send an Email action that's inside of the Apply to Each. The Send an email action expands to show options to configure the email.

  8. Select the Subject field, and enter WFH today. Notice that when you selected the Subject field, a list of tokens appeared below. While the cursor is still in the Subject field, scroll down until you see the Date field at the bottom in blue and select it. Notice that the date token now appears in the Subject field.

    Screenshot of the Date token added to the Subject field and the Done button highlighted.

  9. Scroll to the Body field and select the default message so that you can add tokens there.

  10. Scroll down to find the Full Address token and select it. The Full Address token is now in the body of the email.

    Screenshot of the Full Address token

  11. Scroll down to the bottom of the flow and select Save. You should receive a message that says Flow edited successfully.

Run the Instant flow

Note

This instant flow sends your current location via email.

  1. Select the back arrow in the top left hand corner to return to the Power Automate mobile home page.

  2. Select the Instant Flows at the bottom of the screen. You see a list of the instant flows that you have permissions to use. Select the instant flow you want to run.

    Screenshot of instant flows tab with the Send a Working from home today email to your colleagues highlighted.

  3. Your device might prompt you to let the instant flow access your device's location information. If necessary, allow Power Automate access to your location in your phone's settings.

  4. Select Run Flow.

    In a few moments, you'll notice that the email sent successfully.

Congratulations! You just created an instant flow that uses both the Date and Full Address trigger tokens.