Vadim Tabakman

Nintex Workflow - Exchange Out of Office UDA

A lot of this information is described in the video attached to this post, so I won't go through every single bit of it. 

Since I've been discussing the Exchange Out of Office functionality recently, I thought I needed to implemend a Nintex Workflow User Defined Action that would talk to Exchange and pull out a users out-of-office settings.  That way, I can start adding more robustness into my workflows that I design that generate tasks for people.

When building a workflow like that, usually I would rely on a feature of Nintex Workflow called Long Term Delegation.  This is where you can click on your name in SharePoint, then in the drop down select Nintex Workflow 2013 > Task Delegation.  This functionality allows the task actions in Nintex Workflow to look into those settings and if a task is to be assigned to User1 and they have this enabled, it will automatically delegate that task to the user that is specified in the settings.

You can find more information on Long Term Delegation here : Long Term Delegation

An important link for this post is this : GetUserOofSettings

Calling the Exchange Web Service

The web service url for the Exchange web service looks like this : http://[exchsrv]/ews/exchange.asmx .

What I found is that the web service doesn't seem to expose a WSDL file, which means using the Call Web Service action is not something I can use.  But in comes the Web Request action to help.  You can still make a SOAP call using this action and that is what I used in this User Defined Action.

Pulling the Out of Office Settings

Web Request

In the screenshot above, the packet is quite simple.  It needs an email address and that is what Exchange uses to lookup the Oof settings for that user.

The rest of the design of the UDA, is making sure that I get a valid HTTP response and then pulling out the information I need.  As to the information in the XML response from the Exchange web service, there are 3 important pieces of data.

1. OofSettings - this tells me if the user has an Out of Office reply Scheduled or not (Disable).

2. If it is Scheduled, then I need to look further into the XML and pull out the Start and End time for the Out of Office settings. Then I convert the text values from XML into Date/Time variables and pass that back to the calling workflow.

UDA Design

What Else Can you Do?

There are a bunch of methods that the Exchange web service exposes.  It would be nice to have a User Defined Action for each of the methods and if I have time, I'd do it.  But if there's something that you need, take a look at the MSDN site for the methods that are exposed.

Conclusion

The UDA that is associated with this post and you can download below, requires 2 Workflow constants.  EwsUrl which is the URL to the Exchange webservice and also EwsAdminCredential which is the account that has the permission to query for the Oof information in Exchange.

Downloads

Nintex Workflow 2013

Download the UDA - Download and import it into the UDA Designer Page

Download the Test Workflow - Download and import into the Workflow Designer Page

But a fair bit of warning is needed for the video.  I didn't edit it, so it sounds quite raw :).

 

Gravatar
Posted by Vadim Tabakman Monday, December 23, 2013 1:18:00 PM Categories: Convert Value Nintex Nintex Workflow Run If User Defined Actions Web Request
Copyright Vadim Tabakman
Rate this Content 0 Votes

Comments

Tuesday, January 21, 2014 3:19:59 AM
Bryan

re: Nintex Workflow - Exchange Out of Office UDA

 This is a nice post. I would like to use this method to check if someone is out. If they are out I would like to check if a long term delegation rule has been setup for them. If not then notify the admin to set up a long term delegation rule for them. How can I check to see if a delegation rule is setup? I don't see that as an available web call in workflow.asmx.

Tuesday, January 21, 2014 7:23:41 AM

re: Nintex Workflow - Exchange Out of Office UDA

Hi Bryan,

that information is stored in the Nintex Workflow database, so you'd need to query the database for that.

cheers,

Vadim

Tuesday, February 4, 2014 10:27:17 AM
Bryan

re: Nintex Workflow - Exchange Out of Office UDA

When trying this UDA out I get "Unexpected error occurred while making the request. Error performing web request. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."

Sunday, February 16, 2014 11:19:15 AM

re: Nintex Workflow - Exchange Out of Office UDA

Hi Bryan,

could be that you're missing a certificate needed for communication to an SSL encrypted url.

cheers,

Vadim

Thursday, April 17, 2014 6:51:36 AM

re: Nintex Workflow - Exchange Out of Office UDA

Hello Vadim,

In Exchange Online when i try to access OOF status of other user using Admin credentials. It is giving me Access Denied in service response. Do we have to enable any setting for this to work? Please help.

Thursday, April 17, 2014 7:49:04 AM

re: Nintex Workflow - Exchange Out of Office UDA

Hi Manish,

I haven't actually tried that with Exchange Online.  There must be some permissions you'll need to give the account you're using to access the out of office stuff in Exchange Online, but I don't know what that is.

cheers,

Vadim

Tuesday, July 8, 2014 6:55:51 AM
Lukasz
Gravatar

re: Nintex Workflow - Exchange Out of Office UDA

Hi there

I have problems with connection with web service.
As a result of web request from ews I have:
Connection did not succeed. Try again later.ErrorConnectionFailed0
It's accessible directly through browser with the same credentials.
Regards
Lukasz

 

Tuesday, July 8, 2014 10:08:59 AM

re: Nintex Workflow - Exchange Out of Office UDA

Hi Lukasz,

Check if the web service is accessible in the browser on the actual SP farms server.

cheers,

Vadim

Wednesday, July 9, 2014 3:22:56 AM
Lukasz
Gravatar

re: Nintex Workflow - Exchange Out of Office UDA

Thanks Vadim
The web service is accessible on the sp farms server.
What else I can check?
Regards
Lukasz

Wednesday, July 9, 2014 4:43:18 AM
Lukasz
Gravatar

re: Nintex Workflow - Exchange Out of Office UDA

I've found that when I'm using in the web request my credential and getting query of my mailbox - I get right answer. So the problem is with permissions in Exchange. Anyone knows what are the minimal rights to query all mailboxes for out of office?

Regards
Lukasz

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register





 

Statistics

  • Entries (246)
  • Comments (1725)

Categories