Access emails of both the impersonating and impersonated users?

When I run a flow while impersonating an account, I want that flow to be able to send an email to both the account that I’m impersonating but also my account that I’m using to impersonate the user.


I can only see the email address of the user being impersonated as a step input, is there a way to access both emails?

Comments

  • Both the impersonating and impersonated users’ email addresses can be found in the flow as a step input under the ‘ImpersonationUserText’ flow data.

    This string is in the format ‘[ImpersonatingEmailAddress] as [ImpersonatedEmailAddress]’, so you can use a ‘Split String’ step to break the emails into two separate strings with ‘as’ being the separator.


    In your flow, add a ‘Split String’ step before your 'Send Email' step.

    Select the ‘Split String’ step, and in its properties panel set the ‘Source’ input to select from flow.

    Map in ‘Flow Data.ImpersonationUserText’ to the ‘Source’ input.

    Then set the ‘Separator’ input to constant, and enter ‘as’ for the separator string (without quotes).


    Configure your 'Send Email' step ‘To’ input field as Build Array, then map in ‘SplitString_Output.First’ and ‘SplitString_Output.Last’ as the email recipients.


    The impersonating and impersonated users’ email addresses are output as separate strings and passed to the 'Send Email' step.

    (‘Split String’ step inputs/outputs)


    (‘Send Email’ step inputs/outputs)


    For more information on the Split String step please see the below documentation:

    https://documentation.decisions.com/step-library/docs/split-string

Sign In or Register to comment.