My colleague just asked me to develop a button in Notes mail in order to easily follow a community.
IBM Connections API can be used with Lotus Notes and its LotusScript programming language in order to facilitate some tasks for end users.
So with some Notes support from Herbert Hilhorst, I wrote a piece of LotusScript that automatically follows a community with a simple click. The authentication is done directly in the Notes client
All you have to do is :
1 - create a button in your mail, via Create>Hotspot>Button.
2 - Specify a label for your button, select LotusScript instead of Formula
3 - Copy & paste this code, after changing the CommunityUID (here it's 5bf86449-cd87-4e02-bef5-a24f24408723) according to your needs :
Sub Click(Source As Button)
Set objHttp = CreateObject("Microsoft.XMLHTTP")
url = |https://w3-connections.ibm.com/communities/follow/atom/resources?source=communities|
req = |<entry>
<category term="resource-follow" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
<category term="communities" scheme="http://www.ibm.com/xmlns/prod/sn/source"></category>
<category term="community" scheme="http://www.ibm.com/xmlns/prod/sn/resource-type"></category>
<category term="5bf86449-cd87-4e02-bef5-a24f24408723" scheme="http://www.ibm.com/xmlns/prod/sn/resource-id"></category>
objHttp.open "POST", url, False, "", ""
objHttp.setRequestHeader "Content-type", "text/xml"
Msgbox "You're now following the TEC-F community. Thank you !"
Save your document, click on the button, and voila !