This morning I woke to an excellent e-mail from Ragnar Heil paying me a compliment about a video I’d created about connecting to Salesforce using Microsoft Flow and then a question on how to take it to the next level. What Ragnar was hoping to accomplish was an e-mail when an opportunity is created in an account that he is interested in.
My starting point for figuring out how to do this was to first create a new Flow that grabs a single opportunity so that I could see the values, field names, etc. I logged into Salesforce, navigated to Opportunities, and then selected one for an account that I would want to “follow”. Next, I copied the Opportunity ID to my clipboard (it’s in-between the words Opportunity & View within the URL)
My first step was “Manually trigger a Flow” so that I could kick it off and read the various values. The second action was “Get Records”. I added a Filter Query condition of ID eq ‘0061R00000m4IosQAE’ in order to pull back that single record.
Next, I ran the Flow in order to see the values returned in order to help better understand the Opportunity object and the various columns associated with it.
Since I wanted to get Opportunities for a specific account I changed the Flow Trigger to be when a new record is created, pointed at the Opportunities Object Type, and filtered to just the AccountId for the customer I wanted to track:
From there you can create other actions such as send e-mails, write to Excel spreadsheets, etc.
Create a new Opportunity in Salesforce and watch your Flow fire! 🙂