Showing results for 
Search instead for 
Did you mean: 

Buttons, Excel, Approvals and notifications


Buttons, Excel, Approvals and notification in one MS Flow. Tracking a starting and end point into Excel, by triggering a button. This is a flow that I will talk about today!

The solution will have two Flow's that could be triggered by a button. The values will be added to an excel file that is stored on OneDrive for Business. By registering the starting point with address, start date, start time and also the information of end point. I could calculated travel times between the start and end point.



We have created a n Excel file that looks like this and contains followzing headers: StartAddress, StartDate, StartTime, EndAddress, EndDate and EndTime. __PowerAddId__ is used to create a unique id of the tracking line.

Using two MS Flow buttons to register the start and end point, including some checks to verify the current tracking status of the Flow.

Button: Start Travel Tracking

Overview flow:


Format Date: formatDateTime(triggerOutputs()['headers']['x-ms-user-timestamp'],'yyyyMMdd')
Format Time: convertFromUtc(triggerOutputs()['headers']['x-ms-user-timestamp'],'Romance Standard Time','HH:mm')

Adjust time to CET time.


Getting the rows of an XLS file that is located on the OneDrive for Business.


Getting the last row of the Excel file, by using following expression: last(body('Get_Rows')?['value'])

Flow05-05.pngCreating an Array of the last row: array(Outputs('Last_Row_Excel'))
Flow05-06.pngAdd an Apply to each for the outputs of Array Last Row Excel

Flow05-07.pngIn the condition we check if the Start and End Date has been filled in, when filled in we need to add a new row, else we notify that the travel tracking was already started and not been ended correctly.



StartDate: Outputs[‘Format_Date’]
StartTime: Outputs[‘Format_Time’]
__PowerAppsID__: triggerOutputs()[‘headers][‘x-ms-user-timestamp’]





Approval notification will be sent to the mobile app, for the question [Stop Travel Tracking?]




Format Time End: convertFromUtc(body('Current_Time'),'Romance Standard Time','HH:mm')
Convert to CET Time


Last Row Excel End: last(body('Get_Rows_End')?['value'])
Array Last rowExcel End: array(outputs('Last_Row_Excel_End'))

Do nothing



Overview Flow:



Format Date: formatDateTime(triggerOutputs()['headers']['x-ms-user-timestamp'],'yyyyMMdd')
Format Time to West Europe (CET): convertFromUtc(triggerOutputs()['headers']['x-ms-user-timestamp'],'RomanceStandard Time','HH:mm')


Get lastrow of the Excel file
Last Row Excel: last(body('Get_Rows')?['value'])
Array Last Row Excel: array(outputs('Last_Row_Excel'))



When the End Date has been already filled in we notify by sending a notification towards the Microsoft Flow app.
Enjoy! Feedback is welcome
Like, Share!
Would you like more of these Flow examples? Suggestions are welcome ...


Thanks, very nice exemple 

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • SharePoint, Microsoft 365 and Power Platform Developer | Contributor on SharePoint StackExchange
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -