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 November 2024, searching for templates in Power Automate mobile app is unavailable. Though it is possible to scroll through a short list, and use the See more templates option, it is more expedient to 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 browser-based Power Automate home page (make.powerautomate.com), 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. Save the flow and return to 'My flows' to ensure that you have the new flow in your list.

  4. Now we can 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, where your flow lives, from the top right hand side. It is the button that appears as a globe on a squished rectangle.

  6. Go to the Flows tab (bottom left icon) and select the flow you just saved from your browser.

  7. When the Flow details opens, select the pencil icon in the top right to Edit the flow.

  8. In the Edit flow screen you should see all of the flow actions. Select the Apply to Each action to expand it, 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.

  9. Let's modify the Subject field of the email. Select inside of the Subject entry field and enter WFH today and add a space. Notice that when you selected the Subject field, a list of tokens appeared below. You can scroll down to see all of the available tokens. 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. Scroll back up to the Subject line. 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.

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

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

    Screenshot of the Full Address token

  12. Scroll down to the bottom of the flow and select Save. You should receive a popup message that says Flow edited successfully. Tap Ok to close it.

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, and you see a notification on your mobile device from Power Automate that your flow that "WFH email was sent successfully!".

Tip

If your flow is failing, it's probably because flow is unhappy with your connections. The best place to fix your connections is in the browser version of Power Automate. Select any steps that have failed and use the Change connection feature to try another connection.

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