Template to get User email

Hi all,

I have an action in a workflow that sends an email notification when a document is transitioned for approval. The approval is made available to one of two possible approvers based on a metadata field of the document and what I’m trying to do is to send the notification email only to the correct approver.

Besides this I would like to refer to the email of a single-person group, rather than typing the actual email, for the sake of future accessibility and adaptation, should any of these approvers change.

So on the Recipient field I was looking to implement something like:

{% if workflow_instance.document.metadata_value_of.Area == ‘Area A’%} userA.email(?) {% elseif workflow_instance.document.metadata_value_of.Area == ‘Area B’%} userB.email(?) {% endif %}

Is there a way to get the “userA.email” to be a string that retrieves the email of the member of that group?

Thanks