Connect Zapier with Azure Database for MySQL - Flexible Server to automate your business workflows
Published Mar 16 2023 12:22 PM 4,077 Views
Microsoft

Being able to focus on things that matter is more important than having to do mundane time-consuming tasks on a daily basis. Automating your daily workflows can give you more time to do other things. If you have data stored in an Azure Database for MySQL - Flexible Server database, a fully managed MySQL service on Azure, and use this data to perform daily tasks for your business needs, you need to streamline the processes by integrating with MySQL data to insert new data, update data, delete data or get the rows from the tables.  Zapier is a service that can help you achieve this.  Zapier helps you automate repetitive tasks and integrate with various other services as well as data sources without writing code. Zapier has more than a million users building apps and integrations to automate their tasks from building CRUD applications to automating blog post content publishing.

 

In this post, I’ll show you how to integrate Zapier with data stored on Azure Database for MySQL to accommodate a scenario that inserts data in a MySQL database when a Google forms response is received.

 

2 scenario-google-form-toazure-db-for-mysql.png

 

Note: Currently, Zapier doesn’t support integration with Azure Database for MySQL over SSL or MySQL version 8.0+. Be sure to disable SSL on Azure Database for MySQL and that you’re using MySQL version 5.7.

 

Create an Azure Database for MySQL flexible server

 

  1. Log in to the Azure portal. If you don’t have an account, then sign up for a free trial. Note that when you sign up for free trial you get 12 months of Free Azure database for MySQL for Burstable 1 v-core compute size (B1MS) and 32 GB storage.

  2. If you don't already have one, create an Azure Database for MySQL flexible server using the public access connectivity method to set up a new MySQL database server.

    3 networking-public-access-configuration.png

  3. Add firewall rule for your current IP address and the Zapier IP address, which is 54.86.9.50.

    Note if your server is using private access connectivity method on the MySQL server, Zapier will not be able to connect because of the level of isolation private access offers.  Note that even though Azure Database for MySQL Flexible Server has private access connectivity method which gives a higher level or isolation, Zapier being an external service will not be able to connect to MySQL database on private access connectivity method.

    4 add zaiper IP address.png

  4. On the Server parameters page, search for require_secure_transport, set the value to OFF, and then select Save to disable SSL.

    5 disable-ssl-azure-db-for-mysql.png
  5.  Connect to the MySQL database using MySQL workbench or any familiar MySQL client tool.

  6. Open a new query tab, and then run the following script to create a contactsdb database including a contacts table.

CREATE database contactsdb;
USE contactsdb;
Create table contacts  ( 
  contact_id int unsigned not null auto_increment, 
  name  varchar(200), 
  address varchar(200),
  phone varchar(200),
  email varchar(64),
  comments text, 
  primary key (contact_id));

 

Create a Google form

 

  • In Google Forms, create a Contact Information form using the QuickStart templates provided.

    6 google-forms-contact-information.png

 

Create a Zap to integrate with MySQL

 

Zapier is a service that allows non-technical users to connect a triggering event from one service with one or more actions in other services. There are hundreds of services connected to Zapier and each connection between services is called a Zap. Each Zap consists of a trigger and one or more actions. When you turn your Zap on, it will run the action steps every time the trigger event occurs.

 

  1. Create a Zapier account.

    Zapier has 14-day free trial if you don’t already have an account.

  2. Create a Zap and the Zap editor will prompt you to pick an app as your trigger.

    A Zap has two components:

    - A trigger, which is the event that starts the workflow
    - An action, which what you want to happen as a result.

  3. Select Google Forms, and then, under Event, select New Form Response to set up the trigger.

    7 googl-form-add-to-zapier.png

  4. When Zapier requests access to the Google form, select Allow.

    8 zapier-authentication-google-account.png

    You can now test the trigger and see if you are able to get a response.

  5. Select Continue to move to add a MySQL connection.

    9 continue-to-mysql-step-in-adding-a-zap.png

  6. Add a MySQL action to add a new row in the table. 

    10 zap-add-new-row-in-mysql.png

  7. Provide the server details to add a new MySQL connection.  Leave SSL certificate and SSL private key fields empty since SSL has been disabled.

    11 zap-add-mysql-connection.png

  8. After the connection is successfully added, configure the action parameters as shown below:

    12 zap-configure-action-parameters-mysql.png

  9. Test the action, and then publish the Zap.

    13 zap-publish-to-production.png

You’ve successfully created automation for storing responses from Google forms into an Azure Database for MySQL server.

 

You can now test this workflow end to end since the Zap automation is in production. You can see if all the responses are being added to the database. Go to your contact information Google form and submit a test response. After submitting the response, use the MySQL client tool to verify that the response was added to the table.

 

14 view-contacts-db-query-results.png

Conclusion

 

Zapier lets you connect MySQL with thousands of the most popular apps and services so that you can automate time consuming tasks with no code required. Some of scenarios you can easily automate with Zapier are:

 

  • Adding new Facebook Lead Ads respondents to MySQL database.
  • Adding new Google Sheets rows to MySQL.
  • Adding subscribers from Mailchimp to MySQL database.
  • Savin a new webhook request data as MySQL rows in a database.
  • Copying MySQL rows into Google Sheets.
  • Sending email when a new row is added in MySQL database.
  • Storing RSS feeds into MySQL database.
  • Publishing blog post content from MySQL database to WordPress post…
  • and many more!

 

Increase your productivity by doing more with Azure Database for MySQL Flexible Server and Zapier integrations!

 

If you have any feedback or questions about the information provided above, please leave a comment below or email us at AskAzureDBforMySQL@service.microsoft.com. Thank you!

 

Co-Authors
Version history
Last update:
‎Mar 16 2023 12:51 PM
Updated by: