Big Idea or Enduring Question:
How do you automatically send reminder emails to your users to upload a profile photo on Chatter?
Chatter is a powerful Collaboration tool for your organization, for both internal users and partners. Each user has a visible profile page containing his Chatter wall as well as information about the user, including an Image. The first thing to do in Chatter is uploading a profile picture to help your colleagues put a face to a name. In Salesforce I have never found Out of a box solution to send a reminder email to users to upload Chatter profile photos. In this article, we will develop an app by using Flow.
After reading this blog post, the reader will be able to:
- Use Schedule-Triggered Flow to find a list of users who doesn’t have a picture uploaded on Chatter
- Use Schedule-Triggered Flow to automatically send a reminder email to users
- Use Schedule-Triggered Flow to run a job that executes every Monday morning at 8:00 am.
Business Use case
Pamela Kline is working as a System administrator at Universal Containers (UC). She has received a requirement from the management to send out a reminder email once a week every Monday at 08:00 am to users who don’t have a Chatter profile photo.
Automation Champion Approach (I-do):
There are a few possible solutions for the above business scenario. We will use Schedule-Triggered Flow to solve the requirement. Before we unwrap, let us understand what Schedule-Triggered Flow is. Scheduled Flows are not triggered by an Event on the data; they simply run when a scheduled time arrives. Scheduled Flows run as follows:
- Once (On a particular date and time)
- Daily (On a particular date and time)
- Weekly (On a particular date and time)
Remember, when a Flow starts, a Flow interview runs for each record that matches the filter criteria – no looping is required. The matching record is stored in the $Record global variable, so you can reference the variable, or its fields, throughout your flow.
Before proceeding ahead, you have to understand the User object. It Represents a Chatter user profile.
|FullPhotoUrl||It represents the URL for the user’s profile photo. This field is available even if Chatter is disabled. The URL is updated every time a photo is uploaded and reflects the most recent photo.|
Now you might be wondering how you can find the list of users from FullPhotoUrl. To understand it better, let’s take a look at the SOQL query in the following screenshot:
- URL ends with profilephoto/005 – It means a user doesn’t have a profile picture
- URL ends with some record id (profilephoto/729B0000000Q6RV) – It means a user already uploaded the profile picture.
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it. Let’s begin building this automation process.