cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can you activate/deactivate a site or site collection feature for a site during site creation in a workflow?

Jump to solution

Couldn't find anything through research, but wanted to know if there's an action in Nintex workflow that will activate/deactivate a site or site collection feature for a site during site creation in a workflow?

For example: Create a Site with a specific template. Then activate publishing.

Thanks.

Labels: (2)
Reply
5 Replies
Workflow Hero

Re: Can you activate/deactivate a site or site collection feature for a site during site creation in a workflow?

Jump to solution

Sorry, you wont be able to enable features from a workflow. I looked into possibly using webservices, but I didn't see a method for manipulating features, just to see which are activated.

It is a best practice to enable the publishing feature after site creation and not use a saved site template with publishing already enabled (yes, this is possible to do).

You could create a task for the admin to enable these features from the workflow though. Then after they do, they complete their task and the workflow can then complete any outstanding provisioning activities. Like creating lists.

Reply
Not applicable

Re: Can you activate/deactivate a site or site collection feature for a site during site creation in a workflow?

Jump to solution

Okay thank you for the response/confirming.

0 Kudos
Reply
Workflow Hero

Re: Can you activate/deactivate a site or site collection feature for a site during site creation in a workflow?

Jump to solution

I have actually successfully activated the Publishing feature on a site using the SP.FeatureCollection.add Method.

Here's some info:

Reference this super helpful post for instructions for getting the request digest and for making a rest api call in a web request action:

How to execute a REST API request with Nintex Workflow

Your web request configuration would look something similar to this:

URL: [site url variable]/_api/web/features/add('94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb') *You'll need the guid of the feature you are trying to activate

Content type: application/json;odata=verbose

Additional Header:

     Name: X-RequestDigest

     Value: [digest variable] *see instructions in the post referenced above

Leave the big text field blank as you don't need to pass any parameters.

Reply
Workflow Hero

Re: Can you activate/deactivate a site or site collection feature for a site during site creation in a workflow?

Jump to solution

You are correct Andrea! I was shown this in another discussion and forgot about this one long ago. Thank you for updating!

Reply
Workflow Hero

Re: Can you activate/deactivate a site or site collection feature for a site during site creation in a workflow?

Jump to solution

Hi Andrea,

Followed your steps above and getting the following error:

Request failed with status: FORBIDDEN.

Any suggestions what might be causing this ?

Thanks,

KP

0 Kudos
Reply