Convert raw text to Slack Markdown - slack

Is there any API from slack or a package to convert raw text to slack markdown
I searched on the internet but could not find it.

Related

Cannot download docx file submitted to google drive through google classroom

So when I submit a .docx file through google classroom it gets converted into a file with mimetype application/vnd.openxmlformats-officedocument.wordprocessingml.document and stored in the Classroom folder of the teacher's google drive.
I want to read the contents of this file so I can do analysis on them, but cannot find a suitable way to do this.
Initially, I tried using the google docs api
GET https://docs.googleapis.com/v1/documents/{documentId}
This threw an error that the mimetype was incorrect.
The google drive api for files/get allows me to get a download url for the document, but unfortunately this requires in browser authentication so I cannot make this work programmatically.
How shall I proceed to read the contents of this file?
I believe some possible solutions are converting the application/vnd.openxmlformats-officedocument.wordprocessingml.document mimetype into the standard google docs mimetype, or having a download url that doesnt require authentication, but I do not know how to do either of these!
Thanks in advance!

Is it possible to insert animated emoji into the sending text using the Telegram Api?

Telegram has a premium subscription that allows you to write a message and add to the text (important! not separately, like stickers, but specifically to the text). Is it possible to do something similar with the Telegram API?
I looked in the documentation and found only https://core.telegram.org/api/animated-emojis#emoji-reactions, there were animated reactions to messages, sending animated emoji like stickers, but not what I seem to need.
Animated emoji are a "premium" feature of Telegram and so far bots can't use them. The documentation that you linked is part of the "Telegram API", i.e. the API that user clients like your mobile Telegram app use. The documentation of the Telegram Bot API is here: https://core.telegram.org/bots/api. It does not indicate in any way that bots are able to use the emoji.
See also Telegram API Custom Emoji sending in message.

How to get image from SharePoint document library into thumbnail card of messaging extension of bot framework

I'm having a SharePoint document library which contains some icons. And i'm having a azure web app bot used for messaging extension using bot framework. In messaging extension preview thumbnail card i need to load the icons from SharePoint library.
Both SharePoint document library and Azure bot are on different tenant and users are also different.
SO when i'm trying to load icons from SharePoint library its giving me unauthorized error due to different tenant and users.
Is there any way to pass base64 string to thumbnail card in to load the image instead of url.
I have tried to convert image from SharePoint document library to base64 string but didn't got a way to pass that base64 string to messaging extension.
I need to show images from sharepoint document library into thumbnail card of bot framework.
There are 2 approaches you can implement.
Store images to Azure blob storage and use static url from the blob. You can use SAS key for security.
Other approach is storing images to SharePoint doc library as you listed in question then you are getting base64 value of image and store that value to a variable and use it in DataUri as below
string.Format("data:image/png;base64,{0}",Convert.ToBase64String(photoBytes));

Show formatted HTML Content to Microsoft Bot User

Is it possible to show formatted HTML Content inside a Bot Card/Attachment?
In this Case, we retrieve the content field of a Dynamics 365 CRM Knowledge Article which is in HTML Format and want to show it to the bot user.
Most of the channels in the Bot Framework don't support HTML rendering. You may refer to this issue: Can a .html file be rendered in cards and HTML should be sanitized in messages.
One alternative way is that to extract information from your html and create cards to show them, to create cards in Bot Framework, please refer to the official Rich Cards Bot Sample for .NET SDK / Rich Cards Bot Sample for node.js SDK.
Another approach is that we use markdown to make a hyperlink to your html.
For example, in C#, you can simply code like this:
var text = #"[Google Search](http://www.google.com)";
await context.PostAsync(text);
But markdown is not supported by all channels too, you may refer to this Bot Framework markdown support by channel for more information.

Yammer Embed config: Feed 'my_all'

Is it possible to display feed 'my_all' (https://www.yammer.com/[network]/#/home?type=my_all) within Yammer Embed?
All available embed options are listed here: https://www.yammer.com/widget/configure
There is a "My Feed" option, which is probably the one you need.
You can leave the feed type out and get the My Feed. Yammer Embed offers a number of feed types and for historical reasons these do not match what is available in the Yammer website, including the Discovery or Following feeds.

Resources