Sending messages in Microsoft Teams via Elipse E3/Power.

This article shows how to configure and send messages in Microsoft Teams via an Elipse E3/Elipse Power application.

Microsoft Teams is the team collaboration hub from 365. With it, you can connect and collaborate with virtually anyone, anywhere. Keep close, continuous connection and access shared contents at any time in order to learn, plan, and innovate with your team. Use your Elipse E3/Power application to send messages and collaborate with colleagues via Microsoft Teams.

Configuring Microsoft Teams:

1. First of all, open the Microsoft Teams application.
2. Create a Team, or then join a Team with Administrator permissions.
3. After that, click “More Options” next to the Team’s name, and then “Manage Team”.
4. On Applications tab, click “More applications”.
5. Then, search the window that pops up for “Incoming Webhook”.
6. Click the application, and then “Add to a Team”. Write the name of the team you wish to add to the application, and then click “Configure Connector”.
7. During configuration, inform the name of your Application. Alternatively, you can add a picture. Finally, click “Create”.
8. A URL will be displayed, for example:  “https://elipse365.webhook.office.com/webhookb/fa97d065-68e3-4e5d-93b2-8a391de7af66@3a66cb32-9547-4d33-8cea-ba22036c58bf/IncomingWebhook/3fcb8c19e51e4a89b731cd8c6bb44c33/37034324-70b8-49f5-88e4-efcbe47fe1a9”

This URL is your link to connect Elipse E3/Power to Microsoft Teams.

 

Sending messages from Elipse E3/Power: 

After creating “Incoming Webhook”, as seen above, you can execute the following script from Elipse E3 to send messages:

Dim objXmlHttpMain , URL

strJSONToSend = "{""type"":""message"",""attachments"":[{""contentType"":""application/vnd.microsoft.card.adaptive"",""contentUrl"":null,""content"":{""$schema"":"_
&"""http://adaptivecards.io/schemas/adaptive-card.json"",""type"":""AdaptiveCard"",""version"":""1.2"",""body"":[{""type"": ""TextBlock"",""text"":"_
& """For Samples and Templates, see [https://adaptivecards.io/samples](https://adaptivecards.io/samples)""},{""type"": ""Image"",""url"": ""https://adaptivecards.io/content/cats/3.png""}]}}]}"

'Texto Simples
'strJSONToSend ="{""text"":""Hello World""}" 

URL= "https://elipse365.webhook.office.com/webhookb2/dd06f201-16e7-4d1c-88a1-d785b3daa6f4@3a66cb32-9547-4d44-8cea-ba22036c58bf/IncomingWebhook/0b47................"

Set objXmlHttpMain = CreateObject("Msxml2.ServerXMLHTTP")
On Error Resume Next 
objXmlHttpMain.open "POST",URL, False 
If Err Then            'handle errors
   Msgbox Err.Description & " [0x" & Hex(Err.Number) & "]"
End If
On Error Goto 0 
objXmlHttpMain.setRequestHeader "Content-Type", "application/json"
objXmlHttpMain.send strJSONToSend
strResponse = objXmlHttpMain.responseText
msgbox strResponse

 

Related article:

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *