Log Email on Send in Flow Now Easy

I wrote a post almost a year ago instructing you how to log an email to the contact or lead from your flow. Now that’s a built in option in the Send Email Action in Flow in Summer ’23.

I’m cooking up some new posts including a new version of the Unsubscribe Link app that I’ll release any day now.

Use ChatGPT to Respond to Emails in Salesforce

Don’t know what to write to a customer or a major donor? Not sure how to be kind and encourage someone to try a little harder next time? ChatGPT can do that for you. And now you can use it right inside Salesforce to respond to your emails.

My colleague Brian Ricter wrote an apex class connecting Flow with ChatGPT. It takes a string, sends that as the prompt to ChatGPT and returns the response. You can use this apex action in a flow to do anything you want with ChatGPT!

I’ve utilized Brian’s apex action in a screen flow that helps you respond to a contact’s most recent email. And I’ve packaged it up for you to install easily.

In this demo, our company sells pet rocks. We’ve received a kind email from our customer Bob. Let’s use ChatGPT to respond to Bob in a friendly way and in a flirty way.
Continue reading Use ChatGPT to Respond to Emails in Salesforce

Flow Loops Just Got Simpler

Actually, I don’t know when this change happened, but I just noticed that Flow loops now only have four steps instead of five. The two assignments can now be consolidated into one.

You still have to add the record to a collection, but you can use the same assignment element.

Example 1: Update the record currently in the loop.

  1. Use a Get Records element to create a collection of records to loop through.
  2. Add a loop element
  3. Add ONE assignment element
    • Update field values for record currently in the loop.
    • Create a new record collection variable to hold the records you want to update.
    • Use the same assignment element to add the record currently in the loop to the new collection.
  4. Add an Update Records element to update the records in your new collection.

Follow my blog to keep up to date on Flow and Salesforce


Example 2: Create new records.

  1. Use a Get Records element to create a collection of records to loop through.
  2. Add a loop element
  3. Add ONE assignment element
    • Create a new record variable (not collection) to hold the values of the new record you want to create.
    • Assign field values to your new record variable.
    • Create a new record collection variable to hold your records that you want to create.
    • Use the same assignment element to add the record currently in the loop to the new collection.
    • Close the loop.
  4. Add a Create Records element to create the records in your new collection.

Previously step 3 involved two assignment elements!

Watch this recording on Flow loops.

This is how you would combine steps 3 and 4 into one assignment!

Log Email Sent Through Flow on a Contact Record

Shows the activity timeline of a contact record with one email message stored there sent at 2:46pm today with subject "Welcome to the family, Jemma!"
Log an email message on the contact record like this one.

UPDATE SUMMER ’23: This is no longer necessary! Read here.

When sending email from a contact record, it magically logs the message to your activity log. In classic, emails were/are automatically logged to the Activities related list. Well, flow doesn’t do that for you. Let me show you how to log it so you and your colleagues know when an email was sent to a contact.

After you add a “Send Email” action to your flow, add two more Create Records elements to the canvas. You will create records of these objects:

Continue reading Log Email Sent Through Flow on a Contact Record

Packages: Admin-Friendly Way to Move Metadata to Another Org

I build cool shit in Salesforce that I want to share with other people. How do I do that quickly and easily? I make an unmanaged package.

  • From Setup, search for and go to Package Manager.
  • Click New.
  • Fill out the form. Give yourself credit for creating the package and a way to get more information in applicable.
  • Don’t check “Managed.” By leaving it unchecked, you allow people who install it to make their own modifications.
Continue reading Packages: Admin-Friendly Way to Move Metadata to Another Org

Get Salesforce Practice by Tracking Your Habits

Want more practice learning Salesforce? Don’t have experience beyond Trailhead? Build an app to help you track good or bad habits. This is a win-win-win: hone your app builder skills, improve your habits, and you’ll have a cool app to show off in job interviews.

Salesforce Skills Used

  • Create a custom object and fields
  • Create reports
  • Create dashboard components
  • Make it mobile friendly
  • Problem solving: how to turn real life issues into measurable data
  • Send email every 3 days with stats
  • Bonus: Screen flow for easy tracking

My version: Migraine Tracking App

Forget record-triggered flows or apex triggers. The real demons are migraine triggers. I want to build an app to track when I have one of my trigger foods and when I have symptoms.

I have a threshold for tolerance of delicious triggers. I can eat some chocolate, dairy or red wine without reaching the threshold and getting sick, but I don’t know what the threshold is. Can building my own tracking app help?

Continue reading Get Salesforce Practice by Tracking Your Habits

Year End Tax Receipt for Donors

UPDATE 1/13/23: If you’re installing today from AppExchange, it’s a new version 1.4 that you can run by running a flow called Year End Tax Flow. New detailed instructions below. To install the new version, please uninstall the old version first! Go to Setup, search for “Installed Packages,” find “Year End Tax” and uninstall that.

Easy peasy list of all last year’s donations

Send your donors (contact records only) a tax receipt at the beginning of the new year listing all of last year’s donations. For Salesforce Nonprofit Success Pack users, this unmanaged package will generate a table for each donor listing the gifts they made last year. Use your own email to send a tax receipt by email. The table lists the amount, date and, optionally, the campaign name of each donation.

Package includes this sample template.

Thanks for the great app, just in time…Simple, easy, elegant, and just what we needed.

David, Eaglesrest.org
Continue reading Year End Tax Receipt for Donors

Flow: Display Photo or Upload Photo

The flow will display either a photo or remind you to upload one. On any object!

How It Works:

The Flow looks for a file attached to that record with the title “SalesforcePhoto” (or another phrase of your choosing).

The File gets the title from the name of the file when you upload it. If you upload SalesforcePhoto.jpg, the title becomes “SalesforcePhoto.” You could also open the File details in Salesforce and change the title.

If that file is found, it’s previewed thanks to the work of Narender Singh, (of course)!

If not found, it asks you to upload a file from your computer named SalesforcePhoto and attaches it to that record. From then on the, the flow displays the photo!

We are using the app because constituents and donors are more than just a record, and seeing their faces humanizes the data.

Donna, Vote Solar
Continue reading Flow: Display Photo or Upload Photo

5 Steps of Flow Loops

Repeat these steps whenever you need to look through a bunch of records

In less then 12 minutes, you’ll learn the five steps and be able to update the records in your collection.

Thanks to 100 Days of Trailhead for hosting this video on their YouTube channel and nudging me to make a follow up which will debut soon.

Continue reading 5 Steps of Flow Loops