Hi @Colin W Otto,
Thanks for reaching out to us. We are very pleased to support you.
My site name: 25Apr
My list name: List2
My image column name: picture1
I will use the example of saving the image in picture1. In the example I will use <>
to indicate where you need to replace your site name, your list name and image column name.
Step 1: Add action "When an item is created" to trigger your flow.
Step 2: Add action "Get item" to get the new created item.
Step 3: Add action "Initialize variable" to save image file extension.
Step4: Add action "Scope" to start getting the image in the picture1 column.
Step5: Add action "Send an HTTP request to SharePoint".
Uri:
/_api/lists/getbytitle('<your list name>')/items(@{triggerOutputs()?['body/ID']})/<your column name>
For example:
/_api/lists/getbytitle('List2')/items(@{triggerOutputs()?['body/ID']})/picture1
Step5: Add action "Condition" to determine if the column has an image.
body('Send_an_HTTP_request_to_SharePoint')?['d']?['<your column name>'] is not equal to null
For example:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['picture1'] is not equal to null
Step6: Under "If yes" add action "Parse JSON".
Content:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['<your column name>']
For example:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['picture1']
Schema:
{
"type": "object",
"properties": {
"fileName": {
"type": "string"
},
"originalImageName": {
"type": "string"
}
}
}
Step7: Get file content
File Identifier:
encodeUriComponent(concat('/',body('Get_item')?['{Path}'],'Attachments/',body('Get_item')?['ID'],'/',body('Parse_JSON')?['fileName']))
Step8: Add action "Set variable" to save file extension.
Value:
last(split(body('Parse_JSON')?['fileName'],'.'))
Step9: Add action "Create file":
Select the folder you want to save the image.
FileName:
concat(body('Parse_JSON')?['originalImageName'],'.',variables('Extension'))
Note: Here I chose the name of the uploaded image as the name of the image saved to the folder, you can customize your image naming style here but be sure to add the file extension of the image.
File Content:
Get file content 's file content.
Perform the same steps for your other columns (Step4 - Step9).
If you have any questions, please do not hesitate to contact me.
Moreover, if the issue can be fixed successfully, please click “Accept Answer” so that we can better archive the case and the other community members who are suffering the same issue can benefit from it.
Your kind contribution is much appreciated.