
Announcements
Hello everyone
I have a form where entries are made. These entries then go into a Sharepoint list via PowerAutomate, which works fine so far . Now I would like to extend the list and add images to it. In other words, you should be able to upload an image in the form, which should then also be entered in the list via the PowerAutomate flow. I have added a new "Image" column to the list in Sharepoint. However, this new image column is not displayed as a parameter in the "Create Sharepoint Elemet" flow (if for example I add a text column, it is displayed as a parameter). Can someone help me out? I also addet a picture for visualization of the subject.
Thanks in advance!
Hi @Bberger1,
If it is not showing up you can as a workaround use a Send an HTTP request to SharePoint action to update the item after creating it. That action should support updating an Image column.
Below is an example
In this sample I assume your MS Forms is a personal one. In that case all uploaded files would be stored in the OneDrive of the person who created the form. That direct link cannot be used in the Image column, that's why I am copying it to a SharePoint library instead before using it in an image column.
1. Get File metadata using the question id of the Bild hochladen question
first(json(outputs('Get_response_details')?['body/r76dd09f186484e3587d685c8f71a60de']))['id']
2. Send an HTTP request uses the below
a. URI
_api/web/lists/getbytitle('@{variables('ListName')}')/items(@{outputs('Create_item')?['body/ID']})
b. Headers (I am using nometadata headers, this way you don't have to figure out the ListItemEntityTypeFullName value 😁)
{
"Accept": "application/json;odata=nometadata",
"Content-Type": "application/json;odata=nometadata",
"If-Match": "*",
"X-HTTP-Method": "MERGE"
}
c. Body (make sure you change the serverUrl and ServerRelativeUrl values)
{"Bild": "{\"type\":\"thumbnail\",\"fileName\":\"@{outputs('Copy_file')?['body/Name']}\",\"fieldName\":\"Bild\",\"serverUrl\":\"https://contoso.sharepoint.com\",\"serverRelativeUrl\":\"/sites/PowerUsers@{outputs('Copy_file')?['body/Path']}\"}"
}
The result should look like the below