web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : UrwLgn1KGKYYPIGW5LKzTV
Power Automate - Using Flows
Answered

Word Templates not showing up in SharePoint/Teams after being added via PowerAutomate

Like (0) ShareShare
ReportReport
Posted on 25 Jan 2023 06:39:41 by Microsoft Employee

We have been trying to setup a flow that automatically mirrors (read: copies and creates new) Word templates from one Teams Channel to another. The goal is to have them appear in the "+ New" dropdown in SharePoint and Teams.

vprasaddas_0-1674628565142.png

We created below flow.

vprasaddas_1-1674628609098.png

 

However, after successfully running the flow, the word file does not show up in the "+ New" dropdown. When we try to manually add the same file via the "+ New" dropdown, it shows a message that a file with that name already exists.

vprasaddas_2-1674628637799.png


Can anyone please help here?
Thanks, in advance!

  • Verified answer
    v-xiaochen-msft Profile Picture
    on 26 Jan 2023 at 07:34:02
    Re: Word Templates not showing up in SharePoint/Teams after being added via PowerAutomate

    Hi @v-prasaddas ,

     

    I turned on the browser develop mode and captured webapi.

    I guess it performs two step.

    1\ Upload the template file to forms folder.

    2\ Update the current View and make the template file to be visible in "+ New" dropdown.

     

    In your flow, you completed the first step perfectly.

    So please call an api to complete the second step.

     

    Post api- api/web/GetList(@a1)/DefaultView/SetViewXml()?@a1=%27%2Fsites%2Fwearsky%2FTestGG%27

    If I decode the 'ai', it should be '/sites/wearsky/TestGG'.

    // wearsky is the site name and TestGG is the library name. When you call the api, please remember encode it.

     

    Payload:

    {
     "viewXml": "<View Name=\"{***************}\" DefaultView=\"TRUE\" MobileView=\"TRUE\" MobileDefaultView=\"TRUE\" Type=\"HTML\" DisplayName=\"All Documents\" Url=\"/sites/wearsky/TestGG/Forms/AllItems.aspx\" Level=\"1\" BaseViewID=\"1\" ContentTypeID=\"0x\" ImageUrl=\"/_layouts/15/images/dlicon.png?rev=47\"><Query><OrderBy><FieldRef Name=\"FileLeafRef\"/></OrderBy></Query><ViewFields><FieldRef Name=\"DocIcon\"/><FieldRef Name=\"LinkFilename\"/><FieldRef Name=\"Modified\"/><FieldRef Name=\"Editor\"/><FieldRef Name=\"ID\"/><FieldRef Name=\"_x7b7e__x6838__x72b6__x6001_\"/><FieldRef Name=\"Test\"/><FieldRef Name=\"Test_Pic\"/><FieldRef Name=\"Test_Metadata\"/><FieldRef Name=\"CC\"/><FieldRef Name=\"sdf\"/><FieldRef Name=\"Created\"/></ViewFields><RowLimit Paged=\"TRUE\">30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default=\"TRUE\">main.xsl</XslLink><CustomFormatter/><NewDocumentTemplates>[{\"templateId\":\"NewFolder\",\"title\":\"Folder\",\"visible\":true},{\"templateId\":\"NewDOC\",\"title\":\"Word document\",\"visible\":true},{\"templateId\":\"NewXSL\",\"title\":\"Excel workbook\",\"visible\":true},{\"templateId\":\"NewPPT\",\"title\":\"PowerPoint presentation\",\"visible\":true},{\"templateId\":\"NewONE\",\"title\":\"OneNote notebook\",\"visible\":true},{\"templateId\":\"NewXSLSurvey\",\"title\":\"Excel survey\",\"visible\":true},{\"templateId\":\"NewXSLForm\",\"title\":\"Forms for Excel\",\"visible\":true},{\"templateId\":\"NewVSDX\",\"title\":\"Visio drawing\",\"visible\":true},{\"contentTypeId\":\"0x010100D6B49F9E00314D459014EBB1CABBC920\",\"isUpload\":true,\"templateId\":\"Book3 (1)\",\"title\":\"Book3 (1)\",\"url\":\"/sites/wearsky/TestGG/Forms/Book3 (1).xlsx\",\"visible\":true}]</NewDocumentTemplates><Toolbar Type=\"Standard\"/></View>"
    }

    // Let's say you have uploaded the file named 'Boo3 (1)', make sure the visible property is true.

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow