I have one list where below columns. I want to use thumbnails columns to send a dynamic emails. But this thumbnail columns are not appearing on dynamic content list. How to get this info ?
Solved! Go to Solution.
Hi @CGZoe215,
The thumbnail/image data type is pretty new in SharePoint. It looks like it is not supported yet in the default actions.
However, you should be able to workaround this with an HTTP request to SharePoint, via the REST API. Below is an example of that.
1. Add a Send an HTTP request to SharePoint action. Use a Get request and the following URI field value.
_api/web/lists/getbytitle('@{variables('ListTitle')}')/items(1)
2. Add a compose action to collect the BD IMG field value.
outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']['BD_IMG']
3. Add a Parse JSON action to read the image url.
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"fileName": {
"type": "string"
},
"nativeFile": {
"type": "object",
"properties": {}
},
"fieldName": {
"type": "string"
},
"serverUrl": {
"type": "string"
},
"serverRelativeUrl": {
"type": "string"
},
"id": {
"type": "string"
}
}
}
4. Add a compose action. Use a concat function to generate a hyperlink for the image.
concat(body('Parse_JSON')?['serverUrl'],body('Parse_JSON')?['serverRelativeUrl'])
Hope this helps a bit?
Hi @CGZoe215,
The thumbnail/image data type is pretty new in SharePoint. It looks like it is not supported yet in the default actions.
However, you should be able to workaround this with an HTTP request to SharePoint, via the REST API. Below is an example of that.
1. Add a Send an HTTP request to SharePoint action. Use a Get request and the following URI field value.
_api/web/lists/getbytitle('@{variables('ListTitle')}')/items(1)
2. Add a compose action to collect the BD IMG field value.
outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']['BD_IMG']
3. Add a Parse JSON action to read the image url.
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"fileName": {
"type": "string"
},
"nativeFile": {
"type": "object",
"properties": {}
},
"fieldName": {
"type": "string"
},
"serverUrl": {
"type": "string"
},
"serverRelativeUrl": {
"type": "string"
},
"id": {
"type": "string"
}
}
}
4. Add a compose action. Use a concat function to generate a hyperlink for the image.
concat(body('Parse_JSON')?['serverUrl'],body('Parse_JSON')?['serverRelativeUrl'])
Hope this helps a bit?
Thanks for helping . I am gettig below error at the time of parseJSON. How did you generate scheme here?
InvalidJSON. The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: o. Path '', line 0, position 0.'.
Hi @CGZoe215,
Updated this instruction, it had some errors in it.
Go to one of your flow runs.
1. Navigate to the Compose action. Expand it.
2. Copy paste the outputs of the body of that action (this will be your sample)
3. In your Parse JSON action click Generate from sample
4. Paste the earlier copied sample. Click Done
This should result in your json schema.
Hi @CGZoe215,
Thanks for adding the screenshot. It looks like you copied the expression as regular text, instead of pasting it in as an expression.
1. Click the fx button in the compose action in the right top corner
2. Paste the expression
If all goes well you should see the fx button in front of your expression.
Btw, I see I also made a couple of errors in the instructions above for generating the json schema. I will adjust that now 🙂
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
16 |
User | Count |
---|---|
136 | |
49 | |
42 | |
36 | |
28 |