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

Auto-approval of Microsoft Teams Shifts requests using Power Automate

Today I happily stumbled across a collection of Power Automate templates for auto-approval of different types of Microsoft Teams Shifts requests, such as time off requests, open shift requests, and swap requests.

Not familiar with Shifts? Check out my write-up.

The ability to auto-approve removes the current reliance on a Team owner to approve requests. In less formal Teams, this would be an excellent improvement to speed up the process and give autonomy to your team members.

While most of the templates’ triggers are set to use “Recurrence” (regularly reviewing requests and approving on the hour), you can also create your own flow using Shifts itself as a trigger instead.

Note: In high-activity Teams, using Recurrence as the trigger might cut down the number of runs/flows you use if that’s a consideration for you. Using Shifts as the trigger as seen below will run every time a request is made, but provides a faster response to your users.

Click to enlarge.

The templates for Power Automate auto-approval of Shifts requests range from simple flows to more complex flows. Check them out below:

  1. Auto Approve Offer Shift Requests
  2. Auto Approve Open Shift Requests
  3. Auto Approve Swap Shifts Requests and Send Email Notification
  4. Auto Convert Shift to Open Shift
  5. Share My Shifts as iCalendar Feed
Auto Approve Offer Shift Request
Image taken from Auto Approve Swap Shifts Requests and Send Email Notification template example. Click to enlarge.