<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SharePoint Online Archives : Binary Bits</title>
	<atom:link href="https://blog.binarybits.net/tag/sharepoint-online/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.binarybits.net/tag/sharepoint-online/</link>
	<description>Bits &#38; Pieces - A blog by Kannan Balasubramanian</description>
	<lastBuildDate>Mon, 03 May 2021 10:51:30 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Generate PDF from SharePoint Online list item using Power Automate</title>
		<link>https://blog.binarybits.net/generate-pdf-from-sharepoint-online-list-item-using-power-automate/</link>
					<comments>https://blog.binarybits.net/generate-pdf-from-sharepoint-online-list-item-using-power-automate/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Sat, 24 Apr 2021 09:20:00 +0000</pubDate>
				<category><![CDATA[Power Automate]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1491</guid>

					<description><![CDATA[<p>Generating a PDF from SharePoint used to be a common requirement and when using server-side object model, it was easy to use some kind of PDF library and generate PDFs. But in SharePoint Online we can use Power Automate to generate PDFs and the following are the steps that can be used for this. There [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/generate-pdf-from-sharepoint-online-list-item-using-power-automate/">Generate PDF from SharePoint Online list item using Power Automate</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Generating a PDF from SharePoint used to be a common requirement and when using server-side object model, it was easy to use some kind of PDF library and generate PDFs. But in SharePoint Online we can use Power Automate to generate PDFs and the following are the steps that can be used for this.</p>





<p>There are two ways by which a PDF can be generated.</p>



<ul class="wp-block-list"><li>Using OneDrive for Business&#8217;s &#8220;Convert HTML file to PDF&#8221;</li><li>Word Online&#8217;s &#8220;Populate a Microsoft Word Template&#8221; &amp; &#8220;Convert Word Document to PDF&#8221; (These are premium action so a premium license is required and is in preview as of Feb 2021.)</li></ul>



<p>In my example the scenario is to generate an invite pass for attendees attending a conference.</p>



<h1 class="wp-block-heading">The generated PDF</h1>



<p>The generated PDF will look like the following.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate.png"><img fetchpriority="high" decoding="async" width="726" height="1024" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-726x1024.png" alt="" class="wp-image-1492" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-726x1024.png 726w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-213x300.png 213w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-768x1083.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1090x1536.png 1090w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-705x994.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate.png 1203w" sizes="(max-width: 726px) 100vw, 726px" /></a></figure></div>



<h1 class="wp-block-heading">The data source</h1>



<h2 class="wp-block-heading">SharePoint List</h2>



<p>Here we are using SharePoint Online and the data source is a simple SharePoint list which contains the following.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1.png"><img decoding="async" width="1024" height="178" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1-1024x178.png" alt="" class="wp-image-1493" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1-1024x178.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1-300x52.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1-768x134.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1-1536x267.png 1536w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1-705x123.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-1.png 1839w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<h2 class="wp-block-heading">OneDrive for Business</h2>



<p>The OneDrive for Business has two artificats</p>



<ol class="wp-block-list"><li>A Logo image is used for both methods.</li><li>A Microsoft Word Document (This will be used for the second method and not for the first method)</li></ol>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10.png"><img decoding="async" width="1024" height="240" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-1024x240.png" alt="" class="wp-image-1495" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-1024x240.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-300x70.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-768x180.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-705x165.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10.png 1464w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Please note that for both methods, the Power Automate is triggered whenever the SharePoint list item is created or modified.</p></blockquote>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>In the below article when the product &#8220;OneDrive&#8221; is mentioned, it&#8217;s actually &#8220;OneDrive for Business&#8221;.</p></blockquote>



<h1 class="wp-block-heading">Method 1: Using OneDrive for Business&#8217;s &#8220;Convert HTML file to PDF&#8221;</h1>



<p>The trigger is when a SharePoint List item is created or modified.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23.png"><img loading="lazy" decoding="async" width="911" height="278" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23.png" alt="" class="wp-image-1497" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23.png 911w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23-300x92.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23-768x234.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23-705x215.png 705w" sizes="auto, (max-width: 911px) 100vw, 911px" /></a></figure></div>



<p>The next action would be to fetch the image of the logo located in the OneDrive.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34.png"><img loading="lazy" decoding="async" width="914" height="224" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34.png" alt="" class="wp-image-1498" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34.png 914w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34-300x74.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34-768x188.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34-705x173.png 705w" sizes="auto, (max-width: 914px) 100vw, 914px" /></a></figure></div>



<p>Now we have to convert the logo into a Uri format using the expression editor and initialize a variable with it.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41.png"><img loading="lazy" decoding="async" width="577" height="146" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41.png" alt="" class="wp-image-1500" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41.png 577w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41-300x76.png 300w" sizes="auto, (max-width: 577px) 100vw, 577px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">dataUri(outputs('Get_logo_file_content')?['body'])</pre></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40.png"><img loading="lazy" decoding="async" width="911" height="277" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40.png" alt="" class="wp-image-1499" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40.png 911w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40-300x91.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40-768x234.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40-705x214.png 705w" sizes="auto, (max-width: 911px) 100vw, 911px" /></a></figure></div>



<h2 class="wp-block-heading">Creating the HTML Content</h2>



<p>Next is the important action where the actual HTML content will be created.</p>



<h3 class="wp-block-heading">HTML Content Method 1: Using Simple HTML script like below.</h3>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}">&lt;html&gt;
    &lt;body&gt;
        &lt;p&gt;
            &lt;img style=&quot;display: block; margin-left: auto; margin-right: auto;&quot; src=&quot;&quot; alt=&quot;&quot;&gt;
            &lt;img&gt;
        &lt;/p&gt;
        &lt;p style=&quot;text-align: center;&quot;&gt;
            &lt;h1&gt;
            &lt;/h1&gt;
        &lt;/p&gt;
        &lt;p style=&quot;text-align: center;&quot;&gt;
            &lt;h2&gt;
            &lt;/h2&gt;
        &lt;/p&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre></div>



<p>For the seasoned HTML developer who is well versed with HTML &amp; CSS, he/she/they can create the HTML content or the other easiest method is to use the Microsoft Word desktop software to create the HTML.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>If you use a simple method, do make sure the CSS is perfect. For the most part I tried, the conversion from HTML to PDF kept ignore the CSS, hence the second method.</p></blockquote>



<h3 class="wp-block-heading">HTML Content Method 2: Using Microsoft Word</h3>



<ol class="wp-block-list"><li>Open the Microsoft Word.</li><li>Design the contents.</li><li>Save the file as &#8220;Web Page, Filtered&#8221;.</li><li>Open that file using an HTML Editor or Notepad and copy the contents.</li></ol>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44.png"><img loading="lazy" decoding="async" width="1024" height="970" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44-1024x970.png" alt="" class="wp-image-1503" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44-1024x970.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44-300x284.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44-768x727.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44-705x668.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-44.png 1454w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-43.png"><img loading="lazy" decoding="async" width="629" height="179" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-43.png" alt="" class="wp-image-1502" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-43.png 629w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-43-300x85.png 300w" sizes="auto, (max-width: 629px) 100vw, 629px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}">&lt;html&gt;

&lt;head&gt;
	&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=windows-1252&quot;&gt;
	&lt;meta name=Generator content=&quot;Microsoft Word 15 (filtered)&quot;&gt;
	&lt;style&gt;
		&lt;!--
		/* Font Definitions */
		@font-face {
			font-family: &quot;Cambria Math&quot;;
			panose-1: 2 4 5 3 5 4 6 3 2 4;
		}

		@font-face {
			font-family: Calibri;
			panose-1: 2 15 5 2 2 2 4 3 2 4;
		}

		@font-face {
			font-family: &quot;Calibri Light&quot;;
			panose-1: 2 15 3 2 2 2 4 3 2 4;
		}

		/* Style Definitions */
		p.MsoNormal,
		li.MsoNormal,
		div.MsoNormal {
			margin-top: 0cm;
			margin-right: 0cm;
			margin-bottom: 8.0pt;
			margin-left: 0cm;
			line-height: 107%;
			font-size: 11.0pt;
			font-family: &quot;Calibri&quot;, sans-serif;
		}

		h1 {
			mso-style-link: &quot;Heading 1 Char&quot;;
			margin-top: 12.0pt;
			margin-right: 0cm;
			margin-bottom: 0cm;
			margin-left: 0cm;
			line-height: 107%;
			page-break-after: avoid;
			font-size: 16.0pt;
			font-family: &quot;Calibri Light&quot;, sans-serif;
			color: #2F5496;
			font-weight: normal;
		}

		span.Heading1Char {
			mso-style-name: &quot;Heading 1 Char&quot;;
			mso-style-link: &quot;Heading 1&quot;;
			font-family: &quot;Calibri Light&quot;, sans-serif;
			color: #2F5496;
		}

		.MsoChpDefault {
			font-family: &quot;Calibri&quot;, sans-serif;
		}

		.MsoPapDefault {
			margin-bottom: 8.0pt;
			line-height: 107%;
		}

		@page WordSection1 {
			size: 595.3pt 841.9pt;
			margin: 72.0pt 72.0pt 72.0pt 72.0pt;
		}

		div.WordSection1 {
			page: WordSection1;
		}
		--&gt;
	&lt;/style&gt;

&lt;/head&gt;

&lt;body lang=EN-IN style='word-wrap:break-word'&gt;

	&lt;div class=WordSection1&gt;

		&lt;p class=MsoNormal align=center style='text-align:center'&gt;&lt;img width=200 height=200 id=&quot;Picture 1&quot;
				src=&quot;Word-HTML_files/image001.png&quot; alt=&quot;Icon&amp;#10;&amp;#10;Description automatically generated&quot;&gt;&lt;/p&gt;

		&lt;h1 align=center style='text-align:center'&gt;Kannan Balasubramanian&lt;/h1&gt;

		&lt;p class=MsoNormal align=center style='text-align:center'&gt;2&lt;/p&gt;

	&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;</pre></div>



<p>Create an action to initialise a variable and paste the contents. Replace the image source with &#8220;LogoUri&#8221; variable, Title &amp; ID from the trigger &#8220;When an item is created or modified&#8221;.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3.png"><img loading="lazy" decoding="async" width="244" height="1024" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3-244x1024.png" alt="" class="wp-image-1508" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3-244x1024.png 244w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3-768x3221.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3-366x1536.png 366w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3-488x2048.png 488w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3-705x2957.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-3.png 910w" sizes="auto, (max-width: 244px) 100vw, 244px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">variables('LogoUri')</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/Title']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/ID']</pre></div>



<p>Now the HTML contents should be saved to a HTML file. We are going to use OneDrive&#8217;s &#8220;Create file&#8221; action and will use the same &#8220;Dev&#8221; folder to create the file and use the ID as file name to uniquely generate a file for each item and the file content as the &#8220;HTMLContent&#8221; variable.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-4.png"><img loading="lazy" decoding="async" width="912" height="280" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-4.png" alt="" class="wp-image-1509" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-4.png 912w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-4-300x92.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-4-768x236.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-4-705x216.png 705w" sizes="auto, (max-width: 912px) 100vw, 912px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/ID']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">variables('HTMLContent')</pre></div>



<p>The created HTML file now can be converted to a PDF file and we will use OneDrive&#8217;s &#8220;Convert file using path&#8221; action. The &#8220;File Path&#8221; will rely on the &#8220;Create HTML file&#8221; action&#8217;s &#8220;Path&#8221; property.</p>



<h2 class="wp-block-heading">Converting HTML Content to PDF</h2>



<figure class="wp-block-pullquote"><blockquote><p>This action is in preview as of February 2021.</p></blockquote></figure>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-5.png"><img loading="lazy" decoding="async" width="912" height="220" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-5.png" alt="" class="wp-image-1510" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-5.png 912w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-5-300x72.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-5-768x185.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-5-705x170.png 705w" sizes="auto, (max-width: 912px) 100vw, 912px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Create_HTML_file')?['body/Path']</pre></div>



<p>Once converted the PDF content will be saved as a file using OneDrive&#8217;s &#8220;Create file&#8221; action.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-6.png"><img loading="lazy" decoding="async" width="909" height="277" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-6.png" alt="" class="wp-image-1511" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-6.png 909w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-6-300x91.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-6-768x234.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-6-705x215.png 705w" sizes="auto, (max-width: 909px) 100vw, 909px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/ID']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Convert_HTML_file_to_PDF_using_path')?['body']</pre></div>



<h2 class="wp-block-heading">Deleting the HTML File</h2>



<p>If required we will use OneDrive&#8217;s &#8220;Delete file&#8221; action to delete the HTML file which was generated previously to avoid wasting the space.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-7.png"><img loading="lazy" decoding="async" width="909" height="166" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-7.png" alt="" class="wp-image-1512" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-7.png 909w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-7-300x55.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-7-768x140.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-7-705x129.png 705w" sizes="auto, (max-width: 909px) 100vw, 909px" /></a></figure></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Create_HTML_file')?['body/Path']</pre></div>



<h2 class="wp-block-heading">Testing</h2>



<p>Now save the Power Automate and test it once to check if it&#8217;s working fine.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9.png"><img loading="lazy" decoding="async" width="506" height="463" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9.png" alt="" class="wp-image-1514" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9.png 506w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9-300x275.png 300w" sizes="auto, (max-width: 506px) 100vw, 506px" /></a></figure></div>



<p>Create a new item in SharePoint and save it.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11.png"><img loading="lazy" decoding="async" width="1024" height="401" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-1024x401.png" alt="" class="wp-image-1515" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-1024x401.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-300x117.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-768x300.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-705x276.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11.png 1194w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p>Go to OneDrive and check if the file is generated.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12.png"><img loading="lazy" decoding="async" width="1024" height="262" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-1024x262.png" alt="" class="wp-image-1516" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-1024x262.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-300x77.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-768x197.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-705x180.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12.png 1391w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Open the file to check if it has been created.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15.png"><img loading="lazy" decoding="async" width="1024" height="532" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-1024x532.png" alt="" class="wp-image-1519" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-1024x532.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-300x156.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-768x399.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-1536x798.png 1536w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-2048x1063.png 2048w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-705x366.png 705w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h1 class="wp-block-heading">Method 2: Using Word Online’s “Convert Word Document to PDF”</h1>



<p>The trigger is when a SharePoint List item is created or modified.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23.png"><img loading="lazy" decoding="async" width="911" height="278" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23.png" alt="" class="wp-image-1497" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23.png 911w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23-300x92.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23-768x234.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-23-705x215.png 705w" sizes="auto, (max-width: 911px) 100vw, 911px" /></a></figure>



<p>The next action would be to fetch the image of the logo located in the OneDrive.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34.png"><img loading="lazy" decoding="async" width="914" height="224" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34.png" alt="" class="wp-image-1498" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34.png 914w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34-300x74.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34-768x188.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-34-705x173.png 705w" sizes="auto, (max-width: 914px) 100vw, 914px" /></a></figure>



<p>Now we have to convert the logo into a Uri format using the expression editor.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40.png"><img loading="lazy" decoding="async" width="911" height="277" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40.png" alt="" class="wp-image-1499" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40.png 911w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40-300x91.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40-768x234.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-40-705x214.png 705w" sizes="auto, (max-width: 911px) 100vw, 911px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41.png"><img loading="lazy" decoding="async" width="577" height="146" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41.png" alt="" class="wp-image-1500" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41.png 577w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-41-300x76.png 300w" sizes="auto, (max-width: 577px) 100vw, 577px" /></a></figure>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">dataUri(outputs('Get_logo_file_content')?['body'])</pre></div>



<h2 class="wp-block-heading">Creating Word template</h2>



<p>Open a word and if the developer tab is not available, configure the word to make it visible as shown below.</p>



<ul class="wp-block-list"><li>Click on the tab &#8220;File.</li><li>Click on the menu &#8220;Options&#8221;</li><li>Click on the tab &#8220;Customize Ribbon&#8221;</li><li>Check the item &#8220;Developer&#8221; if not already checked.</li></ul>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-16.png"><img loading="lazy" decoding="async" width="797" height="240" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-16.png" alt="" class="wp-image-1522" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-16.png 797w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-16-300x90.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-16-768x231.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-16-705x212.png 705w" sizes="auto, (max-width: 797px) 100vw, 797px" /></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17.png"><img loading="lazy" decoding="async" width="1024" height="970" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17-1024x970.png" alt="" class="wp-image-1523" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17-1024x970.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17-300x284.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17-768x727.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17-705x668.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-17.png 1454w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20.png"><img loading="lazy" decoding="async" width="1024" height="835" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20-1024x835.png" alt="" class="wp-image-1524" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20-1024x835.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20-300x245.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20-768x627.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20-705x575.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-20.png 1260w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21.png"><img loading="lazy" decoding="async" width="1024" height="835" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21-1024x835.png" alt="" class="wp-image-1525" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21-1024x835.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21-300x245.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21-768x627.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21-705x575.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-21.png 1260w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p>Now you should have a developer tab in the ribbon.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22.png"><img loading="lazy" decoding="async" width="1024" height="134" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22-1024x134.png" alt="" class="wp-image-1526" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22-1024x134.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22-300x39.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22-768x100.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22-705x92.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-22.png 1447w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Now use the &#8220;Picture Control Content&#8221; to add a place holder for the logo.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-25.png"><img loading="lazy" decoding="async" width="141" height="116" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-25.png" alt="" class="wp-image-1529"/></a></figure></div>



<p>Once added, click on the placed &#8220;Picture Control Content&#8221; and then click on &#8220;Properties&#8221; in the ribbon to set the &#8220;Title&#8221; as &#8220;Logo&#8221; &amp; &#8220;Tag&#8221; as &#8220;Logo&#8221;</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-26.png"><img loading="lazy" decoding="async" width="152" height="111" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-26.png" alt="" class="wp-image-1530" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-26.png 152w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-26-150x111.png 150w" sizes="auto, (max-width: 152px) 100vw, 152px" /></a></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-28.png"><img loading="lazy" decoding="async" width="410" height="427" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-28.png" alt="" class="wp-image-1532" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-28.png 410w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-28-288x300.png 288w" sizes="auto, (max-width: 410px) 100vw, 410px" /></a></figure></div>



<p>Repeat the same for Title &amp; ID using the &#8220;Rich Text Content Control&#8221;</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-29.png"><img loading="lazy" decoding="async" width="141" height="120" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-29.png" alt="" class="wp-image-1533"/></a></figure></div>



<p>Once added, click on the properties to set a &#8220;Title&#8221; as &#8220;Title&#8221; &amp; &#8220;Tag&#8221; as &#8220;Title&#8221; for the title place holder and &#8220;Title&#8221; as &#8220;Id&#8221; &amp; &#8220;Tag&#8221; as &#8220;Id&#8221; for ID place holder and use formats like alignment and text styles in the &#8220;Home tab&#8221;.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31.png"><img loading="lazy" decoding="async" width="1024" height="132" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31-1024x132.png" alt="" class="wp-image-1535" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31-1024x132.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31-300x39.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31-768x99.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31-705x91.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-31.png 1445w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p>The word document should look like below.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30.png"><img loading="lazy" decoding="async" width="1024" height="970" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30-1024x970.png" alt="" class="wp-image-1534" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30-1024x970.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30-300x284.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30-768x727.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30-705x668.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-30.png 1454w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Now save the file as a normal Word document with .docx extension. Upload the word document into OneDrive as &#8220;Invite-Template.docx&#8221;</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10.png"><img decoding="async" width="1024" height="240" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-1024x240.png" alt="" class="wp-image-1495" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-1024x240.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-300x70.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-768x180.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10-705x165.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-10.png 1464w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Now lets go back to the Power Automate and add an action &#8220;Populate a Microsoft Word template&#8221; of &#8220;Word Online&#8221;. Choose the location of &#8220;File&#8221; where the template file was uploaded. For Logo use the &#8220;File Content&#8221; from the &#8220;Get logo file content&#8221; (Note: We are not using the &#8220;LogoUri&#8221; variable here). For &#8220;Title&#8221; &amp; &#8220;Id&#8221;, use the &#8220;Title&#8221; &amp; &#8220;ID&#8221; from the trigger &#8220;When an item is created or modified&#8221;.</p>



<figure class="wp-block-pullquote"><blockquote><p>This is a premium action so a premium license is required and is in preview as of February 2021.</p></blockquote></figure>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-33.png"><img loading="lazy" decoding="async" width="909" height="448" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-33.png" alt="" class="wp-image-1538" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-33.png 909w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-33-300x148.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-33-768x379.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-33-705x347.png 705w" sizes="auto, (max-width: 909px) 100vw, 909px" /></a></figure>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Get_logo_file_content')?['body']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/Title']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/ID']</pre></div>



<p>Now add OneDrive&#8217;s &#8220;Create File&#8221; action. Choose the &#8220;Folder Path&#8221; from OneDrive, where the filled Word document should be saved, along with the &#8220;File Name&#8221; being ID of the SharePoint item and &#8220;File Content&#8221; from the action &#8220;Populate a Microosft Word template&#8221;.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-35.png"><img loading="lazy" decoding="async" width="910" height="283" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-35.png" alt="" class="wp-image-1539" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-35.png 910w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-35-300x93.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-35-768x239.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-35-705x219.png 705w" sizes="auto, (max-width: 910px) 100vw, 910px" /></a></figure>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/ID']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Populate_a_Microsoft_Word_template')?['body']</pre></div>



<h2 class="wp-block-heading">Converting Word Content to PDF</h2>



<p>Now lets convert the Word document into PDF by creating the action &#8220;Convert Word Document to PDF&#8221; of &#8220;Word Online&#8221; pointing the &#8220;File&#8221; to the path returned by &#8220;Create Word file via Word template&#8221;.</p>



<figure class="wp-block-pullquote"><blockquote><p>This is a premium action so a premium license is required and is in preview as of February 2021.</p></blockquote></figure>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-36.png"><img loading="lazy" decoding="async" width="908" height="276" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-36.png" alt="" class="wp-image-1540" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-36.png 908w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-36-300x91.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-36-768x233.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-36-705x214.png 705w" sizes="auto, (max-width: 908px) 100vw, 908px" /></a></figure>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Create_Word_file_via_Word_template')?['body/Path']</pre></div>



<p>Now let&#8217;s use OneDrive&#8217;s &#8220;Create file&#8221; action to create the PDF file in OneDrive.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-39.png"><img loading="lazy" decoding="async" width="912" height="279" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-39.png" alt="" class="wp-image-1543" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-39.png 912w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-39-300x92.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-39-768x235.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-39-705x216.png 705w" sizes="auto, (max-width: 912px) 100vw, 912px" /></a></figure>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">triggerOutputs()?['body/ID']</pre></div>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Convert_Word_Document_to_PDF')?['body']</pre></div>



<h2 class="wp-block-heading">Deleting the Word File</h2>



<p>If required we will use OneDrive&#8217;s &#8220;Delete file&#8221; action to delete the Word file which was generated previously to avoid wasting the space.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-38.png"><img loading="lazy" decoding="async" width="913" height="172" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-38.png" alt="" class="wp-image-1542" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-38.png 913w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-38-300x57.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-38-768x145.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-38-705x133.png 705w" sizes="auto, (max-width: 913px) 100vw, 913px" /></a></figure>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">outputs('Create_Word_file_via_Word_template')?['body/Path']</pre></div>



<h2 class="wp-block-heading">Testing</h2>



<p>Now save the Power Automate and test it once to check if it&#8217;s working fine.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9.png"><img loading="lazy" decoding="async" width="506" height="463" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9.png" alt="" class="wp-image-1514" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9.png 506w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-9-300x275.png 300w" sizes="auto, (max-width: 506px) 100vw, 506px" /></a></figure></div>



<p>Create a new item in SharePoint and save it.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11.png"><img loading="lazy" decoding="async" width="1024" height="401" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-1024x401.png" alt="" class="wp-image-1515" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-1024x401.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-300x117.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-768x300.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11-705x276.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-11.png 1194w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure></div>



<p>Go to OneDrive and check if the file is generated.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12.png"><img loading="lazy" decoding="async" width="1024" height="262" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-1024x262.png" alt="" class="wp-image-1516" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-1024x262.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-300x77.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-768x197.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12-705x180.png 705w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-12.png 1391w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Open the file to check if it has been created.</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15.png"><img loading="lazy" decoding="async" width="1024" height="532" src="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-1024x532.png" alt="" class="wp-image-1519" srcset="https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-1024x532.png 1024w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-300x156.png 300w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-768x399.png 768w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-1536x798.png 1536w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-2048x1063.png 2048w, https://blog.binarybits.net/wp-content/uploads/2021/05/Generate-PDF-from-SharePoint-Online-list-item-using-Power-Automate-15-705x366.png 705w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
<p>The post <a href="https://blog.binarybits.net/generate-pdf-from-sharepoint-online-list-item-using-power-automate/">Generate PDF from SharePoint Online list item using Power Automate</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/generate-pdf-from-sharepoint-online-list-item-using-power-automate/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Item level permission in SharePoint using REST and Power Automate</title>
		<link>https://blog.binarybits.net/item-level-permission-in-sharepoint-using-rest-and-power-automate/</link>
					<comments>https://blog.binarybits.net/item-level-permission-in-sharepoint-using-rest-and-power-automate/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Tue, 09 Mar 2021 07:32:19 +0000</pubDate>
				<category><![CDATA[Power Automate]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">http://blog.binarybits.net/?p=1477</guid>

					<description><![CDATA[<p>Sometimes when an item is created we might need to set item level permission for those items. Fortunately, SharePoint&#8217;s REST API can help with this and Power Automate / Flow supports SharePoint HTTP calls. For this to work, make sure the Power Automate is created with an account having site collection administrator access. First the [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/item-level-permission-in-sharepoint-using-rest-and-power-automate/">Item level permission in SharePoint using REST and Power Automate</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Sometimes when an item is created we might need to set item level permission for those items. Fortunately, SharePoint&#8217;s REST API can help with this and Power Automate / Flow supports SharePoint HTTP calls.</p>



<figure class="wp-block-pullquote"><blockquote><p>For this to work, make sure the Power Automate is created with an account having site collection administrator access.</p></blockquote></figure>



<h2 class="wp-block-heading">First the basics of how this works</h2>



<p>Step 1 is to identify to whom the permissions should be granted to. It can be either a person or a group.</p>



<p>Step 2 is to identify what kind of permission i.e. role should be granted.</p>



<p>Step 3 is breaking the inheritance.</p>



<p>Step 4 is assigning the permission.</p>



<h2 class="wp-block-heading">Second is knowing the supporting APIs to gather the information</h2>



<h3 class="wp-block-heading">Step 1: To whom the permission should be granted?</h3>



<h4 class="wp-block-heading">Individual user</h4>



<p>To identify the individual user the following API can be used. Commonly everyone relies on e-mail ID so lets take that as an example</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/web/SiteUsers/getByEmail('email@domain.com')
Method: Get</pre></div>



<p>When you use Power Automate, make sure to extract the ID and place it in a variable.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">body('Get_User_Id')['d']['Id']</pre></div>



<h4 class="wp-block-heading">Site Group</h4>



<p>To identify the site group the following API can be used.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/web/sitegroups/getbyname('Group Name')
Method: Get</pre></div>



<p>When you use Power Automate, make sure to extract the ID and place it in a variable.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">body('Get_Group_Id')['d']['Id']</pre></div>



<h3 class="wp-block-heading">Step 2: What kind of permission?</h3>



<p>This is defined by the role definitions available in the site. The following API will help in identifying the role definitions and their ID.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/roledefinitions/getbyname('Full Control')
Method: Get</pre></div>



<p>When you use Power Automate, make sure to extract the ID and place it in a variable.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">body('Get_Role_Definition_Id')['d']['Id']</pre></div>



<h3 class="wp-block-heading">Step 3: Breaking the inheritance</h3>



<p>For this first thing is we need to identify the target for which the inheritance should be broken. In the following example it&#8217;s a list item.</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/lists/getByTitle('&lt;List Name&gt;')/items(&lt;Item ID&gt;)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)
Method: POST</pre></div>



<h4 class="wp-block-heading">Example:</h4>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/lists/getByTitle('Test List')/items(1)/breakroleinheritance(copyRoleAssignments=false,clearSubscopes=true)</pre></div>



<h3 class="wp-block-heading">Step 4: Assigning permission</h3>



<p>As said before permission can be assigned to an individual or a group. The following API will help with that</p>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/lists/getByTitle('&lt;List Name&gt;')/items(&lt;Item ID&gt;)/roleassignments/addroleassignment(principalid=&lt;User ID or Group ID&gt;,roledefid=&lt;Role ID&gt;)
Method: POST</pre></div>



<h4 class="wp-block-heading">Example:</h4>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:false,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text/javascript&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}">URL: _api/lists/getByTitle('Test List')/items(1)/roleassignments/addroleassignment(principalid=10,roledefid=1073741829)</pre></div>



<p>Following is the list of out of the box role definitions which I came across in the internet</p>



<figure class="wp-block-table is-style-regular"><table><tbody><tr><td><strong>Role Definition Name</strong></td><td><strong>Role Definition Id</strong></td></tr><tr><td>Full Control</td><td>1073741829</td></tr><tr><td>Design</td><td>1073741828</td></tr><tr><td>Edit</td><td>1073741830</td></tr><tr><td>Contribute</td><td>1073741827</td></tr><tr><td>Read</td><td>1073741826</td></tr><tr><td>View Only</td><td>1073741924</td></tr><tr><td>Limited Access</td><td>1073741825</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Useful URL</h2>



<p>You can refer the following URL which has code example to use REST api.</p>



<p><a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/set-custom-permissions-on-a-list-by-using-the-rest-interface" target="_blank" rel="noreferrer noopener">Set custom permissions on a list by using the REST interface</a></p>
<p>The post <a href="https://blog.binarybits.net/item-level-permission-in-sharepoint-using-rest-and-power-automate/">Item level permission in SharePoint using REST and Power Automate</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/item-level-permission-in-sharepoint-using-rest-and-power-automate/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SharePoint Online theme error &#8211; There was an error while attempting to get the themes</title>
		<link>https://blog.binarybits.net/sharepoint-online-theme-error-there-was-an-error-while-attempting-to-get-the-themes/</link>
					<comments>https://blog.binarybits.net/sharepoint-online-theme-error-there-was-an-error-while-attempting-to-get-the-themes/#comments</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Thu, 05 Mar 2020 07:24:47 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[Theme]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1107</guid>

					<description><![CDATA[<p>Recently when I was trying to change the theme of a SharePoint online site collection, it threw an error &#8220;There was an error while attempting to get the themes&#8221; The error looks like the one shown below (Taken from Microsoft Tech Community) To fix this error, the easiest method as of March 2020 is do [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/sharepoint-online-theme-error-there-was-an-error-while-attempting-to-get-the-themes/">SharePoint Online theme error &#8211; There was an error while attempting to get the themes</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img decoding="async" class="wp-image-1160" style="width: 32px;" src="https://blog.binarybits.net/wp-content/uploads/2020/03/microsoft-sharepoint-logo.svg" alt="Microsoft SharePoint Logo"> Recently when I was trying to change the theme of a SharePoint online site collection, it threw an error &#8220;There was an error while attempting to get the themes&#8221;</p>



<p class="has-normal-font-size">The error looks like the one shown below (Taken from <a href="https://techcommunity.microsoft.com/t5/sharepoint/sharepoint-themes-there-was-an-error-while-attempting-to-get-the/m-p/319409">Microsoft Tech Community</a>)</p>



<figure class="wp-block-image size-large"><a href="https://blog.binarybits.net/wp-content/uploads/2020/03/error_theme.png"><img loading="lazy" decoding="async" width="298" height="328" src="https://blog.binarybits.net/wp-content/uploads/2020/03/error_theme.png" alt="There was an error while attempting to get the themes" class="wp-image-1108" srcset="https://blog.binarybits.net/wp-content/uploads/2020/03/error_theme.png 298w, https://blog.binarybits.net/wp-content/uploads/2020/03/error_theme-273x300.png 273w" sizes="auto, (max-width: 298px) 100vw, 298px" /></a></figure>



<p>To fix this error, the easiest method as of March 2020 is do the following.</p>



<ol class="wp-block-list"><li>Click on &#8220;Classic change the look options&#8221; menu item shown in the screenshot above.</li><li>Choose one of the theme.</li><li>Preview it by clicking on &#8220;Try it out&#8221;.</li><li>Then click on &#8220;Yes, keep it&#8221;</li><li>Again load the home page</li><li>Try changing the theme, and the error should be gone.</li></ol>



<p>Thanks to Rob for providing the work around <a href="https://techcommunity.microsoft.com/t5/sharepoint/sharepoint-themes-there-was-an-error-while-attempting-to-get-the/m-p/319409">here</a>.</p>
<p>The post <a href="https://blog.binarybits.net/sharepoint-online-theme-error-there-was-an-error-while-attempting-to-get-the-themes/">SharePoint Online theme error &#8211; There was an error while attempting to get the themes</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/sharepoint-online-theme-error-there-was-an-error-while-attempting-to-get-the-themes/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Change SharePoint Wiki Page Title</title>
		<link>https://blog.binarybits.net/change-sharepoint-wiki-page-title/</link>
					<comments>https://blog.binarybits.net/change-sharepoint-wiki-page-title/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Tue, 14 Jan 2020 04:46:11 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[Wiki Page Title]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1078</guid>

					<description><![CDATA[<p>At the time of writing this article, Microsoft has already rolled out the modern experience to all the lists and libraries. In the old classic sites, there was a possibility to change the the title of Wiki pages and now that is almost gone, but still there is a way to change the title. Follow [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/change-sharepoint-wiki-page-title/">Change SharePoint Wiki Page Title</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img decoding="async" class="wp-image-1160" style="width: 32px;" src="https://blog.binarybits.net/wp-content/uploads/2020/03/microsoft-sharepoint-logo.svg" alt="Microsoft SharePoint Logo"> At the time of writing this article, Microsoft has already rolled out the modern experience to all the lists and libraries.</p>



<p>In the old classic sites, there was a possibility to change the the title of Wiki pages and now that is almost gone, but still there is a way to change the title.</p>



<p>Follow the steps below to change the wiki page title.</p>



<ol class="wp-block-list"><li>In the SitePages/Pages switch to &#8220;Return to classic SharePoint&#8221; at the bottom left.</li><li>Edit the views of &#8220;By Author&#8221; or &#8220;All Pages&#8221;.<ol><li>Add the column &#8220;Title&#8221;.</li><li>Save the changes to the view.</li></ol></li><li>Go back to the view.</li><li>Click on the ribbon and expand tab &#8220;Library&#8221;.</li><li>Click on the &#8220;Quick Edit&#8221;.</li><li>Make the changes to the respective page&#8217;s title column.</li><li>Exit &#8220;Quick Edit&#8221; to save the changes.</li></ol>



<p>Do please note that for now this works but not sure how long Microsoft will keep this option open.</p>
<p>The post <a href="https://blog.binarybits.net/change-sharepoint-wiki-page-title/">Change SharePoint Wiki Page Title</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/change-sharepoint-wiki-page-title/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Enabling SharePoint App catalogue at site collection level in SharePoint Online</title>
		<link>https://blog.binarybits.net/enabling-sharepoint-app-catalogue-at-site-collection-level-in-sharepoint-online/</link>
					<comments>https://blog.binarybits.net/enabling-sharepoint-app-catalogue-at-site-collection-level-in-sharepoint-online/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Fri, 20 Dec 2019 06:41:27 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[App Catalogue]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1061</guid>

					<description><![CDATA[<p>Sometimes we require to deploy SharePoint apps to a development site collection instead of tenant app catalogue. During those scenarios the following PowerShell command can be used to enable the app catalogue at site collection level. Please note that you will require SharePoint Online Management Shell for this PowerShell to work. Please refer here for [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/enabling-sharepoint-app-catalogue-at-site-collection-level-in-sharepoint-online/">Enabling SharePoint App catalogue at site collection level in SharePoint Online</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img decoding="async" class="wp-image-1160" style="width: 32px;" src="https://blog.binarybits.net/wp-content/uploads/2020/03/microsoft-sharepoint-logo.svg" alt="Microsoft SharePoint Logo"> Sometimes we require to deploy SharePoint apps to a development site collection instead of  tenant app catalogue. During those scenarios the following PowerShell command can be used to enable the app catalogue at site collection level.</p>



<p>Please note that you will require <em>SharePoint Online Management Shell</em> for this PowerShell to work. Please refer <a href="https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps">here</a> for installation.</p>



<h3 class="wp-block-heading">Enabling site collection app catalogue</h3>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application/x-powershell&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;PowerShell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;powershell&quot;}">Connect-SPOService -Url https://yourtenant-admin.sharepoint.com

# Reference of the site collection where the site collection app catalogue should reside
$site = Get-SPOSite https://yourtenant.sharepoint.com/sites/yoursitecollection
 
# Create app catalogue in the site collection
Add-SPOSiteCollectionAppCatalog -Site $site</pre></div>



<h3 class="wp-block-heading">Disabling site collection app catalogue</h3>



<div class="wp-block-codemirror-blocks-code-block code-block"><pre class="CodeMirror" data-setting="{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;powershell&quot;,&quot;mime&quot;:&quot;application/x-powershell&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;PowerShell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;powershell&quot;}">Connect-SPOService -Url https://yourtenant-admin.sharepoint.com

# Reference of the site collection where the site collection app catalogue should reside
$site = Get-SPOSite https://yourtenant.sharepoint.com/sites/yoursitecollection
 
# Remove app catalogue from the site collection
Remove-SPOSiteCollectionAppCatalog -Site $site </pre></div>
<p>The post <a href="https://blog.binarybits.net/enabling-sharepoint-app-catalogue-at-site-collection-level-in-sharepoint-online/">Enabling SharePoint App catalogue at site collection level in SharePoint Online</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/enabling-sharepoint-app-catalogue-at-site-collection-level-in-sharepoint-online/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Using React and Office UI Fabric React Components by Andrew Connell</title>
		<link>https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/</link>
					<comments>https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Thu, 09 May 2019 10:29:56 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Office UI Fabric React]]></category>
		<category><![CDATA[React]]></category>
		<category><![CDATA[SharePoint Framework]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1034</guid>

					<description><![CDATA[<p>For a long time I was trying to switch from Angular to React for building SharePoint Modern Web Part but was finding it difficult to start off. The lab posted here by Andrew Connell, helps to get started. You can also view the video below. You can also view the lab as document from the [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/">Using React and Office UI Fabric React Components by Andrew Connell</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img decoding="async" class="wp-image-1160" style="width: 32px;" src="https://blog.binarybits.net/wp-content/uploads/2020/03/microsoft-sharepoint-logo.svg" alt="Microsoft SharePoint Logo"> For a long time I was trying to switch from Angular to React for building SharePoint Modern Web Part but was finding it difficult to start off.</p>



<p>The lab posted <a href="https://github.com/SharePoint/sp-dev-training-spfx-react-fabric/blob/master/Lab.md">here</a> by Andrew Connell, helps to get started.</p>



<p>You can also view the video below.</p>



<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="SharePoint Framework Training - Using React and Office UI Fabric React Components" width="705" height="397" src="https://www.youtube.com/embed/TlSGdDZmrTM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<p>You can also view the lab as document from the below pdf file generated on 09 May 2019</p>



<div class="wp-block-file"><a href="https://blog.binarybits.net/wp-content/uploads/2019/05/SP-dev-training-spfx-react-fabric-lab.pdf" target="_blank" rel="noreferrer noopener">SP-dev-training-spfx-react-fabric-lab.pdf</a><a href="https://blog.binarybits.net/wp-content/uploads/2019/05/SP-dev-training-spfx-react-fabric-lab.pdf" class="wp-block-file__button" download>Download</a></div>
<p>The post <a href="https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/">Using React and Office UI Fabric React Components by Andrew Connell</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/using-react-and-office-ui-fabric-react-components-by-andrew-connell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Sharepoint Online&#8217;s modern experience web parts and their quivalent classic experience web parts</title>
		<link>https://blog.binarybits.net/sharepoint-onlines-modern-experience-web-parts-and-their-quivalent-classic-experience-web-parts/</link>
					<comments>https://blog.binarybits.net/sharepoint-onlines-modern-experience-web-parts-and-their-quivalent-classic-experience-web-parts/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Mon, 04 Feb 2019 09:06:06 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=1020</guid>

					<description><![CDATA[<p>SharePoint&#8217;s modern experience web parts is an easy and fast way to bring content to the viewer. But at the same time it&#8217;s not as configurable or as exhaustive as it is when compared to classic experience web parts. The following URL shows some of the modern web part equivalents of classic web parts. Please note that these are not a 1:1 matching, [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/sharepoint-onlines-modern-experience-web-parts-and-their-quivalent-classic-experience-web-parts/">Sharepoint Online&#8217;s modern experience web parts and their quivalent classic experience web parts</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p> SharePoint&#8217;s modern experience web parts is an easy and fast way to bring content to the viewer. But at the same time it&#8217;s not as configurable or as exhaustive as it is when compared to classic experience web parts. </p>



<p> The following URL shows some of the modern web part equivalents of classic web parts. Please note that these are not a 1:1 matching, instead they have similar functionalities. </p>



<p><a href="https://support.office.com/en-us/article/classic-and-modern-web-part-experiences-3fdae6c3-8fc1-49ab-8708-8c104b882e6﻿">Click here to visit &#8220;Classic and modern web part experiences&#8221; by Microsoft</a></p>
<p>The post <a href="https://blog.binarybits.net/sharepoint-onlines-modern-experience-web-parts-and-their-quivalent-classic-experience-web-parts/">Sharepoint Online&#8217;s modern experience web parts and their quivalent classic experience web parts</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/sharepoint-onlines-modern-experience-web-parts-and-their-quivalent-classic-experience-web-parts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SharePoint Online Data Restoration Timeline</title>
		<link>https://blog.binarybits.net/sharepoint-online-data-restoration-timeline/</link>
					<comments>https://blog.binarybits.net/sharepoint-online-data-restoration-timeline/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Fri, 11 Jan 2019 07:23:13 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Recycle Bin]]></category>
		<category><![CDATA[Restore]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=992</guid>

					<description><![CDATA[<p>A timeline depicting what happens when a data is deleted and how it can be restored?</p>
<p>The post <a href="https://blog.binarybits.net/sharepoint-online-data-restoration-timeline/">SharePoint Online Data Restoration Timeline</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>SharePoint online has a data backup and restoration policy which for some users might be confusing. The following article will provide you a clarity to an extent.<br><br>In short a data can be restored within 108 days until unless it&#8217;s prematurely deleted by admin, in which case the data can be restore 14 days from premature deletion by admin.</p>



<p><strong>User deleting a data:</strong><br>When a user deletes a list item, or document library item or any site object, that deleted data is moved to a site&#8217;s recycle bin and stays there for 93 days or till user deletes it or site collection recycle bin quota exceeds.  </p>



<p><strong>User deleting a site&nbsp;recycle&nbsp;bin&nbsp;item:</strong><br>When a user deletes an item from site recycle bin, that item is moved to site collections recycle bin. Only the site collection administrator will have access to this recycle bin. Here too the item  stays there for 93 days from the date the user deleted it originally or till admin deletes it or site collection recycle bin quota exceeds. </p>



<p><strong>Note:</strong><br>Make a note that an item deleted by user will stay for 93 days regardless of it being there in site recycle bin (can be restored by user) or site collection recycle bin (can be restored by admin).</p>



<p><strong>Admin deleting an item from site collection recycle bin/auto deletion:</strong><br>Once an item is deleted from site collection recycle bin, it still can be restored if it&#8217;s available in the data backup by Microsoft  <br>taken twice daily. Again this backup is available only for 14 days and SharePoint admin has to raise a support ticket.</p>



<p><strong>Note:</strong><br>When Microsoft restores the data, they will restore it as a whole site collection and not as individual item.</p>



<p><strong>Pictorial Representation:</strong></p>



<figure class="wp-block-image"><a href="https://blog.binarybits.net/wp-content/uploads/2019/01/SharePoint-Online-Data-Restoration-Timeline.png"><img loading="lazy" decoding="async" width="1024" height="719" src="https://blog.binarybits.net/wp-content/uploads/2019/01/SharePoint-Online-Data-Restoration-Timeline-1024x719.png" alt="SharePoint Online Data Restoration Timeline" class="wp-image-997" srcset="https://blog.binarybits.net/wp-content/uploads/2019/01/SharePoint-Online-Data-Restoration-Timeline-1024x719.png 1024w, https://blog.binarybits.net/wp-content/uploads/2019/01/SharePoint-Online-Data-Restoration-Timeline-300x211.png 300w, https://blog.binarybits.net/wp-content/uploads/2019/01/SharePoint-Online-Data-Restoration-Timeline-768x540.png 768w, https://blog.binarybits.net/wp-content/uploads/2019/01/SharePoint-Online-Data-Restoration-Timeline.png 1150w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>SharePoint Online Data Restoration Timeline<br><br></figcaption></figure>



<p><strong>Source:</strong><a aria-label=" (opens in a new tab)" rel="noreferrer noopener" href="https://kannan.page.link/XQFV" target="_blank">https://kannan.page.link/XQFV</a></p>



<p><br></p>
<p>The post <a href="https://blog.binarybits.net/sharepoint-online-data-restoration-timeline/">SharePoint Online Data Restoration Timeline</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/sharepoint-online-data-restoration-timeline/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Enable tree view in current navigation within SharePoint</title>
		<link>https://blog.binarybits.net/enable-tree-view-in-current-navigation-within-sharepoint/</link>
					<comments>https://blog.binarybits.net/enable-tree-view-in-current-navigation-within-sharepoint/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Wed, 23 May 2018 03:57:59 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[Tree View]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=985</guid>

					<description><![CDATA[<p>Sometime we need to enable tree view in current navigation to help navigate within document libraries. Traditional Way: Site Settings -&#62; Look and Feel: Navigation Elements -&#62; Check &#8216;Enable Tree View&#8217; Programmatic way using PnP Powershell: try { $web = Get-PnPWeb -Includes TreeViewEnabled Write-Host "Setting options to enable tree view..." $web.TreeViewEnabled = $true $web.Update() Invoke-PnPQuery Write-Host [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/enable-tree-view-in-current-navigation-within-sharepoint/">Enable tree view in current navigation within SharePoint</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometime we need to enable tree view in current navigation to help navigate within document libraries.</p>
<p><strong>Traditional Way:</strong></p>
<blockquote><p>Site Settings -&gt; Look and Feel: Navigation Elements -&gt; Check &#8216;Enable Tree View&#8217;</p></blockquote>
<p><b>Programmatic</b><strong> way using PnP Powershell:</strong></p>
<pre class="lang:ps decode:true" title="Sisable 'Allow items from this site to be downloaded to offline clients' in SharePoint">try {
    $web = Get-PnPWeb -Includes TreeViewEnabled
    Write-Host "Setting options to enable tree view..."
    $web.TreeViewEnabled = $true        
    $web.Update()
    Invoke-PnPQuery
    Write-Host "Completed."
}
catch {
    $ErrorMessage = $_.Exception.Message
    Write-Host "Error enabling tree view. $ErrorMessage"
}
</pre>
<p>The post <a href="https://blog.binarybits.net/enable-tree-view-in-current-navigation-within-sharepoint/">Enable tree view in current navigation within SharePoint</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/enable-tree-view-in-current-navigation-within-sharepoint/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Disable &#8216;Allow items from this site to be downloaded to offline clients&#8217; in SharePoint</title>
		<link>https://blog.binarybits.net/disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint/</link>
					<comments>https://blog.binarybits.net/disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint/#respond</comments>
		
		<dc:creator><![CDATA[Kannan]]></dc:creator>
		<pubDate>Wed, 23 May 2018 03:52:17 +0000</pubDate>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<guid isPermaLink="false">https://blog.binarybits.net/?p=979</guid>

					<description><![CDATA[<p>Sometime we need to disable the &#8220;Sync&#8221; button in SharePoint document libraries and that can be done by the following methods. Traditional Way: Site Settings -&#62; Search: Search and offline availability -&#62; Set &#8216;Allow items from this site to be downloaded to offline clients?&#8217; to &#8220;No&#8221; Programmatic way using PnP Powershell: try { $web = Get-PnPWeb [&#8230;]</p>
<p>The post <a href="https://blog.binarybits.net/disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint/">Disable &#8216;Allow items from this site to be downloaded to offline clients&#8217; in SharePoint</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometime we need to disable the &#8220;Sync&#8221; button in SharePoint document libraries and that can be done by the following methods.</p>
<p><strong>Traditional Way:</strong></p>
<blockquote><p>Site Settings -&gt; Search: Search and offline availability -&gt; Set &#8216;Allow items from this site to be downloaded to offline clients?&#8217; to &#8220;No&#8221;</p></blockquote>
<p><b>Programmatic</b><strong> way using PnP Powershell:</strong></p>
<pre class="lang:ps decode:true" title="Sisable 'Allow items from this site to be downloaded to offline clients' in SharePoint">try {
    $web = Get-PnPWeb -Includes ExcludeFromOfflineClient
    Write-Host "Setting options to disable 'Allow items from this site to be downloaded to offline clients'..."
    $web.ExcludeFromOfflineClient = $true        
    $web.Update()
    Invoke-PnPQuery
    Write-Host "Completed."
}
catch {
    $ErrorMessage = $_.Exception.Message
    Write-Host "Error disabling offline clients. $ErrorMessage"
}</pre>
<p>The post <a href="https://blog.binarybits.net/disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint/">Disable &#8216;Allow items from this site to be downloaded to offline clients&#8217; in SharePoint</a> appeared first on <a href="https://blog.binarybits.net">Binary Bits</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.binarybits.net/disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: blog.binarybits.net @ 2026-05-14 12:13:13 by W3 Total Cache
-->