Send Message To Channel
Description
Microsoft Teams: Send Message To Channel plugin step sends a message to the channel.
References https://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0&tabs=http
Permissions Following are the required permissions:
Permission type | Permission (from least to most privileged) |
---|---|
Delegated (work or school account) | Channel.ReadBasic.All ChannelMessage.Read.All ChannelMessage.ReadWrite ChannelMessage.Send ChannelSettings.Read.All ChannelSettings.ReadWrite.All Directory.Read.All Directory.ReadWrite.All Group.Read.All Group.ReadWrite.All GroupMember.Read.All offline_access, Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All |
Notes:
- If multiple team names with the same name are present, then provide the Team ID or unique team name.
- Channel name cannot end with a period (.). The following special characters are not supported:
~#%&*{}+/\:<>?|'".
- If the attachment and card are attached together, both will be sent in a single message and the card will be on top of the attachment.
Configurations
No. | Field Name | Description |
---|---|---|
1 | Step Name | Name of the step. This name has to be unique in a single workflow. |
Connection | ||
2 | Tenant ID | Select the Tenant ID. For more details, see connection documentation. The field data type is String. This is a mandatory field. |
3 | Client ID | Select the Client ID. For more details, see connection documentation. The field data type is String. This is a mandatory field. |
4 | Accept Value as variable/static | Leave checkbox unchecked to accept Client Secret from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Client Secret field to appear as Text box. |
5 | Client Secret | Specify the Client Secret of Microsoft Teams application. Client Secret is entered using a widget. If the Accept Values as variable/static check box is selected, then the Client Secret field appears as text box and accepts static values or variables. Else, select Client Secret from the drop down list. The field data type is String. This is a mandatory field. |
6 | Accept Value as variable/static | Leave checkbox unchecked to accept Refresh Token from a field in the previous steps of the stream using a drop down list. Else enable checkbox for Refresh Token field to appear as Text box. |
7 | Refresh Token | Provide the Refresh Token provided by authorization grant flow. If the Accept Values as variable/static check box is selected, then the Refresh Token field appears as text box and accepts static values or variables. Else, select Refresh Token from the drop down list. The field data type is String. This is a mandatory field. |
8 | Test Connection | Verifies whether the connection is established or not. Note: For the purpose of verification fields coming from previous steps are not allowed since field values can only be accessed when workflow is in running state. Static values and environment variables are allowed. |
Input Fields: | ||
1 | Team Name/ID | Specify the Microsoft Teams team name or Team ID.The data type is String This field is mandatory. |
2 | Get | Click to list available teams in your user account. |
3 | Channel Name/ID | Specify all channel name or ID present in the team. The data type is String This field is mandatory. |
4 | Get | Click to list all channels present in the team in your user account. |
5 | Subject | Specify the subject of the message. |
6 | Message | Specify the message you want to send to the channel. The data type is String This field is mandatory. |
7 | Importance | Specify the allowed values to act. Allowed values: 'normal', 'high', or 'urgent'. Default is normal |
Attachment Fields: | ||
1 | Attachment Path/Content URL OR Paths of Files/URLs (JSON) | Provide the valid file path or content URL of a file that is already uploaded on Onedrive or provide the JSON for multiple attachments. a. Sample JSON for multiple file paths { "attachments": [ { "filePath":"D:\\Folder\\abc.txt" }, { "filePath":"D:\\Folder\\Capture.JPG" } ] } b. Sample JSON for multiple ContentURL { "attachments": [ { "contentURL":" https://onedrive.example.com/documents/myfile.docx " }, { " contentURL ":" https://onedrive.example.com/documents/myfile.docx " } ] } |
2 | Browse | Click to open the dialog to select the file path to attach. |
3 | If File Exists On OneDrive Path | Provide a valid option if the given file already exists on one drive. Allowed Values: AutoRename, ThrowException, OverWrite. |
Cards Fields: | ||
1 | Card Type | Provide the valid Card Type to be sent. Allowed Values: Adaptive Card, Hero card, Thumbnail card, Connector card for Microsoft 365 Groups |
2 | Card Content JSON | Provide the valid JSON payload of the card. NOTE: Provide the valid JSON for sending the card with inline images by giving the reference of images in JSON as ‘hostedContents/temp id/$value’ For more information: https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http |
Table fields | ||
3 | Image Temporary ID | Provide the temporary ID to the image which is used as an inline image in the JSON payload. **NOTE: **The temporary ID must be the same across the JSON with ‘hostedContents/temp id/$value’, and it must be unique for all images. |
4 | Static Image Path | On clicking in the input table, to open the dialog to select the file. |
5 | Variable Image Path | The field is an optional field that accepts the value from the previous field or run-time parameters. |
Output Fields: | ||
1 | Message ID | Provide output field name. Default value is ‘MessageID’. |