Is there a way to configure in MS Teams one incoming webhook per tab in the same channel? - microsoft-teams

I have an administrator group in MS teams where I work.
I created a channel and added a webhook app to receive messages from New Relic monitoring.
The messages are coming ok, but I want to create a tab per hostname in this channel and a specific webhook for each tab. Is that possible?
My intention is to organize clusters and servers with it´s specific messages in each tab.
Thank you all !

Related

Send initial message from power virtual agent

I am trying to send initial message from power virtual agents, but i don't have any idea how can i do this. I just want after install app when bot load it will send a message to team channel
To make your bot start the conversation, you’ll need to deploy a custom canvas that includes arguments that cause the default system greeting topic to be displayed when the bot loads. Please follow this documentation(https://powervirtualagents.microsoft.com/en-us/blog/make-your-power-virtual-agents-bot-start-the-conversation-using-a-custom-canvas/) which explains how to send proactive message via Power virtual agent.
You can also refer this: https://dhina.org/2020/03/30/building-proactive-bot-with-power-virtual-agents/

Interact with slack bot without a public accessible server

For some security reasons that I can't have a public accessible server to receive data from slack.
So, this is what I'm planning to do:
Inbound message from slack: using RTM API
Outbound message to slack: using RTM API or Web API
Questions:
Any better alternatives?
Any restrictions? (AFAIK, buttons and drop downs can't work)
If Web API reach rate limit, can I use incoming webhook as a backup plan?
RTM only approach
Yes, that would work. With only the RTM API you are limited to:
receiving and responding to messages
Other RTM events.
You can't use any interactive functionality like:
Interactive components (buttons, menus, datepickers)
Dialogs
Rate limit on message posting
Using the webhook as "backup" to circumvent the rate limit is not an option, since the rate limit of posting max 1 message per second applies to all form of message posting.
From the documentation:
In general, apps may post no more than one message per second per
channel, whether a message is posted via chat.postMessage, an incoming
webhook, or one of the many other ways to send messages in to Slack.
Alternatives
You did not give any details about the reasons why your app can't expose an endpoint to the public Internet. But you might want to consider using a VPN tunnel like ngrok.
Yes! Socket Mode
There is a new alternative from slack, Socket Mode, which doesn't require a publicly accessible server.
Note: this is only for private apps.
With Socket Mode you have an API token and your server uses it to communicate with Slack's servers and create a two way socket connection. This means your Slack Bot's code can run on a machine behind a firewall and not require any inbound ports to be opened.
Slack message delivery requires an acknowledgement once you get the message, or else they may retry to deliver it.
Limitations
Socket Mode has two main limitations:
Apps using Socket Mode are not currently allowed in the public Slack App Directory.
Socket Mode is only available for apps using new, granular permissions. If you created your app on or after December of 2019, good news: your app already uses the new permissions. Otherwise, you may have to migrate your classic Slack app to use granular permissions before turning on Socket Mode.

Custom Microsoft Teams Connector doesn't communicate with an external service at all

Common description
First, my goal is sending notifications from my service using an internal API to a MT channel and having an option to answer it transmitting one to internal API.
I've found a Connector has such functionality. Good example which i've tried to use StackOverflowConnector. It was a good point to start that is exactly what i need(Bot has inappropriate UI behaviour) , but i've decided to do it by small steps from creating a Bot just to understand things better. In short i had success, the bot and a mt channel communicted well both directions. Next point was Connector. I explored all information here:
https://learn.microsoft.com/en-us/microsoftteams/platform/index
https://learn.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-3.0
https://learn.microsoft.com/en-us/outlook/
What i have taken to create a Connector
registered a Connector in the Connectors Developer Dashboard with followed fields:
Connector name: connector
Logo: contoso96x96.png
Short description of your app (10 words or less): sd
Detailed description of what your Connector does (3-5 sentences): dd
Company website: https://external.service
List the events supported by your Connector: all
Do you want to enable actions on your Connector cards?: Yes
Actions URL: https://external.service/api/messages
Does your service support login using subdomain?: No
Landing page for your users for Inbox: https://external.service
Landing page for your users for Groups or Teams: https://external.service
Redirect URLs: https://external.service/api/messages
Ran the external service to communicate with a Connector. Checked service works
took a manifest.json file is generated by Connectors Developer Dashboard and uploaded it to a Microsoft Team(MT) team. Uploading was successful. There was no network requests(monitored nginx logs) to the external service
selected a channel in MT and clicked the Connectors dialog option. Found the created connector in the list Sideloaded group and clicked Configure. Got such window and clicked Done. Nothing happened
ran nodejs code from the [github connector example][3](it didn't have meaning because of total lack of the requests)
What i expected:
Any activity in the external service, other nodes of integration i can't monitor. I compare this failed result with ones of StackOverflowConnector and my bot experience, both works as needed.
Question:
How to set up the connector to work, to send network requests? At least to have echo logic.
Upd:
I have noticed a weird report of deleting a MT app of the connector.
I believe you might have some confusion between a Bot and a Connector. Based on your post description you should be looking to create a Bot and not a Connector. Please let us know if you have further queries.
Update:
Could you please give a try with C# sample code? Here is the basic flow for your understanding:
When user clicks on Visit Site to install the Setup endpoint is hit.
When user clicks on Connecto to Office 365 the Register endpoint is hit with webhook information.
When new task is created in your system you can post the message to registered channels using webhook url.

WebSocket client disconnect due to network loss doesn't get intercepted by Spring server

I have an application in which clients use websockets to connect to a server which is running Spring Boot Tomcat.
My question is if there is a way for the server to detect a client disconnect due to a network loss.
Thanks.
if you are using stomp , check SessionDisconnectEvent.
For raw Websocket connections, you can use :
WebSocketHandler-->afterConnectionClosed
I have searched before for this and the solution I was able to find was to implement a ping-pong mechanism between the server and the clients.
For example, each few seconds send a dummy message to the client on a specific topic and receive back another dummy reply, if you didn't get a reply for a configured period you can consider the client disconnected.
As mentioned here,
STOMP and Spring also allow us to set up topics, where every
subscriber will receive the same message. This is going to be very
useful for tracking active users. In the UI, each user subscribes to a
topic that reports back which users are active, and in our example
that topic will produce a message every 2 seconds. The client will
reply to every message containing a list of users with its own
heartbeat, which then updates the message being sent to other clients.
If a client hasn't checked in for more than 5 seconds (i.e. missed two
heartbeats), we consider them offline. This gives us near real time
resolution of users being available to chat. Users will appear in a
box on the left hand side of the screen, clicking on a name will pull
up a chat window for them, and names with an envelope next to them
have new messages.

XMPP Multiple tabs synchronize sent message

I am implementing an Openfire chat client in a web site with Strophe.js. I managed to get multiple sessions and multiple windows reloading page and reconnecting back. Now I have challenge in restoring the chat history.
But the first issue I am stuck at when a user opens two tabs of our site it creates two xmpp sessions with different resource ID's but now say
a#example.com/tab1 sent a message to friend this should be synchronized in tab2
Example if you send chat message from gtalk user sent message will be updated and showin in gmail chat window.
Any one has any idea.
Thanks you very much for the time and help.
The routing logic for multiple resources is up to the server implementation. The GTalk server routes messages sent to bare Jids to all connected resources. Many other servers (also Openfire) send messages to bare Jids to the most available resource, which is the one with the highest priority.
If each of your tabs has its own resource then I suggest to send the messages to each resource (full jid) manual. You get all connected resources of your subscribed contacts with the presence.
Yes, there is. Have a look at XEP-0280: Message Carbons ( http://xmpp.org/extensions/xep-0280.html )
Both your client as well as your server have to support it in order to fully work.
Source : https://superuser.com/questions/866785/is-there-a-way-to-sync-xmpp-messages-across-different-devices-with-standard-xmp

Resources