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.
TextInput is just used as file name, and button triggers Flow described later.
For Microphone control, set below function in OnStop property:
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"
We can now store microphone audio to SharePoint library.
Last, execute flow "SaveAudio" by select button:
OnSelect : SaveAudio.Run(strB64Audio,TextInput1.Text)
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 :-)