
Title: PowerApps Image to SharePoint
Description: This Flow will allow you to take an image uploaded from PowerApps with the Image control and upload it to a SharePoint Document library using the JSON function in PowerApps.
Detailed Instructions: In your PowerApp, you need to convert your image to JSON so that you can pass that JSON to Flow. Insert an Add an Image Control in PowerApps and add a button with the following formula:
Collect(
image,
{
picture: UploadedImage1.Image,
Name: Rand() & ".jpg"
}
);
Set(
varJSON,
Json
JSON(
image,
JSONFormat.IncludeBinaryData
)
);
Set(
imageLink,
JSONtoImage.Run(varJSON).imagelink
);
The first formula will take your uploaded image and add it to a collection with the file and the name of the file. The second formula takes the image from the collection, converts it to JSON and assigns it to a variable. The final formula is executing the Flow, passing in the JSON to the Flow and is setting the newly created link to the image in a variable.
Questions: I am open to answering questions about this Flow. Please ask right here as a reply.
Anything else we should know: This is a great solution to take your images from PowerApps and upload them to SharePoint.