Generating documents from SharePoint Designer workflows

MVP

i'm trying to build somehting similar to the described solution in the below link:

 

http://www.quercussolutions.com/blog/index.php/out-of-the-box-document-generation-in-sharepoint-2/

 

I'm using office 365 and SharePoint designer to create the workflow that will read the data form a list and generate a document in a document library. All works almost as expected.

 

The document is created however the document template specificed on the content type isn't being picked up.

When I look at the document properties the content type is set correctly. But the actual document template seem to be ignored.

 

When i clikc on the New button in the document library I'm finding that the document tmeplate is being picked up without fail.

 

3 Replies
Is this a SharePoint 2013 workflow? If so, that might be the problem....this works without problem with SharePoint 2010 workflows (legacy ones)

Hi @Juan Carlos González Martín,

I was using the 2013 workflow engine. I did some testing this morning with the equivalent 2010 steps and my results are not great. 

1. when I configure a custom document library with a custom content type and I set the content type inside the workflow then I'm getting:

The workflow could not create the list item. Make sure the list exists and the user has permissions to add items to the list.

2. When I set the content type in the workflow to the out of the box "Document" then the workflow creates a document successfully.

3. Then I tried with a custom document template on the library and even though the document is created the document fails to open complaining about the content. 

 

So it looks like I can't use custom content types.

 

Very weird, last time I tried this it worked...I will try to find some time to test your schenario and see what I'm ablae to do