-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathSendInlineImagetoMSTeams-19B43050-F023-EF11-840A-002248D5E947.json
175 lines (175 loc) · 5.99 KB
/
SendInlineImagetoMSTeams-19B43050-F023-EF11-840A-002248D5E947.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
"properties": {
"connectionReferences": {
"shared_sharepointonline": {
"runtimeSource": "embedded",
"connection": {
"connectionReferenceLogicalName": "crfc6_sharedsharepointonline_383e5"
},
"api": {
"name": "shared_sharepointonline"
}
},
"shared_teams_2": {
"runtimeSource": "embedded",
"connection": {
"connectionReferenceLogicalName": "crfc6_sharedteams_0aed3"
},
"api": {
"name": "shared_teams"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
},
"$authentication": {
"defaultValue": {},
"type": "SecureObject"
}
},
"triggers": {
"manual": {
"metadata": {
"operationMetadataId": "955fbd0e-2cdf-400d-aa45-29096271ec0b"
},
"type": "Request",
"kind": "Button",
"inputs": {
"schema": {
"type": "object",
"properties": {},
"required": []
}
}
}
},
"actions": {
"Get_file_content": {
"runAfter": {},
"metadata": {
"%252fSiteAssets%252fgood_morning_PNG47.png": "/SiteAssets/good_morning_PNG47.png",
"operationMetadataId": "523d3560-92f9-4893-95ae-66256249fd8c"
},
"type": "OpenApiConnection",
"inputs": {
"host": {
"connectionName": "shared_sharepointonline",
"operationId": "GetFileContent",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
},
"parameters": {
"dataset": "https://pslgrp.sharepoint.com/sites/TMP",
"id": "%252fSiteAssets%252fgood_morning_PNG47.png",
"inferContentType": true
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
}
},
"Get_a_team": {
"runAfter": {
"Get_file_content": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "ab5eeee1-aae2-479f-abd9-6be01d1b9344"
},
"type": "OpenApiConnection",
"inputs": {
"host": {
"connectionName": "shared_teams_2",
"operationId": "GetTeam",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_teams"
},
"parameters": {
"teamId": "4bf06683-bcc7-43b9-82f8-1c7df2d76177"
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
}
},
"List_channels": {
"runAfter": {
"Get_a_team": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "47ef8e0c-3561-4f70-8b15-afca70057dec"
},
"type": "OpenApiConnection",
"inputs": {
"host": {
"connectionName": "shared_teams_2",
"operationId": "GetChannelsForGroup",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_teams"
},
"parameters": {
"groupId": "@body('Get_a_team')?['id']"
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
}
},
"Filter_array": {
"runAfter": {
"List_channels": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "907f6247-ac40-4360-a6af-98809e679200"
},
"type": "Query",
"inputs": {
"from": "@outputs('List_channels')?['body/value']",
"where": "@equals(item()?['displayName'], 'General')"
}
},
"Send_a_Microsoft_Graph_HTTP_request": {
"runAfter": {
"Filter_array": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "0aefdaed-a27f-461a-90e2-76962753bd35"
},
"type": "OpenApiConnection",
"inputs": {
"host": {
"connectionName": "shared_teams_2",
"operationId": "HttpRequest",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_teams"
},
"parameters": {
"Uri": "https://graph.microsoft.com/v1.0/teams/@{outputs('Get_a_team')?['body/id']}/channels/@{first(body('Filter_array'))?['id']}/messages",
"Method": "POST",
"Body": "{\n\t\"body\": {\n \"contentType\": \"html\",\n \"content\": \"<div><div>\\n<div><span><img height=\\\"297\\\" src=\\\"../hostedContents/1/$value\\\" width=\\\"297\\\" style=\\\"vertical-align:bottom; width:297px; height:297px\\\"></span>\\n\\n</div>Good Morning!</div>\\n</div>\"\n },\n \"hostedContents\":[\n {\n \"@microsoft.graph.temporaryId\": \"1\",\n \"contentBytes\": \"@{body('Get_file_content')?['$content']}\",\n \"contentType\": \"@{body('Get_file_content')?['$content-type']}\"\n }\n ]\n}\n",
"ContentType": "application/json"
},
"authentication": {
"type": "Raw",
"value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
}
}
}
}
},
"templateName": ""
},
"schemaVersion": "1.0.0.0"
}