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.

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.

Solution: SharePoint Designer email action’s To: line has a valid email address, but is removed and doesn’t send when triggered

Photo by Snapwire from Pexels

If you’ve created a workflow in SharePoint Designer and an email action appears to be configured correctly, but emails aren’t being sent to some individuals in the To: line, you may need to turn the email being used into a workflow variable and use that instead of direct addition to the To: line of the email step.

This often happens for group email inboxes or external recipients that aren’t just a “normal user.” If there is a mix of recipients, some may receive the message but the troublesome addresses don’t even appear in the To: line, as if they’re removed before sending.

Note: If you’re sending to external recipients specifically and this post doesn’t solve your problem, check out my other post for additional help: Sending emails via SharePoint Designer workflow to external recipients using Gmail, Yahoo, Hotmail, etc. addresses

To “variablize” an email (this is using a SP 2010 platform workflow type):

1. Set a new workflow variable of type string to the email address(es) that aren’t receiving emails as expected.

Click to enlarge
Click to enlarge
Click to enlarge

2. Now in your email settings, use the “Workflow Lookup for a User” option and select your new variable from “Workflow Variables and Parameters” data source.

Click to enlarge
Click to enlarge
Click to enlarge

3. Publish the changes to your workflow and test.

Solution: SharePoint site owner with full control unable to approve access requests; site is missing a default members group

In this post I’ll cover two symptoms commonly seen when subsites evolve from inheriting permissions (using existing groups) to being given unique permissions (having their own groups at the site’s level).

Symptoms

  • A site owner with full control gets “Sorry, this site hasn’t been shared with you” when trying to approve access requests.
  • When reviewing Access Request Settings, a user or owner sees the message “Members cannot share this site because this site is missing a default members group.”

Cause

Chances are the site was never set up with default, unique permissions groups. Perhaps the creator of the site chose to inherit permissions from the parent (using existing groups from a hierarchical level higher than the new site), then later decided to manually build out groups that resemble the traditional visitors, members, and owners groups at the new site’s level. Or perhaps the default groups were deleted. Either way, the following solution should set it straight:

Solution

We need to either officially designate or build new default groups for the site, using the same dialog you see when creating a new site. Since we can’t “reconfigure” the site with a wizard, we need to manipulate the site’s URL a bit to get to the configuration screen we’re looking for.

Add “_layouts/15/permsetup.aspx” to the end of the site URL. For example, it may resemble sharepoint.contoso.com/sites/ABC/EA/_layouts/15/permsetup.aspx. This takes you to the permissions setup page.

IF YOU HAVE GROUPS YOU WANT TO SET AS THE DEFAULTS

Perhaps after site creation, you created groups intended to be used like the visitors, members, and owners groups. Go to your site’s _layouts/15/permsetup.aspx page and simply:

Leave “Use an existing group” selected, and change the dropdown for each to the groups that were created and intended to be the new defaults. Click OK when finished. This will make them “official.”

IF YOU DON’T HAVE GROUPS YOU WANT TO SET AS DEFAULT

Change “Use an existing group” to “Create a new group” for at least the Members and Owners options. Here you can add the appropriate persons to each group, or add them at a later time via Site Settings > Site Permissions. Be sure to add your owners (approvers/permissions managers) to the new owner group.