Power Automate solution: OneNote action errors involving invalid or inaccessible Notebook Keys and sections

When using OneNote (Business) in a Power Automate flow, you may be attempting actions such as Create section in a notebook, Get sections in notebook, or Create page in a section but getting errors when trying to select the relevant notebook and section.

And depending on what you’re using as the Notebook Key and/or Notebook section value(s) you may get any of the following specific errors:

  • Error; the requested notebook or section may have been deleted or is otherwise inaccessible.
  • Invalid notebook key
  • The specified resource ID does not exist.
  • The section id is invalid. If a custom value was entered, please try selecting from the supplied values.

I’ll show you how you may be able to solve this issue in this blog post by using a custom value for Notebook Key. To insert a custom value for Notebook Key, use the dropdown arrow in the Notebook Key field and select Enter custom value.

Enter custom value option for Notebook Key (click to enlarge)

Now you can type text freely. You’ll need to format your notebook key one of two ways, depending on whether it’s a personal (OneDrive for Business) notebook or a shared (SharePoint/Teams) notebook. Both solutions are below.

Solution #1: OneNote Notebook key API format for your own notebooks (stored in OneDrive for Business)

For OneDrive notebooks, such as the default one you get like Nate @ Contoso, format your notebook key as seen below, replacing highlighted parts with your own notebook name, organization URL, and email address (with underscores instead of the usual symbols).

Nate @ Contoso|$|https://contoso-my.sharepoint.com/personal/nchamberlain_contoso_com/Documents/Nate @ Contoso

Still not working? Your organization may have a .com added (even if you don’t see it in your notebook name). Try adding .com to your notebook name in both locations (beginning and end):

Nate @ Contoso.com|$|https://contoso-my.sharepoint.com/personal/nchamberlain_contoso_com/Documents/Nate @ Contoso.com

Solution #2: OneNote Notebook key API format for shared notebooks (stored in SharePoint and used there or in Microsoft Teams)

For shared notebooks, such as the default one you get with every Microsoft Teams team or SharePoint team site, format the notebook key as follows. Be sure to replace bold components of the key with your own notebook name, organization URL, and notebook location:

Notebook Name|$|https://COMPANY.sharepoint.com/sites/SITENAME/NOTEBOOK LOCATION/NOTEBOOK NAME

For example, all default notebooks are stored in a SharePoint site’s Site Assets folder so a complete Notebook key for a notebook like that may resemble the following (yes, you can leave the spaces in notebook names):

Mark 8 Project Team Notebook|$|https://contoso.sharepoint.com/sites/Mark8ProjectTeam/SiteAssets/Mark 8 Project Team Notebook

Or if it’s not the default notebook, and it was created in a document library a couple folders deep, it might resemble the following. Just replace Shared Documents with the name of the library, and replace the folder structure as appropriate:

Policies and Procedures|$|https://contoso.sharepoint.com/sites/Compliance/Shared Documents/Folder 1/Folder 2/Policies and Procedures 

As long as you enter the key correctly using either solution, your flow will connect to the notebook properly and, when relevant, the Notebook section dropdown will refresh and allow you to simply select the section you want rather than entering an API URL.

Notebook section dropdown functioning properly with a correct Notebook Key (click to enlarge)

Additional troubleshooting when sections are still not appearing

If you are certain you followed the instructions above correctly, made no typos, and you used the correct type of key format based on the notebook’s location (OneDrive or SharePoint), and you’re still seeing “Could not retrieve values…” for Notebook section, it might be a simple fix.

Just cut (Ctrl+X) and paste (Ctrl+V) the Notebook Key you entered into the field again and it may refresh and fix the second dropdown.

References

OneNote (Business) – Connectors | Microsoft Docs

How to remove the Recycle Bin from a SharePoint team site’s navigation menu

I recently had someone ask me how you could remove the Recycle Bin from a modern SharePoint team site’s left-hand navigation menu. Even if you click Edit on the navigation menu, Recycle Bin disappears as an option you can change. So how can it be done?

While it’s not the most straightforward process, it is possible to remove Recycle bin from a site’s navigation menu but it will require activating the SharePoint Server Publishing Infrastructure site collection feature.

Before you proceed, please read about this feature and its impacts in its entirety and check out Gregory Zelfond’s excellent write-up on the advantages and disadvantages here.

If you’d still like to proceed, and you’re the site’s owner, follow these steps to remove Recycle bin from your menu (video at bottom).

  1. Go to the site for which you wish to remove Recycle bin’s link
  2. Go to Site contents > Site settings
  3. Select Site collection features from the Site Collection Administration section
  4. Activate the SharePoint Server Publishing Infrastructure feature (this may take a minute or two)

Your Recycle bin has now been removed from your navigation menu, but you can still access it via Site contents > Recycle bin.

Solution: You can’t share this folder because there are too many items in the folder

If you’ve run into either of the following error messages, you may be attempting to share too large a folder, or share within a high-traffic list or library that has too many files or items already shared individually:

  • “You can’t share this folder because there are too many items in the folder.”
  • “You canโ€™t share this item because too many items have already been shared in this library.”

If you want to share a folder, item, or file, there’s a limit of 50,000 uniquely shared items per list or library. So between you and your colleagues, if you’ve shared 50,000 items, files, and/or folders individually (one-off shares using the share button), you’ll need to do some sharing cleanup (remove links and access no longer needed) and consider creating additional lists/libraries or establishing improved best practices for more efficient sharing.

Additionally, the list, library, or folder for which you’re trying to initiate a new share can only have up to 100,000 items total (regardless of share count) before breaking and re-inheriting permissions is allowed. So, for example, if you want to break inheritance on a folder that has 150,000 files already, you’ll need to temporarily reduce the file count to 100,000 or fewer so you can break inheritance, then move the additional files back into it.

See these references for additional information:

SharePoint Online file and item limits: Size, quantity, nested folders, and more

blue parrot

I am often asked in trainings and speaking engagements about limits when storing files and items in SharePoint. Some organizations wanting to switch from shared drives to SharePoint are concerned about how many nested folders they have, while others hear mixed advice as to whether folders should be used at all. In this post, I’ll share some good-to-know facts and frequently asked questions regarding limits in SharePoint Online lists and libraries.

What is my entire site’s maximum allowed storage?

That’s up to your administrators. By default, your site can use as much space as your organization has. Learn more here.

Click to enlarge

How many items can I have in a list?

30 million items

What is the file size limit for a file attached to a list item?

250 MB

What is the file size limit for a file stored in a library?

250 GB (this includes files uploaded via Teams, SharePoint libraries, OneDrive, and Yammer)

How many documents can I have in a library?

30 million files and folders

How many levels deep can I go with nested folders?

There’s no known limit to the number of folders (though you may read otherwise if you’re looking at older, outdated guidance on the subject since this has changed over time). It used to be you could only go so far before your URL became too long to function correctly. But since SharePoint uses relative IDs now instead of absolute URLs, you can nest as far as you need to. Best practice would be to minimize your levels of nesting, of course, and to use metadata/columns instead of folders for fluid organization.

I recently wanted to test this answer (Dec 2021) and easily nested 30 levels of folders without a problem. The content in those folders is also still searchable (which you may also hear otherwise in outdated material and guidance).

Should I use folders at all?

There’s no one-size-fits-all approach to document storage and organization. Best practice, though, leans towards highest flexibility which we get from using metadata/column values in library views instead of folder structures. Folders limit us to a single organization structure known best to its creator, whereas with library views, you can have many different views of the same information that suit different users better (i.e. a manager vs employee view, or views filtered to specific time periods or geolocations).

Are there blocked file types?

Recent improvements to SharePoint Online have made it so that there are no known file type limitations in SharePoint. If you’re using SharePoint 2016 or earlier, though, check out this resource for more information.

Are there any character restrictions for file and folder names?

Your file and folder names cannot contain leading or trailing spaces, or any of the following characters: ” * : < > ? / \ |

Why isn’t my large file showing up in SharePoint search results?

SharePoint only accesses the first 150 MB of a document’s metadata and contents for the search crawl service that presents results to you in search. If you have a large file, your search query may be looking for content beyond the initial 150 MB.

SharePoint also stops parsing an item’s contents after 2 million characters. So even if your file is less than 150 MB, it may have too many characters to be crawled. It can still be stored and accessed in SharePoint, just not searchable beyond the first 2 million characters.

How many files with unique permissions can I share?

You can share up to 50,000 files with unique permissions per folder. Once (if) you reach 50,000 in a single folder shared with unique permissions, create a second folder parallel or higher in structure/placement to the original folder (not nested within it) or reconsider your sharing approach to see if there’s a more efficient way to do it with standardized permissions.

What other questions do you have regarding SharePoint limits?

References

Find even more information regarding limits in SharePoint Online at the following links where I verified much of this post’s material:

Solution: Power BI report pages not showing up as options for SharePoint web part

If you’ve just copied your multi-page Power BI report’s URL and pasted into the properties of a Power BI web part on a SharePoint page, you may have noticed your pages aren’t appearing as options in the Page name dropdown.

Click to enlage

This is because the URL you copied from Power BI likely contained a specific page in the URL itself, ending in something like …/ReportSection1 (which is referring to a specific page already).

To fix this and have your pages show up as options in the dropdown, simply remove the ReportSection1 (or 2, 3, etc.) from the end of the URL in the Power BI report link box and try again.

To speed things along, I usually cut (Ctrl+X) the corrected URL, click outside the box to “reset” the web part, then paste (Ctrl+V) the corrected URL and wait for my page names to appear. This is demonstrated below.

Click to enlarge

Here’s a related video demonstrating how to embed a Power BI report on a SharePoint page including fixing the multi-page issue mentioned above.

Solution: Power Automate “No database found” error for business process flows, process advisor, and AI Builder

If you’re trying to build business process flows, use Process Advisor, or use AI Builder in Power Automate, you’re going to need a database established in the intended environment first. If you don’t have a database in the environment yet, you’ll get an error as seen below:

  • Business process flow requires a Microsoft Dataverse database. Try a different environment or create a new one to start using business process flow.
  • You need a database to use process advisor. Create a database, or switch to an environment that has one.
  • AI Builder requires a Dataverse database. Create your database to start using AI models.

In the following sections, I’ll detail how to:

  • Switch to a different environment
  • Add a database to your current (or any) environment
  • Create a new environment with a database

Switch to a different environment

Your organization could already have multiple environments. Always check with your admins before making any uncertain decisions because environments could be used for specific data types, processes, geography compliance restrictions, etc. You may or may not have access to all of your organization’s environments depending on your specific organization’s governance and configuration.

Let’s assume you do have multiple environments and you’ve discussed with your admin or governance team which environments are appropriate for your specific need or project. To switch to a different environment that might have a usable database, click on the name of your current environment in Power Automate in the upper right, then choose the other environment from the side panel.

Click to enlarge

Add a database to your environment

You may choose to just stay in your current environment and add a database to it. If that’s the case, go ahead and click on Create a database and follow the right side panel’s wizard to complete the process.

You can also add databases via the Power Platform admin center if you can access it.

Create a new environment with a database

Let’s assume your organization hasn’t yet created any additional environments you could use other than the default one that came with your tenant (which obviously doesn’t have a database or you wouldn’t be here ๐Ÿ˜„). If you don’t want to create the database in the default environment, you may wish to create a new environment with a new database.

Check out this other post for help in creating a new environment that includes a Dataverse database.

Solution: This environment can’t be created because your org (tenant) needs at least 1 GB of database capacity

colorful human shaped wooden blocks in a bowl

Did you run out of capacity in your Dataverse environments from Power Automate and Power Apps usage? You have several options, and I’ll cover four in this post:

  • On a trial? Change the environment type
  • Purchase a capacity add-on
  • Free up space
  • Delete unused environments

Not what you’re looking for? Check out this detailed information on Dataverse storage capacity.

On a per user plan trial?

Change the environment type from Production to Trial. This will allow you to proceed with provisioning the environment for your trial purposes. You can later convert this to Production, but only if you have more database capacity when you’re ready to do so.

Click to enlarge – change the environment type from Production to Trial when creating a new environment as a user.

Purchase a capacity add-on

Not on a trial? Just out of space? Maybe it’s time to purchase a capacity add-on. View full documentation for more information on this, but here are the basic steps to purchase a capacity add-on:

As a global admin, go to the Microsoft 365 admin center (https://admin.microsoft.com). Then choose Billing > Purchase services from the left nav.

In the search bar, search for capacity and choose the type of capacity you’d like to add for your organization (i.e. Power Apps portals page views, AI Builder, etc.).

Click to enlarge

Choose Details for the capacity type you’re seeking to expand and complete your purchase.

Click to enlarge

You should also be sure to check out these two resources once you’ve completed your purchase:

Free up space

Just trying to clean up a bit? Start your evaluation by going to the Power Platform admin center’s Capacity page to see what’s using up the most space. Are there things you could clean up? Notice any unusual usage?

Click to enlarge

Depending on what you find in the Capacity page, you may find yourself wanting to look more closely at environments. To do this, select the Environments node from the left-hand nav.

From Environments, you can select an environment and choose to view its resources which will give you a good idea of what might be using more than anticipated. Perhaps a flow or app just needs adjusted. You could, for example, open a listed environment and choose Resources > Flows, examine the flows using the environment, see their owners, and even disable the flows until further action can be taken to address the underlying issue.

Delete an environment

See any environments that could be deleted? Just keep in mind a deleted environment takes its resources and backups too – so consider any flows, apps, etc. that might need updated to use a different environment first.

If you do determine there are unused and unneeded environments in your organization, you can delete them from the Power Platform admin center.

  1. Log in to the Power Platform admin center
  2. Click on Environments on the left nav if not already there
  3. Select the environment that you wish to delete, and choose Delete (can’t delete your default environment, though)
Click to enlarge

Environment owners have 7 days from deletion to recover it if they wish.

Solution: Creating an environment requires a Power Apps per user plan or may be done by an admin in Power Platform admin center

time lapse photo of stars on night

If you’re attempting to use Solutions, AI Builder, certain Power Apps templates, etc. you may run into a situation where you’re working in an environment without a Dataverse (formerly known as Common Data Service) database. This will prompt you to create a new environment or database as a power user (if allowed).

You can add a database to your current environment, or create a new environment with a database. In this post, I’ll cover the steps to create a new environment.

To proceed with creating an environment, you’ll need a Power Apps per user plan or should be an admin. I’ll cover both methods below in the following sections. You can also see this detailed documentation on who is able to create new environments.

Create a new environment with a Power Apps per user plan

Once you’ve been licensed with a Power Apps per user plan, you’ll be able to create a solution and use existing or create new environments unless your admins have limited who can create new environments.

If you’re allowed, you can simply begin building your flow or app as you normally would, but now that you’re licensed appropriately, you’ll be able to choose to create a new environment in-context as you go. For example, let’s say there are no environments with databases you can use for a new Assets Checkout app you want to build from a template in Power Apps. Simply begin building the app from template, and choose to Create new environment when prompted.

Click to enlarge – prompt received when creating the model-driven app template named Assets checkout from Power Apps

Then in the panel that appears to the right, give the environment a name, choose a data region, and environment type. Then choose Create environment.

Choose whether you want to create a database with this new environment or create it without one. In this scenario, Power Apps is telling us we need a database so we’re going to choose to create our environment WITH a database. Click Create database.

Click to enlarge – prompt to create a database with our new environment.

Verify your currency and language. And if you’re creating a sample app (as we are in this scenario) you’ll also decide whether to bring in the sample data with that template. When satisfied, click Create my database.

Now as you’re building solutions in the Power Platform, you can switch between environments by selecting the name of the active environment and choosing the environment in which you wish to build (or utilize data from).

Click to enlarge

Now let’s create an environment from the Power Platform admin center as an admin.

Create a new environment as an admin in the Power Platform admin center

This is arguably the better method to use at an organization level to make sure your environments have a consistent naming convention, no efforts are duplicated, and boundaries are clear from one environment to another. With each environment potentially belonging to a different geography depending on how it was set up, this could be a significant compliance concern for some sectors. If you need to restrict environment creation to admins only, check out this other post. Otherwise, let’s proceed with creating a new environment for your users from the Power Platform admin center.

First, log in to the Power Platform admin center and choose Environments on the left nav if you’re not already there. Then, click New.

Click to enlarge

Name and describe your new environment, and choose the region in which its data needs to be stored. You’ll also choose type (Trial, Sandbox, Production, etc.). If this environment is going to be used to store and use data, you’ll want to also enable database creation (creates a Dataverse database). Click Next when ready.

Click to enlarge

Then choose the language, currency, and additional options (including restricting usage to a specific security group). Click Save when ready.

Click to enlarge

You (and/or your organization’s users whom are allowed to use the environment) will now be able to connect to the environment and any of the tables within its Dataverse database. This Dataverse connection can be used in Dynamics 365 apps, Power Apps portals and apps, and Power Automate flows.

Click to enlarge

How to export OneNote to PDF while preserving clickable hyperlinks

person holding apple magic mouse

It’s not often I need to “print” OneNote. However, today I had a section I wanted to convert to a PDF document and printing is the way to go in OneNote for Windows 10 (the version that comes pre-installed on Windows 10 machines). I found, however, that the file created through this method didn’t maintain its links (links weren’t clickable in PDF).

After trying Adobe, SnagIt, and Microsoft PDF print abilities to no avail (using both OneNote versions – Windows 10 and desktop/2016), I found success using OneNote (desktop) > File > Export > PDF. Detailed instructions are at the bottom of this post.

Learn more about the difference between the two OneNote versions here.

Thankfully, OneNote (desktop aka 2016) allows us to “Export” notebooks, sections, or pages to PDF. We can print to PDF as well, but using “Export” specifically is the key here to maintain the clickable links. OneNote for Windows 10 doesn’t currently have a similar export ability.

If you don’t have OneNote (aka 2016) already installed, you can still download it here. Once you have it, proceed with the following steps to export your OneNote notebook, section, or page to PDF with clickable hyperlinks:

1. To open a new notebook, select File > Open. You may need to switch account if not seeing your cloud notebooks right away.

Click to enlarge

2. Once your notebook is opened and you’ve opened the specific content you wish to print, click File (upper left).

3. Choose Export > Content Scope (page/section/notebook) > PDF > Export as shown in the following screenshot.

Click to enlarge

4. Choose a location and filename, then click Save.

Click to enlarge

Now check the resulting PDF and you’ll find your OneNote notebook content with clickable hyperlinks in tact.

Bonus tip: One small thing to note is that OneNote for Windows 10 has a nice feature where you can print a section group. OneNote (desktop) does not – it’s only exportable by page, section, or the entire Notebook. So if you don’t need clickable links in the resulting PDF, you may wish to choose OneNote for Windows 10 for your “Print to PDF” needs to simplify printing several sections at once from the same section group.

Solution: SharePoint Asset Library app type missing when adding new app to site

If you’re wanting to add an Asset Library to your SharePoint site but not finding it available as an option, chances are the Video and Rich Media feature for that site collection isn’t activated. This feature enables the asset library which is basically a modified document library but with metadata specific to rich media that can be auto-extracted such as width and height of images, duration of video clips, etc. Asset libraries are good for storing your audio, video, and image content types.

To enable it (as a site collection admin) go to Settings > Site Settings and choose Site collection features from under the Site Collection Administration heading.

Then scroll down and look for the Video and Rich Media feature. Click Activate.

As the description says, this will “[provide] libraries, content types, and web parts for storing, managing, and viewing rich media assets, like images, sound clips, and videos.” Once activated, you’ll now be able to add the asset library to your site(s) in that collection.