Posts

Showing posts from December, 2022

Power Automate Copy SharePoint Page Content to another page in another site

Image
This step is part for the large post Duplicate Sharepoint Online Subsite with all Site Contents and Page[s] - Power Automate But can be used individually. The process is simple, in modern pages they did it so when you save/publish your page they send an ajax request with all the content, so you can just copy all that content and make your own HTTP with that content to update the desired page. After this  you can browse this additional content 1 - copy page and add it to navigation 2 - edit the content that you copy This is a 3 part tutorial 1 - get the data for page content 2 - prepare some data on item created (trigger) 3  - checkout / save  / publish page Part 1 - get the data for page content 1. Open browser and go to your template page (page you want to copy) 2. Edit page  3. Open develpopers tools (F12) and go to Network tab 4. Check the "Preserve log button" 5. Save/Publish the page 6. In the filter write "save" 7. Click View Source to change the date from par...

Power Automate Create sites scripts, designs, and archive for later use

Image
 This step is part of the longer post  Duplicate Sharepoint Online Subsite with all Site Contents and Page[s] - Power Automate And therefor was moved to a seperated post. 3. Create sites scripts, designs, and archive This is a 1-time process (for each design), so it should live as a manually triggered flow. Whenever you make a change, you need to run this again (and change what is relevant, if needed). REMEMBER - that will only affect newly created subsites, not old ones! I will show 1 Flow for 1 template, and you should create multiple, 1 for each template This is the full flow, and I will explain each piece Steps 1-3:  1 - Trigger, nothing to it, 2 - Initialize Variable type of Array, to store the array of our lists and libraries to be copied 3 - Get all lists, retrieve all Custom Lists and Document Libraries Display Names, from the Template Site (in my example - "ITX2-root") NOTICE - this is problematic in 2 ways: First it retrieves only the Display Names, meaning that...

Duplicate Sharepoint Online Subsite with all Site Contents and Page[s] - Power Automate

Image
 Too many was written, too scattered. So i'll try to make something complete. Our client wans a simple flow, when SP Items is created, duplicate 2 Template Sites, BOTH ARE SUBSITES, with the Document Libraries (can be also lists), and squeeze in (inject) some content (to the pages). Well 1st let me add that if the request would have included some design, or being a Root Site (like when you click "SharePoint" and "Create Site") than you would definitely use the "Create Site Design" ect. to some Library and apply it. But for me its different, so lets describe the actual steps: Its a bit of a process but I believe that you can take it in less than 1 hour with this full tutorial Table of Content 1. Build 2 ROOT sites and design them, theme, lists, libraries, columns (no content! - for content only PNP xml Engine) 2. Create helper lists in helper site (just another side site for some management) 3. Create sites scripts, designs, and archive for later use (r...