Add WhatsApp links in CodeTwo Email Signatures 365

CodeTwo Email Signatures 365 allows you to insert WhatsApp links to your email signature templates. When a recipient clicks such a link in the user’s signature, it will let them start a WhatsApp chat with this particular user. If the recipient has WhatsApp installed, clicking the link will open a chat directly in the app. Otherwise, a browser will open, allowing the recipient to start the chat via the WhatsApp Web app.

There are three most common scenarios in which WhatsApp links can be useful in email signatures:

  • Your company uses WhatsApp as one of the ways to contact users (for example for Sales or Support queries)
  • You want to add WhatsApp links for internal communication for all or selected users.
  • You want to provide an easy way to move conversations from a desktop email app to your mobile phone.

WhatsApp link format

The WhatsApp link has the following format:{PhoneNumber}&text={custom message}

or{PhoneNumber}?text={custom message}

where {PhoneNumber} is the number associated with a WhatsApp account and {custom message} is the text that will automatically appear in the chat's message box. Recipients will be able to either use it or discard it.

The number in the link must contain digits only, without any special characters so, for example, if a user has the following number:

+1 (800) 555-0199

The WhatsApp link for this user will be:

or: Let’s continue our email conversation here.

Since spaces aren’t really supported in URLs, paste this into your browser’s address bar and press Enter to have it automatically converted to the right format:!%20I%20got%20here%20from%20your%20email%20signature.

In most cases, the problem is that users’ phone attributes are formatted with spaces and various other special characters to make them more reader-friendly. So, in order to use Entra ID (Azure AD) attributes to add a phone number, you need to change its format by getting rid of all the special characters. To avoid replacing phone values with their less reader-friendly format, you can convert these numbers using the method described below and then assign them to a custom attribute.

Convert phone numbers

The method below takes the MobilePhone value of all users, converts the phone numbers’ format and assigns the new values to respective mailboxes’ custom attribute. In this example, the CustomAttribute12 is used, but you can use any other custom attribute number. If only a few specific users use WhatsApp in your organization, it’s a good idea to limit the users’ scope (in the first line of the script below), or create a signature rule for those specific users only. If you don’t want to use PowerShell, you can always convert the numbers manually and use the Exchange admin center to manually assign specific values to the right user attribute.

  1. Connect to Exchange Online using the Connect-ExchangeOnline cmdlet (for more information and troubleshooting, see this article)
  2. Run the following script (the code includes gray-colored comments, which provide more information about how it works):
$users = Get-User <# gets the list of all users in your organization. You can use the -Filter parameter to limit the number of users #>
foreach ($user in $users){ <# The loop goes through all users listed in the $users array specified above #>
$number = ($user.MobilePhone); <# Gets the user’s mobile phone value #>
$number=$number -replace "[^0-9]"} <# This line removes all non-numerical characters from mobile phones. Thanks to this, it will be easy to apply custom formatting to all numbers at once. #>
Set-Mailbox $user.UserPrincipalName -CustomAttribute12 $number <#Assigns the converted value to the CustomAttribute12 mailbox attribute #>
Get-Mailbox | FL UserPrincipalName,CustomAttribute12 <# Returns a list of mailboxes together with their CustomAttribute12 attribute. It lets you verify if the values were correctly updated.#>

When you finish setting this up, you can use the CustomAttribute12 values in the next step.

Adding a WhatsApp link to an email signature template

  1. Go to to open the signature management app, choose the signature rule you would like to edit, go to the Design step and click Edit signature (Fig. 1.).

Editing an email signature template.
Fig. 1. Editing email signature template.

  1. In the editor, place the cursor where you want the WhatsApp link to be added and click Meeting link (Fig. 2.).

ESIG Whatsapp integration 2 add a new meeting link
Fig. 2. Adding a new meeting link.

  1. The Insert meeting link window (Fig. 3.) has the following fields:
    1. Type lets you choose which meeting/chat/scheduling provider you want to direct to. Choose Custom link.
    2. URL specifies where your recipients will be directed when they click the button. In this field, paste:
      and use the Placeholder button to pick the right placeholder (CustomAttribute12, if you followed the instructions from Convert phone numbers).
    3. Label specifies the text that will be hyperlinked.
    4. Picture lets you choose an icon which will act as a WhatsApp chat button.
      Note that when it comes to the Label and Picture fields, you can use either of them, or both.

ESIG Whatsapp integration 3 Insert meeting link window
Fig. 3. The insert meeting link window.

  1. Finally, you can highlight the WhatsApp link with your mouse and use the Remove empty placeholder option (Fig. 4.). This way, if a user doesn’t have the Entra ID (Azure AD) attribute, they will not have the WhatsApp link added to their email signature. Learn more about using this option.

ESIG Whatsapp integration 4 Remobe empty placeholder option
Fig. 4. The remove empty placeholder option.

Adding a WhatsApp link as a QR code

Another idea for an email signature is to add WhatsApp links in a form of QR codes. This way, you’ll allow recipients to quickly move conversations from emails to a mobile WhatsApp.

  1. Go to to open the signature management app, choose the signature rule you would like to edit, go to the Design step and click Edit signature (Fig. 1.).
  2. In the editor, place the cursor where you want the QR WhatsApp link to be added, go to Placeholder > Other and then click QR Code image (Fig. 5.).

The option to add a QR code image
Fig. 5. The option to add a QR Code image.

  1. Size of image lets you control the resolution of you QR code. Text is the URL where you paste: and use the Placeholder button to select the right placeholder (CustomAttribute12, if you followed the instructions from Convert phone numbers). If you also add the text URL parameter, as shown in Fig. 6., you can add an initial message that will appear when your recipient enters the WhatsApp chat. Remember that e.g. spaces aren’t supported in URLs, so they need to be replaced with their respective entities (for example, %20). Go to WhatsApp link format to see how to easily convert spaces to their entities. When you’re done, click OK.

WhatsApp QR code chat link
Fig. 6. The QR Code image window.

  1. The QR Code image placeholder will be added to your email signature template (Fig. 7.).

QR code placeholder in an email signature template
Fig. 7. QR Code image placeholder in a sample signature.

The WhatsApp QR Code will be automatically generated for each employee in their respective email signature.


In this article

Was this information useful?