Approach
Follow the steps given below to fetch the data from Azure SQL database (PAAS).
Step 1
Add Execute SQL action and open the configure Window.
Step 2
Open the right top down arrow and click Configuration.
In Configuration screen, you should provide the values given below.
- Connection string.
- Query - Here, you should give the query to execute in Execute SQL action.
- Column to retrieve - Column name, which you want to fetch from SQL table.
- Result Count - Output result count.
- Retrieved column values - Create Collection variable to save the output.
- Results in XML - Create a variable to save the output in XML format.
Connection string
In this section, you should give the Server name, user ID (if your user Id contains a domain name. You should add @sqlserver name in the end of the user ID), password and host name (this should be your Azure SQL Server).
Sample
- Server = tcp: servername.database.windows.net, 1433;
- Initial Catalog = DCCSQLDatabase;
- Persist Security Info = False;
- User ID = username @domain.com @dccsqlserver;
- Password = ** ** ** * ;
- MultipleActiveResultSets = False;
- Encrypt = True;
- TrustServerCertificate = False;
- Connection Timeout = 30;
Once configured, all the things in Execute SQL action nedds to be saved. Publish the Workflow.
Azure Firewall Settings
Every organization uses Office 365 and restricts computers on your network from connecting to the Internet. You'll find the endpoints given below (IPv4 address ranges), which you should include in an organization outbound, which allows the lists to ensure the computers can successfully use Office 365.
For Office 365 Sharepoint Online, as a onetime activity add the IP specified in the popup to the firewall settings of Azure SQL Server Firewall settings page. Along with this, add 11 more IP ranges to Firewall settings page in Azure SQL Server, as shown below.
The above IP ranges may be updated, which is based on Microsoft updates. These updates needs to be periodically checked across in this site.
Once configured, Firewall settings in Azure SQL database, you can start the Workflow or an event, so the Workflow will fetch the values from Azure SQL database.
Note
For testing, you can add the log history action in your Workflow and verify the output of Execute SQL action.
Output Collection should be, as shown below.
Keynotes
- Fetch the values from Azure SQL database, using Execute SQL action in Nintex Workflow.
- Configure Azure SQL Server Firewall settings.
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Sanket ShahPosted Oct 9, 2017, 10:22 AM
Hi Muthu - Thank you for providing information on how to connect Azure SQL Database using Execute SQL WF action from Nintex Workflow.I'm using Nintex Workflow 2013 on-premise version and when i tried to execute above connection strings, I am getting "Unexpected SQL error occurred. Server name: tcp: servername.database.windows.net; Database name: DCCSQLDatabase". I have replaced your parameters with my database name and all. Can you please help me with this issue? and let me know if I am missing any step in Nintex Workflow or any where. thank you, Sanket