Published on

Attach Images from Microsoft Forms into a SharePoint List item.



So a friend asked me the other day how she could build a simple contact-form where she could upload image attachment and then save it all to a SharePoint list. So I thought I might as well create a blogpost about it! :)

Lets get started:

  1. First visit forms:

  2. Press new form and create your form:

  3. Add an upload file:

  1. Press Collect Responses and Copy the link
  1. Visit power Automate and choose Automated Cloud flow, we want this because we want to trigger each time a new form is submitted

  2. Choose these:

  1. Now save and do a test run! Submit an response.
    This is because we want get the Json from the compose as well as the path for the file
  1. Now check previous run and copy the JSON from the previous run.
  1. Edit the flow and add Parse Json select Outputs as source and press generate from Sample and paste in the json from previous run that you just copied:
  1. Now go into your onedrive copy the path

Here you need to choose choose the Path for your form, it should be under:


  1. Now select SharePoint Connector and choose Send an HTTP Request to SharePoint, select the Sharepoint site:
| Name         | Value                                                              |
| ------------ | ------------------------------------------------------------------ |
| Site Address |                   |
| Method       | POST                                                               |
| Uri          | _api/web/lists/getbytitle('My Personal information')/items|
| Headers      | Accept: application/json; odata=nometadata                         |
| Headers      | content-type: application/json; odata=nometadata                   |
| Body         |                                                                    |
  "__metadata": {
    "type": "SP.Data.LogoUniverseListItem"
  "Title": "Power Automate",
  "ProfileImage": "{\"type\":\"thumbnail\",\"fileName\":\"@{items('Apply_to_each')['name']}\",\"fieldName\":\"ImageColumnName\",\"serverUrl\":\"\",\"serverRelativeUrl\":\"/personal/admin_avarante_onmicrosoft_com/Documents/Apps/Microsoft%20Forms/Personal%20Information%20Form/Question/@{items('Apply_to_each')['name']}\"}"

The flow should look something like this


And that should do it: