Wednesday, November 30, 2011

How To Add "Invite To Network" Button to an Email

View Comments

This is another posting from my colleague Romain Lienard. The first posting that I shared from him was a quick post that explained how to add a "Follow This Community" button to an email which helps accelerate adoption. In this post, Romain shares how to simply add a button to your email signature, for example, so that others can click it and invite you to be part of their network. This is another great example of using LotusScript with the IBM Connections API. And given I like to share a bunch of how-to's, I figured I would help spread the word on this one.

What follows is his entry:

This is the second part of my previous blog entry "Follow-this-community button"

In the same spirit, I wanted to do a button that let people invite me into their network in a simple click, because it can be a good way to drive adoption of Connections.




Here again, 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 YOUR_EMAIL with your email :

Sub Click(Source As Button)
     Dim objHttp   
     Set objHttp = CreateObject("Microsoft.XMLHTTP")
     url = ||
     req = |<?xml version="1.0" encoding="UTF-8"?>
   <category term="connection"
   scheme="" />
   <category term="colleague"
   scheme="" />
   <category term="pending"
   scheme="" />
   <content type="html">
   Please accept this invitation to be in my network of Connections colleagues (sent from Lotus Notes).
</entry>| "POST", url, False, "", ""
     objHttp.setRequestHeader "Content-type", "text/xml"
     Msgbox "Invitation has been sent !"
End Sub


Save your document, click on the button, and voila ! (note : you'll be prompted for your intranet password)




If you want to use this button every day, there is unfortunately no way to put it on the signature file BUT (thanks to Herbert Hilhorst for the tip) you can copy & paste your signature and the button you put on it from the current mail to the signature richtext editor (More...>Preferences>Signature). In this way, the button will be copied too. Don't forget to select Rich Text instead of HTML or file.

This button is now in my default signature :)

Very cool, huh? Here's the original link to his blog entry so you can say "thank you" :).