We have a top level site with a list that contains information (site name, owner, URL, etc.) about subsites that have been created. The scenario I’m trying to figure out is how to change a subsite’s URL and Title if a user changes the name of the subsite in the list at the top level. I’m basically trying to use a workflow to accomplish changing the subsite URL and Title name.
I was able to do this on premise using the PowerShell action for Nintex Workflow that Aaron Labiosa created (NTX PowerShell Action - Stable Release). But I’m striking out so far as to how to do this in O365 via Nintex Workflow. Any ideas if this is even possible and if there are any approaches?
Solved! Go to Solution.
Eric, this should be possible, using the Call HTTP Web Service Action. (Don't have time to go into outline it out), but you'll have to come up with a method of know what the current Site Title / URL are and the new Site Title / URL are to be at the top level list. That way you can send a HTTP POST to the current site url web api to replace the Title and URL.
Will also need to make sure that your workflow has admin workflow permissions to do this.
I do this exact same mechanism (not with subsites but with document sets in a subsite) where the master data is controlled at a top level list.
Exactly Thomas .
You can do this using SharePoint REST API (How to execute a SP2013 REST API request with Nintex Workflow).
Here's Microsoft's documentation regarding changing a site properties :
To use this method you need the current subsite url.
You need to first get the request digest (I described how to do this in my blog) and then you can perform a POST web request with the following url :
the following headers :
and the following body (choose content) :
and you need to populate a username and password.
Note that there's a bug if you add references to workflow variables in the body of the web request. The workaround that I've found is to create a collection variable and add the following items Inside this collection (using several Add item to collection actions) :
Then you can use the Join Items in Collection action to get all this content in a workflow variable (and reference this workflow variable in the body/content part of the web request).
Don't hesitate if you need help.
Caroline Jung I really appreciate you taking the time to provide a workaround for this wf variable bug in web-request actions, that saved me quite some time!!
Frank Field what's the best way to inquire about a timeline for a fix on this one? I'm working with a single variable in my web-request body, and this bug cost me 5 actions since the below isn't possible. That's quite painful when trying to development within the action count limitations of O365 (especially with more variables or header values like Caroline Jung's example).
Hi, Patrick Abel! Nintex doesn't release roadmap information (and I don't have it anyway). However, if we're talking bug fixes, let's see if has some information...