cancel
Showing results for 
Search instead for 
Did you mean: 
kbsitz
Nintex Newbie

How do I extract a user's email address from an AD column to print in the body of the email ?

Jump to solution

When I add the AD column that contains a persons email into the body of a notification, it displays the AD account and NOT the email address.  I want to have the full email address which is shown in the column.

 

How do I extract a user's email address from an AD column to print in the body of a notification action?

Labels: (2)
Reply
5 Replies
powersj1
Nintex Newbie

Re: How do I extract a user's email address from an AD column to print in the body of the email ?

Jump to solution

I believe it uses the SharePoint profile, but you can use a Query user profile action to get an email address.  In this case I used the Initiator, but you could use any person you would like. 

0 Kudos
Reply
Highlighted
kbsitz
Nintex Newbie

Re: How do I extract a user's email address from an AD column to print in the body of the email ?

Jump to solution

I suppose I should stipulated that we are running Nintex 2007 and there is no Query User Profile action.

I believe my only alternative is to run an LDAP Query.  I will do that.  I believe I solved my own issue.

0 Kudos
Reply
Not applicable

Re: How do I extract a user's email address from an AD column to print in the body of the email ?

Jump to solution

If so, I think you get to select your own answer as "correct!" 

0 Kudos
Reply
kbsitz
Nintex Newbie

Re: How do I extract a user's email address from an AD column to print in the body of the email ?

Jump to solution

I will reply to myself on this one in case others are looking for a resolution.

 

Although I  resolved my issue using a LDAP Query, I did receive an email response from Support after the fact.  Support did confirm my resolution.  Below are the process steps.

 

It is slightly more complex for 2007, as there is not an option to select a return type when setting a variable. To do this you will need to take the domain\username value being passed from the list column and put it first into a regular expression to remove the "DOMAIN\" portion, and then use this in a Query LDAP action to look up the users email address.

 

The process will look something like (actions in bold):

 

1 - Set Variable - Configure
this to set a text variable (varPerson) based on the list column.

 

2 - Regular Expression -
Configure this with the Pattern: ^(.+?)\\ Replacement
text
to be blank, Input Text to be the variable created above, Store
Result In
should be a new variable, in this example varsAMAccountName (the
AD user property we end up with)

 

3 - Log in the history list -
I just use this to visually confirm the variables are being set correctly, so
configure it to print both varPerson and varsAMAccountName to the history list.

 

4 - Query LDAP - Configure
this to point to the correct LDAP path for your environment, then set the Query
as: (&(objectCategory=person)(objectClass=user)(sAMAccountName={WorkflowVariable:varsAMAccountName}))in the Property to Retrieve box type: mail

Store Result In should be another new variable, this can then be used in
place of the list column in any notifications.

 

5 - Log in the history list -
Again I just use this to visually confirm the variables are setting correctly,
so I would configure it to print the last variable to the history list.

View solution in original post

0 Kudos
Reply
Not applicable

Re: How do I extract a user's email address from an AD column to print in the body of the email ?

Jump to solution

Very cool, thank you!

0 Kudos
Reply