I'm building an app that allows the user to input a Teams channel webhook connector URL for notifications.
I want to be able to do some basic validation on the URL to maximize the chance that the user's input is valid.
From what I can see on the few M365 tenants I have access to, the webhook appears to be in the format of:
https://tenant-name.webhook.office.com/webhookb2/some-guid/IncomingWebhook/some-guid/some-guid
But I'm not sure if that'd be the case for all tenants, and I believe at some point Microsoft changed this format too, as I have seen this one before:
https://outlook.office.com/webhook/some-guid/IncomingWebhook/some-guid/some-guid
So I'd need to have all versions accounted for.
I can't seem to find any documentation on this. If by any chance someone has worked on this and can provide some info, it'd be greatly appreciated.
We have verified it now in our tenant and the Webhook URL is similar to the one which you have shared first:
https://tenant-name.webhook.office.com/webhookb2/some-guid/IncomingWebhook/some-guid/some-guid
So you can use this format.
Reference link:
https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook
Related
I might be missing something really simple but don't seem to find the solution.
I have created a quick and simple app which is meant to do some processing every morning and then send some logs to Slack.
I have been perfectly able to do so using Incoming Webhooks. Cool. The "problem" is that it requires me to set it up from the app settings (aka it obviously makes me define a specific channel for the Webhook so I can have the specific URL) and that's something I like a bit less.
I thought it'd be easier if I can just add/integrate the app on a channel using the Slack UI so I don't have to worry about having to know beforehand the channel(s) ID where the message has to go to and also any other user would be able to integrate in any other channel they consider.
I have integrated it on my testing channel (all good) and tested chat.postMessage (all good) but it still needs the channel (obviously). However, using conversations.list lists ALL channels and that's the opposite of what I'm looking for.
I need a way of getting just those channels where the app is integrated so I can post the message to those and only those.
Is this something that Slack doesn't allow or I'm just missing something very obvious here?
I hope it makes sense and someone can shed some light on this :)
You can use users.conversations method to get list conversations the calling user/bot may access.
https://api.slack.com/methods/users.conversations
Use Bot token to call the API.
Use type argument to search public, private, mpim & im conversations
https://api.slack.com/methods/users.conversations#arg_types
Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im
Trying to parse through the Microsoft Documentation of this is a bit of a challenge.
Our use case is that we want the app to receive broadcasts from an external service. On that broadcast we want it to send a personalized message to every person in the team/org.
Is that at all possible? Doing this in Workplace and Slack was fairly straight forward but i'm going nowhere fast with Teams. Connectors seem weird and user-based, not team based, requiring you to set up a config page for it? Bots seem centered around AI interactions and on demand features and general apps? Not sure.
So yea the question is, is it possible. If so i would appreciate to know where to look for how to do this.
Yes, this is definitely possible. If you're wanting to send to a Team (i.e. a Channel within a Team) you can use either a bot or a webhook. If you want to send to individuals or to group chats, then you'd be looking to use a bot.
For webhooks, see Post external requests to Teams with incoming webhooks. For bots you can start here, and in that case you'd want to look into something called "Pro-active messaging", where the bot is sending a message on it's own, rather in response to a user's initial message.
The Pro-active messaging can be a bit tricky, so if you do want to go that approach (1 to 1 messaging), let me know in the comments and I give you some more guidance. However, I'd suggest rather looking at messaging the Team, and creating/using a relevant channel, rather than sending every user a 1-1 message.
we are implementing stream in our application and so far we love the out of the box react components as well as the backend implementation stream ruby - this is our setup currently.
We are close to deploying a first MVP but found that it seems to be not possible to post activities to a flat feed from multiple users by default.
Our use case is that we have a group of people that want to post activities about a certain topic (think facebook groups). Therefore we create a feed for the object (lets say a company) and want each user to be able to post activities there. Our current workaround is to add the author id as additional data and add a custom header to a activity - obviously not the best solution as reactions won't work that way.
Looking around we found that this seems to not work out of the box see this issue and this question.
Is this a feature that is only available to paying customers or how can we activate it?
Thank you in advance!
When using Stream with React users can only post to their own user feed, this is a default permission policy that can be changed by Stream.
I suggest reaching to Stream support by email and ask to change the permission policy.
I am working on a POC to proof out the ability to get a list of all the new users who have been added to a specific Slack Channel. From my initial review of the Slack API I am not seeing anything that showcases this ability, I was curious to see if anyone had worked on something similar or could point me to resources that would be a viable solution.
I believe there is no ready-made API method available, that will give you that specific information. However, Slack is very flexible and you can use the existing building blocks to easily add additional features as needed.
E.g. To get the requested information you can develop a small Slack app that listens to the member_joined_channel and member_left_channel events to keep track of when members joined a channel.
If you need a historical record of membership in a channel, you could use the Slack API's groups.history method, page through results, and build a membership log by looking for events of type member_joined_channel and member_left_channel through time.
I've recently started to use Twilio, for our own needs - we need to provide users with real-time informations about possible dangerous events that might have happened at their home, through SMS or Voice call.
I've tried to use VoiceCall exactly as it's specificied here - https://www.twilio.com/user/account/developer-tools/api-explorer/call-create. The scenario is that I want a robotic voice to explain what was happened, hence I need to generate the xml file for voice on demand. I supplied my own RestApi url for the voice, that is able to generate this file through TWIML.
By default Twilio, will use that url to fetch the audio and other instructions, at the moment when the call is performed. Since the voice URL cannot contain parameters (because they got cut off for some reason) (e.g YES - http://mywebsite.com/api/sayVoice, NO - http://mywebsite.com/api/sayVoice?eventId=1), you will ALWAYS get the same audio (no way to identify a different kind of event and generate a DIFFERENT xml output (for a different audio to the end user).
In Twilio documentation examples, they have only static URLs as well, without extra parameters, hence is that indeed the only way Twilio Call Api can be used?
It's hardly believable that such an use case was not planned for Twilio.
Did anyone tried to use Twilio for a similar scenario?
Any suggestions regarding similar technologies for the same purpose?
Found the issue in the end, you need to pass the parameters as RequestParams.
For example, this one will work - Url=http://mywebsite.com/api/twilio/sayVoice?eventId=379, while pathParam won't work Url=http://mywebsite.com/api/twilio/sayVoice/379.
Hence, stay safe and use RequestParams.