Skip to content

Commit bd05bf9

Browse files
authored
Merge pull request #223104 from mksuni/mysql-power-automate
Mysql power automate tutorial
2 parents 3954ceb + 7cd3ee7 commit bd05bf9

File tree

7 files changed

+94
-2
lines changed

7 files changed

+94
-2
lines changed

articles/mysql/TOC.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,14 @@
136136
href: flexible-server/concepts-customer-managed-key.md
137137
- name: Integrations
138138
items:
139+
- name: Power Automate
140+
href: flexible-server/tutorial-power-automate-with-mysql.md
141+
- name: Power BI
142+
href: flexible-server/connect-with-powerbi-desktop.md
139143
- name: Azure Redis
140144
href: flexible-server/tutorial-add-redis-to-mysql.md
141145
- name: Azure Logic Apps
142146
href: flexible-server/tutorial-logic-apps-with-mysql.md
143-
- name: Power BI
144-
href: flexible-server/connect-with-powerbi-desktop.md
145147
- name: Azure advisor
146148
href: ../mysql/single-server/concepts-azure-advisor-recommendations.md
147149
- name: Azure Data factory
28.1 KB
Loading
58.6 KB
Loading
68.8 KB
Loading
20.4 KB
Loading
27.9 KB
Loading
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Create a Power Automate flow with Azure Database for MySQL Flexible Server
3+
description: Create a Power Automate flow with Azure Database for MySQL Flexible Server
4+
ms.service: mysql
5+
ms.subservice: flexible-server
6+
ms.topic: quickstart
7+
author: mksuni
8+
ms.author: sumuth
9+
ms.date: 1/15/2023
10+
---
11+
12+
# Tutorial: Create a Power Automate flow app with Azure Database for MySQL Flexible Server
13+
14+
Power Automate is a service that helps you create automated workflows between your favorite apps and services to synchronize files, get notifications, collect data, and more. Here are a few examples of what you can do with Power Automate.
15+
16+
- Automate business processes
17+
- Move business data between systems on a schedule
18+
- Connect to more than 500 data sources or any publicly available API
19+
- Perform CRUD (create, read, update, delete) operations on data
20+
21+
In this quickstart shows how to create an automated workflow usingPower automate flow with [Azure database for MySQL connector](/connectors/azuremysql/).
22+
23+
## Prerequisites
24+
25+
* An account on [flow.microsoft.com](https://flow.microsoft.com).
26+
27+
* An Azure account and subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free).
28+
29+
- Create an Azure Database for MySQL Flexible server using [Azure portal](./quickstart-create-server-portal.md) <br/> or [Azure CLI](./quickstart-create-server-cli.md) if you don't have one.
30+
- Populate the database server with this [sample data](https://raw.githubusercontent.com/Azure-Samples/mysql-database-samples/main/mysqltutorial.org/mysql-classicmodesl.sql).
31+
32+
[Having issues? Let us know](https://github.com/MicrosoftDocs/azure-docs/issues)
33+
34+
## Overview of cloud flows
35+
36+
Create a cloud flow when you want your automation to be triggered either automatically, instantly, or via a schedule. Here are types of flows you can create and then use with Azure database for MySQL connector.
37+
38+
| **Flow type** | **Use case** | **Automation target** |
39+
|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
40+
| Automated cloud flows | Create an automation that is triggered by an event such as arrival of an email from a specific person, or a mention of your company in social media.| Connectors for cloud or on-premises services connect your accounts and enable them to talk to each other. |
41+
| Instant cloud flows | Start an automation with a click of a button. You can automate for repetitive tasks from your Desktop or Mobile devices. For example, instantly send a reminder to the team with a push of a button from your mobile device. | Wide range of tasks such as requesting an approval, an action in Teams or SharePoint. |
42+
| Scheduled flows | Schedule an automation such as daily data upload to SharePoint or a database. |Tasks that need to be automated on a schedule.
43+
44+
For this tutorial, we'll use **instant cloud flow* that can be triggered manually from any device, easy-to-share instant flows automate tasks so you don’t have to repeat yourself.
45+
46+
## Specify an event to start the flow
47+
Follow the steps to create an instant cloud flow with a manual trigger.
48+
49+
1. In [Power Automate](https://flow.microsoft.com), select **Create** from the navigation bar on the left.
50+
2. Under **Start from blank*, select **Instant cloud flow**.
51+
3. Give your flow a name in the **Flow name" field and select **Manually trigger a flow**.
52+
53+
:::image type="content" source="./media/tutorial-power-automate-with-mysql/create-instant-cloud-flow.png" alt-text="Screenshot that shows how to create instant cloud flow app.":::
54+
55+
4. Select the **Create** button at the bottom of the screen.
56+
57+
## Create a MySQL operation
58+
An operation is an action. Power Automate flow allows you to add one or more advanced options and multiple actions for the same trigger. For example, add an advanced option that sends an email message as high priority. In addition to sending mail when an item is added to a list created in Microsoft Lists, create a file in Dropbox that contains the same information.
59+
60+
1. Once the flow app is created, select **Next Step** to create an operation.
61+
2. In the box that shows Search connectors and actions, enter **Azure database for MySQL**.
62+
3. Select **Azure database for MySQL** connector and then select **Get Rows** operation. Get rows operation allows you to get all the rows from a table or query.
63+
64+
:::image type="content" source="./media/tutorial-power-automate-with-mysql/azure-mysql-connector-add-action.png" alt-text="Screenshot that shows how to view all the actions for Azure database for MySQL connector.":::
65+
66+
5. Add a new MySQL connection and enter the **authentication type**,**server name**, **database name**, **username**, **password**. Select **encrypt connection** if SSL is enabled on your MySQL server.
67+
68+
:::image type="content" source="./media/tutorial-power-automate-with-mysql/add-mysql-connection-information.png" alt-text="Screenshot that adding a new MySQL connection for Azure Database for MySQL server.":::
69+
70+
> [!NOTE]
71+
> If you get an error **Test connection failed. Details: Authentication to host `'servername'` for user `'username'` using method 'mysql_native_password' failed with message: Access denied for user `'username'@'IP address'`(using password: YES)**, please update the firewall rules on MySQL server in [Azure protal](https://portal.azure.com) with this IP address.
72+
73+
5. After the connection is successfully added, provide the **servername, database name and table name** parameters for **Get Rows** operation using the newly added connection. Select **advanced options** to add more filters or limit the number of rows returned.
74+
75+
:::image type="content" source="./media/tutorial-power-automate-with-mysql/get-rows-from-table.png" alt-text="Screenshot that shows configuring Get Rows operation.":::
76+
77+
6. Select **Save**.
78+
79+
## Test and run your flow
80+
After saving the flow, we need to test it and run the flow app.
81+
82+
1. Select **Flow checker** to see if there are any errors that need to be resolved.
83+
2. Select **Test** and then select **Manually** to test the trigger.
84+
3. Select **Run flow**.
85+
4. When the flow is successfully executed, you can select **click to download** in the output section to see the JSON response received.
86+
87+
:::image type="content" source="./media/tutorial-power-automate-with-mysql/run-flow-to-get-rows-from-table.png" alt-text="Screenshot that shows output of the run.":::
88+
89+
## Next steps
90+
[Azure database for MySQL connector](/connectors/azuremysql/) reference

0 commit comments

Comments
 (0)