How to Parse a CSV String with a Salesforce Flow
About the Author:
As Managing Director at Venn Technology, Chase Friedman has built our Salesforce and integration practice from the ground up. When he’s not implementing strategy for the company, you’ll find him rolling up his sleeves to customize Salesforce environments. He's a pro at developing creative solutions that cut down on manual tasks so that people can focus on what they’re best at.
Are there times when you're looking for a simple solution and Google, Reddit, or Stack Exchange just aren't cutting it? That's what our team found when we were looking for a solid one-pager on how to parse a string with a flow.
In our initial search, we found a few outdated blogs. One in particular looked promising, but the screenshots are missing! The search wasn’t all for nothing though because we did find an UnofficialSF component that proved to be useful, which we'll cover as part of the overall solution below.
We're all about automating the mundane, manual, and menial tasks that take time away from higher value-added work here at Venn Technology.
One of our favorite use cases for automation is linking Zoom meeting recordings to records in Salesforce. If you’re familiar with Zoom and your organization uses a customer relationship management (CRM) platform like Salesforce, then you know meeting recordings don’t autosave between systems out-of-the-box. Being able to quickly reference meeting recordings with prospects and clients means our team can focus on the follow-up.
Here’s how we automated this process:
Zoom meeting recordings are automatically saved to Google Drive for safekeeping. The URLs for the recording, the audio, and the transcript then sync over to Salesforce as a quick way to access them.
We also have a security model in place that will share the Meeting Recording records with the right people (e.g. the folks that were in the meeting). It's pretty slick, but we wanted to take it one step further.
Our latest enhancement: creating Activities for Contacts associated to meeting recording records
The idea of creating Activities for Contacts and tying them to the meeting recording records seems simple enough with a flow.
With a CSV delimited string though, the only way to parse an unlimited number of emails is with Apex. In search of a more efficient solution, we opted to use the UnofficialSF component that has the Apex built in!
With the component installed, we set out to parse our string of names and emails to put into a collection. As it turns out, working with the component is relatively straight forward:
Add an Action to your Flow
Unless you have other components or actions installed, it should be the first one on the list when you type "CSV" into the New Action drop down menu.
Add in your details
Best practice tells us to name and describe what you're doing. After all, good notes aren't for you, they're for those that come after you! Make sure you slide the input to "on" and pick your field where your CSV field is located.
Build your Loop
This is the easy part! Select the output of the CSV action to loop through.
Automate your problem statement!
What you do from here is based on your specific needs and use cases. In our scenario, we searched for a related contact. If the related contact is found, an activity is created and assigned to the appropriate record IDs.
Now not only can we link the meeting recordings from our prospects and clients, but also for our recruits!
We hope this helped in giving you a quick win by automating something cool to get you back to doing what you're best at.
If you followed these steps for your own use case, we would love to know! Send us an email at firstname.lastname@example.org or tag Venn Technology on your favorite social platform.