Power Automate for desktop provides the ability to automate databases through the database actions. In this article I will be exploring the Database actions functionality by connecting to a local SQL database.
First, we will start by setting up a local SQL Server Database.
Setting up a local SQL Server Database on Windows
For the purposes of this article, we will download and install the free Developer edition. SQL Server 2019 Developer is a full-featured free edition, licensed for use as a development and test database in a non-production environment. You can easily upgrade to a paid version from the Developer edition for production use.
To connect to the SQL Server using the Microsoft SQL Server Management Studio:
Launch the Microsoft SQL Server Management Studio.
Enter the information for the Server name (I used localhost), Authentication (SQL Server Authentication),user name and password, then click in the Connect button to connect to the SQL Server.
Create a SQL connection in Power Automate Desktop
To connect to a database, use the Open SQL Connection action. This action only requires one input: the connection string. The Connection String field specifies all information that is necessary to connect to a database, such as the driver, the database, server names, and the username and password.
SQL actions require a database connection. When the action connects to a database, it stores the connection into a SQL connection variable. To connect to a database, enter the string manually or as a variable.