HTML Formatting using Slack Web API - html

So we are implementing the Slack chat.postMessage API function in an application. It looks like this:
https://slack.com/api/chat.postMessage?token=XXXXXXX&channel=XXXXXXX&text=hello&pretty=1
The text you want to send in the message would replace the "hello" in this URL. Is it possible to use this API call to send that message in HTML instead of in plain text? For example if you want to send test
Then the API sends the literal HTML < ul >< li >... etc
Any way we could send this so it would appear like it should?

No, Slack doesn't support HTML for formatting messages. The documentation for message formatting is here: https://api.slack.com/docs/message-formatting.

Related

What should I put in the Request Body to send an email with a hyperlink?

I would like to send an email with a hyperlink.
Currently, I am sending mails via V3 Mail Send API.
However, I am having trouble sending emails with hyperlinks.
What should I put in the Request Body to send an email with a hyperlink?
Please help!
A hyperlink can cause the content to be escaped and break up the api call. I'm not sure if this is the issue you are having or if the link just doesn't appear as a hyperlink when the email is received?
For the first issue, escape the forward slashes. The second issue, I would send the email in html format if that's possible and that should keep the hyperlink in it's original format.

Multiple arguments in a google Text to Speech api html GET request

I have a GET request in my code that gets an mp3 file from google's text to speech API. the request goes something like this.
api/getlink?word=testing
But I want to have multiple arguments in this request. Like a speakingRate argument. I have tried
api/getlink?word=testing,speakingRate=0.5
and
api/getlink?word=testing&speakingRate=0.5
but neither seem to work. I'm missing the right formatting or is this method just restricted to a single argument?

UiPath integration with Linkedin - Html characters not preserving formatting

We have an RPA on a site, to post a form. In the form we want to send HTML content with formatting. But the site is removing all the formatting, and is just showing html characters as is (like a text). But when we are copy pasting the content from tinymce editor (at our end) to the same site's form it is showing the content properly with formatting.
What needs to be done from my end while sending data to UiPath so that it puts the content in proper html format with formatting preserved?
I also tried sending html codes encoded by gson which is done by default. That also did not work.
This is when we are copy pasting the content -
And this is when we are sending data via uipath -
EDIT
This is what the uipath activity looks like (The description is being sent by an http api which uipath calls to get data) -
Thanks
Better use the Assign activity:
In the String variable website you simply save the HTML page. Now you can easily paste the variable anywhere. Also you don't need to paste the HTML in your editor via CTRL+V.
Just use the Type into activity:

Gmail API User.Settings.SendAs Signature treating input as plain text only

I am using the following Gmail API using the PHP Google API Client Library.
https://developers.google.com/gmail/api/v1/reference/users/settings/sendAs/patch
This is my code that executes the call:
$signature = new Google_Service_Gmail_SendAs();
$signature->setSignature($this->signature);
$gmail->users_settings_sendAs->patch($this->email, $this->email, $signature);
I am passing a string value containing HTML code to update the signature.
When I update the signature using the above, it displays as plain text showing the HTML, as if it doesnt support HTML through the API method.
The API reference for the User.Settings.SendAs resource says the following about the signature parameter:
https://developers.google.com/gmail/api/v1/reference/users/settings/sendAs#resource
signature string An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
So this seems to indicate that it supports HTML. We have tried VERY basic HTML like the following:
<em>Test</em>
It shows the above as is as plain text.
Can anyone help me to understand what are we doing wrong. We want to use this API to update the signature with HTML.
So we found the issue. Our controller was using htmlentities on the html String which is what was causing it to be treated as plain text.

Sending HTML emails out from Plone

Are there examples of sending simple HTML formatted emails (<h1>, <b> and such) out from Plone?
Plain text is well-covered, but there are no HTML email out examples.
You can adapt any of the many python email module examples. Because HTML email usually means sending multipart/alternative messages, things get a little more complicated.
The examples page of the email package.
Sending HTML email using Python
Sending Multipart html emails which contain embedded images
You basically have to construct an email.Message object and pass that to Mailhost.send.
Depending on your use case, you could also use collective.watcherlist.
This was factored out of Products.Poi, which uses it to allow users to subscribe to updates for an issue. That part may not be interesting for you, but it has code that takes a browserview as basis for sending an email. Hooking a page template up to that browserview is of course simple.
If you cannot use it directly, it may serve as a code example.