0

Hi all I have a flow and if a particular checkbox is checked I have set an email alert to fire.

Now I have to restrict the email to be sent to a particular profile's users. I have created an apex class and fetched the profile and set the users under the profile as the recipients.

Called the apex action in the flow instead of the email alert action and it is working. I am also checking for a workaround on this using the flow itself.

Is it possible that I get the users under the profile using the get records and set all these users as recipients in the email alert action in the flow itself?

I tried this way and didn't get it working.

4
  • 1
    Yes we can get all the users under that profile and add the email ids to one variable and add that variable in receipients. Can you share the flow so can check where the issue is Dec 6, 2022 at 8:50
  • @SaiPraveenKakkirala Thanks for the reply. I have fixed it and it is working fine.
    – Ash
    Dec 7, 2022 at 7:35
  • I can add my solution as answer if you followed the same and issue is resolved Dec 7, 2022 at 7:43
  • @SaiPraveenKakkirala Yes please I will accept it as the answer.
    – Ash
    Dec 7, 2022 at 7:44

1 Answer 1

0

As confirmed in the comment you can get all the users in that profile using get records element and iterate through that collection . In the for Loop you can add all the email ids to a variable and use that variable to in receipients.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .