More than 3 years have passed since last update.

Saving microphone audio recorded in PowerApps into SharePoint library

Last updated at Posted at 2019-06-07


Saving microphone audio recorded in PowerApps into SharePoint library has been discussed long time, but AFAIK there is no “low-coding” solution for this challenge.

Today, we have ability to convert images and audios to base64 string by using JSON function in PowerApps. (See here)

and here I summarized simple & low-coding solution for saving audio from Microphone to SharePoint Library using JSON and Flow.

NOTE: This approach only works well in PC browser, not mobile device.


First I assumed that there added 1 Microphone control, TextInput, and Button in my app.

TextInput is just used as file name, and button triggers Flow described later.

For Microphone control, set below function in OnStop property:

Set(strB64Audio, Mid(tmpJson,25,Len(tmpJson)-25);

where IncludeBinaryData is key to convert Microphone audio into base64 string.
The remaining part Mid(...) is extracting base64-ed content from generated string.



Saving base64ed audio into SharePoint library is very simple and straightforward.
1. Initialize string variable using "Ask in PowerApps" with name "b64Audio"
2. Add Create file action of SharePoint connector with
- Filename : Ask in PowerApps
- Filecontent : base64ToBinary(variables('b64Audio'))
* Other parameters are your site and some document library which you want to store file.

Save flow with name "SaveAudio"
Ref: http://johnliu.net/blog/2017/7/building-non-json-webservices-with-flow

Back to PowerApps

We can now store microphone audio to SharePoint library.
Last, execute flow "SaveAudio" by select button:

 OnSelect : SaveAudio.Run(strB64Audio,TextInput1.Text)

Check result

This provides you easy & low-coding solution to save microphone audio to SharePoint list.
You can apply this method for meeting note with recording or some fun apps :-)

Have fun!!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up