1

I am using SharePoint 2013 Online and I need to get the email address using the name of the person.

A single text field had the user name in it and using that, I need to retrieve the email address of the person using a WORKFLOW

Is that possible OOTB?

Edit:

What I'm trying to do is, send email to the person listed in the text field (Name format: Lastname, Firstname). It works for single person. But if there are more than one person, the workflow fails. Is there any alternative to achieve this?

6
  • what are you storing in text field? display name or login name? Commented Nov 14, 2015 at 3:01
  • @AtishDipongkor Display name Commented Nov 16, 2015 at 15:11
  • you can get user profile properties by login name vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html Commented Nov 16, 2015 at 15:29
  • I want to do using a workflow, if it is possible. See my edit for the detailed issue Commented Nov 16, 2015 at 15:31
  • you can call REST API from workflow as well. sergeluca.wordpress.com/2013/04/09/… Commented Nov 16, 2015 at 15:33

1 Answer 1

2

In the workflow designer you can set variables by querying the User Profiles as the data source. This needs the Account Name to search on.

To do this: 1. Choose Action "Set Workflow Variable".

  1. Create Workflow Variable "Email".

  2. Click fx on Value. Set Data Source as User Profiles. The rest you should be able to work out.

WF Variable set through User Profile

4
  • How to query user profile as data source? You have any links? Commented Nov 16, 2015 at 16:37
  • See Improved answer, this is from my knowledge as opposed to links I have followed. Commented Nov 16, 2015 at 16:41
  • Since you can only find the user profile by account name, even if you can parse your single text field into a user name (e.g. find the comma and use the first initial of the first name and the whole last time), this won't work for multiple users in one text field. Commented Nov 16, 2015 at 18:03
  • @ErinL Good point, user added this as an edit to the question in between writing my answer and refreshing the page! Commented Nov 18, 2015 at 10:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.