This sample gets the image from SharePoint document library and post it on Microsoft Teams channel using Power Automate. The flow utilizes standard Send Microsoft graph request action to overcome the payload size limit of 28 KB.
Solution | Author(s) |
---|---|
Send inline image in team message | Manish Solanki (@Manish Solanki) |
Version | Date | Comments |
---|---|---|
1.0 | May 21, 2024 | Initial release |
This sample illustrates the following concepts:
- Post embed image in MS Teams Channel message
- Overcome the payload size limit (28 KB)
- Send a Microsoft Graph HTTP request using standard action
- Expression
- This Flow requires an image to be present in SharePoint document library (inside site asset).
- A Microsoft Teams with a channel where image needs to be shared via message.
The solution includes two connection references.
- SharePoint Connection
- Microsoft Teams Connection
- Once the solution is imported, edit it
- Select Get file content action and replace the Site Address and the File Identifier to point to your SharePoint site and image file.
- Select Get team action and choose a team from the drop down.
- Save and test the flow.
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
You can also use the Power Apps CLI to pack the source code by following these steps:
-
Clone the repository to a local drive
-
Pack the source files back into a solution
.zip
file:pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
Making sure to replace
pathtosourcefolder
to point to the path to this sample'ssourcecode
folder, andpathtodestinationfile
to point to the path of this solution's.zip
file (located under thesolution
folder) -
Within Power Apps Studio, import the solution
.zip
file using Solutions > Import Solution and select the.zip
file you just packed.
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you encounter any issues while using this sample, you can create a new issue.
Finally, if you have an idea for improvement, make a suggestion.
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.