What is Company Communicator?

Company Communicator or just CC is one of the most used Teams app templates. It enables corporate teams to create and send messages intended for multiple teams or large number of employees over chat, allowing organization to reach employees right where they collaborate. 

Thousands of customers use Company Communicator every day for scenarios like new initiative announcements, employee onboarding, modern learning and organization-wide broadcasts.

CC is backed by an Azure app service with a React app providing an interface for designated content users to create, preview, collaborate and send messages. It is a great example of how Azure can be used to extend teams, leveraging multiple cloud concepts and Azure services like functions, storage, bots and the service bus.

Being so widely used, Company Communicator is also the number one app in feature requests. Some of our smartest partners are currently working with multiple customers defining new scenarios, implementing extensions and other customizations. Those engagements generate CC variations and bring more and more customers to know and use the template.

Overview

Motivation

We all know that a diverse company is always better positioned to retain talent, and ultimately win on the competitive market.

A few weeks ago my colleague @Pradeep Bethi came up with the result of an effort to create a solution to congregate people around Employee Resource Groups (ERGs), have an efficient way to communicate messages and provide an intelligent way to clarify and ask questions, contributing to the overall company diversity.

The diverse team lead by Pradeep was able to combine Company Communicator, FAQ Plus and a brand new React application to create a new Teams app template with the major goal to foster diversity and inclusion in enterprises.

Customers loved that template, but some of the limitations of Company Communicator came to light. They were complaining of basically two things:

  1. The “feature” that basically mandate that images used in communications need to be posted in a public website. Authors in Company Communicator just reference, using an URL the image that is going to be used in the cards sent to users.
  2. Inability to schedule messages. Customers would like to schedule a few communication messages to be sent in the future. For example they could pre-configure the app to send customized messages on specific D&I dates of interest like the ones listed by the United Nations International Days and Weeks | United Nations or other websites like 2021 Workplace Diversity and Inclusivity D&I Calendar | Kazoo (kazoohr.com).

Great chance to engage and support!

New Features

Two new features were incorporated into a fork of Company Communicator 4.1 and also ported to the D&I Connect App template. Github repositories with both solutions are available for your reference:

Upload Image

The upload image feature is basically a button to allow authors to upload images to be used in Company Communicator communications. It is a front-end modification made in a single page of the CC React client application that uses a few react components and a custom function to convert an image on its base64 representation.

The same column used to store the image URL is used to store the base64 string. That allowed no changes in the Azure back-end components and a simple deployment. Azure storage tables have a limitation of 64kb and Teams can only support adaptive cards with 32kb in total. So the change we made controls the size of uploaded images to ensure we will not violate those limitations.

The result allows customers to use company communicator without the requirement to keep internal images in publicly accessible websites.

The new upload button when creating new company communicator messages

Message Scheduler

The message scheduler is a more complex change. New columns were incorporated to the Azure storage table to control the scheduled date and the status of the messages. A new background task was also implemented using IHostedService and the BackgroundService class.

The background service checks every 5 minutes if there are pending scheduled messages to send and execute the steps required to send the notifications appropriately.

We also made a few changes on the interface to allow authors to define when messages will be sent.

The new scheduler interface

When scheduled, messages become available in a third section created in the main messages interface. The Scheduled Message section allows authors to send notifications right away, make edits, copy the message, etc.

The new Scheduled messages section

Deployment

Sold to the new Company Communicator improvements? The deployment is super easy. If you already have Company Communicator 4.1 deployed, just open your Azure portal, select the App Service you are using to host the application and click Deployment Center.

Disconnect the source you are using and create a new External Git connection pointing to the repo where the changes were incorporated.

After disconnecting the previous GitHub source, under manual deployment (push), select External Git.

Then on Repository, type the https://github.com/cristianoag/microsoft-teams-apps-company-communicator.git, under Branch type master.

Now click Save and then Sync.

Wait until the deployment finish. You will have your Company Communicator with the new scheduler and the ability to upload files.

Now repeat that for each one of the Azure Functions you have on the same resource group. Those are the resources listed as:

<ccname>-data-function

<ccname>-function

<ccname>-prep-function

Comment if you have questions or need help! Have fun, Cristiano.

Disclaimer – The information contained in this blog post doesn’t represent the official Microsoft guidance or best practices. It is just the view of the author on current alternatives, implementations and workarounds for common issues and/or business needs. Please refer to official Microsoft documentation and evaluate carefully any steps, code or procedures documented herein. The author doesn’t offer any warranty. Use this information at your own risk.