You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create, manage, and deploy logic apps, you can then use [Azure PowerShell](/powershell/module/az.logicapp), [Azure CLI](../azure-resource-manager/templates/deploy-cli.md), or the [Azure Logic Apps REST APIs](/rest/api/logic/).
20
20
21
-
To work with workflow definitions in JSON, open the Code View editor when working in the Azure portal or in Visual Studio, or copy the definition into any editor that you want.
22
-
If you're new to Azure Logic Apps, review
23
-
[Create an example Consumption logic app workflow](../logic-apps/quickstart-create-example-consumption-workflow.md).
21
+
To work with workflow definitions in JSON, open the Code View editor when working in the Azure portal or Visual Studio Code, or copy the definition into any editor that you want.
24
22
25
23
> [!NOTE]
26
24
> Some Azure Logic Apps capabilities, such as defining
Copy file name to clipboardExpand all lines: articles/logic-apps/quickstart-create-logic-apps-with-visual-studio.md
+230-3Lines changed: 230 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,234 @@ ms.date: 12/10/2024
26
26
27
27
You can create, develop, and deploy automated workflows that integrate services, systems, apps, and data across enterprises and organizations by using [Azure Logic Apps](logic-apps-overview.md). Although you can perform these tasks in the Azure portal, you can also use a local development environment to create logic app projects that you can add to source control, publish different versions, and create Azure Resource Manager templates for different deployment environments. For more information about multitenant versus single-tenant logic app workflows, see [Single-tenant versus multitenant in Azure Logic Apps](single-tenant-overview-compare.md).
28
28
29
-
## Related content
29
+
This quickstart shows how to design, develop, and deploy automated workflows that integrate apps, data, systems, and services across enterprises and organizations by using multitenant [Azure Logic Apps](logic-apps-overview.md) and Visual Studio. Although you can perform these tasks in the Azure portal, Visual Studio lets you add your logic apps to source control, publish different versions, and create Azure Resource Manager templates for different deployment environments. For more information about multitenant versus single-tenant model, review [Single-tenant versus multitenant in Azure Logic Apps](single-tenant-overview-compare.md).
30
30
31
-
-[Quickstart: Create and manage Consumption logic app workflows in multitenant Azure Logic Apps with Visual Studio Code](/azure/logic-apps/quickstart-create-logic-apps-with-visual-studio-code)
32
-
-[Create a Standard logic app workflow in single-tenant Azure Logic Apps with Visual Studio Code](/azure/logic-apps/create-single-tenant-workflows-visual-studio-code)
31
+
If you're new to Azure Logic Apps and just want the basic concepts, try the [quickstart for creating an example Consumption logic app workflow in the Azure portal](quickstart-create-example-consumption-workflow.md). The workflow designer works similarly in both the Azure portal and Visual Studio.
32
+
33
+
In this quickstart, you create the same logic app workflow with Visual Studio as the Azure portal quickstart. You can also learn to [create an example logic app workflow in Visual Studio Code](quickstart-create-logic-apps-visual-studio-code.md), and [create and manage logic app workflows using the Azure CLI](quickstart-logic-apps-azure-cli.md). This logic app workflow monitors a website's RSS feed and sends email for each new item in that feed. Your finished logic app workflow looks like the following high-level workflow:
34
+
35
+

36
+
37
+
<aname="prerequisites"></a>
38
+
39
+
## Prerequisites
40
+
41
+
* An Azure account and subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). If you have an Azure Government subscription, follow these additional steps to [set up Visual Studio for Azure Government Cloud](#azure-government).
42
+
43
+
* Download and install these tools, if you don't have them already:
44
+
45
+
*[Visual Studio 2019 - Community edition](https://aka.ms/download-visual-studio), which is free. This quickstart uses Visual Studio Community 2017.
46
+
47
+
> [!IMPORTANT]
48
+
>
49
+
> If you use Visual Studio 2019 or 2017, make sure that you select the **Azure development** workload.
50
+
>
51
+
> The Azure Logic Apps extension is unavailable for Visual Studio 2022.
52
+
53
+
*[Microsoft Azure SDK for .NET (2.9.1 or later)](https://azure.microsoft.com/downloads/). Learn more about [Azure SDK for .NET](/dotnet/azure/intro).
* The corresponding Azure Logic Apps Tools for the Visual Studio extension, which is unavailable for Visual Studio 2022:
58
+
59
+
*[Visual Studio 2019](https://aka.ms/download-azure-logic-apps-tools-visual-studio-2019)
60
+
61
+
*[Visual Studio 2017](https://aka.ms/download-azure-logic-apps-tools-visual-studio-2017)
62
+
63
+
You can download and install Azure Logic Apps Tools directly from the Visual Studio Marketplace, or learn [how to install this extension from inside Visual Studio](/visualstudio/ide/finding-and-using-visual-studio-extensions). Make sure that you restart Visual Studio after you finish installing.
64
+
65
+
* Access to the web while using the embedded workflow designer
66
+
67
+
The designer needs an internet connection to create resources in Azure and to read properties and data from connectors in your logic app workflow.
68
+
69
+
* An email account that's supported by Azure Logic Apps, such as Outlook for Microsoft 365, Outlook.com, or Gmail. For other providers, review the [connectors list here](/connectors/). This example uses Office 365 Outlook. If you use a different provider, the overall steps are the same, but your UI might slightly differ.
70
+
71
+
> [!IMPORTANT]
72
+
>
73
+
> If you want to use the Gmail connector, only G-Suite business accounts can use this connector without restriction in logic app workflows.
74
+
> If you have a Gmail consumer account, you can use this connector with only specific Google-approved services, or you can
75
+
> [create a Google client app to use for authentication with your Gmail connector](/connectors/gmail/#authentication-and-bring-your-own-application).
76
+
> For more information, see [Data security and privacy policies for Google connectors in Azure Logic Apps](../connectors/connectors-google-data-security-privacy-policy.md).
77
+
78
+
* If your logic app workflow needs to communicate through a firewall that limits traffic to specific IP addresses, that firewall needs to allow access for *both* the [inbound](logic-apps-limits-and-config.md#inbound) and [outbound](logic-apps-limits-and-config.md#outbound) IP addresses used by the Azure Logic Apps service or runtime in the Azure region where your logic app resource exists. If your logic app workflow also uses [managed connectors](../connectors/managed.md), such as the Office 365 Outlook connector or SQL connector, or uses [custom connectors](/connectors/custom-connectors/), the firewall also needs to allow access for *all* the [managed connector outbound IP addresses](logic-apps-limits-and-config.md#outbound) in your logic app resource's Azure region.
79
+
80
+
<aname="azure-government"></a>
81
+
82
+
## Set up Visual Studio for Azure Government
83
+
84
+
### Visual Studio 2019
85
+
86
+
To work with Azure Government subscriptions in Azure Logic Apps, you need to [add a discovery endpoint for Azure Government Cloud to Visual Studio](../azure-government/documentation-government-connect-vs.md). However, *before you sign in to Visual Studio with your Azure Government account*, you need to rename the JSON file that's generated after you add the discovery endpoint by following these steps:
87
+
88
+
1. Close Visual Studio.
89
+
90
+
1. Find the generated JSON file named `Azure U.S. Government-A3EC617673C6C70CC6B9472656832A26.Configuration` at this location:
You can use the [Azure Environment Selector Visual Studio extension](https://devblogs.microsoft.com/azuregov/introducing-the-azure-environment-selector-visual-studio-extension/), which you can download and install from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SteveMichelotti.AzureEnvironmentSelector).
107
+
108
+
<aname="create-resource-group-project"></a>
109
+
110
+
## Create Azure resource group project
111
+
112
+
To get started, create an [Azure Resource Group project](../azure-resource-manager/templates/create-visual-studio-deployment-project.md). Learn more about [Azure resource groups and resources](../azure-resource-manager/management/overview.md).
113
+
114
+
1. Start Visual Studio. Sign in with your Azure account.
115
+
116
+
1. On the **File** menu, select **New** > **Project**. (Keyboard: Ctrl + Shift + N)
117
+
118
+

119
+
120
+
1. Under **Installed**, select **Visual C#** or **Visual Basic**. Select **Cloud** > **Azure Resource Group**. Name your project, for example:
121
+
122
+

123
+
124
+
> [!NOTE]
125
+
>
126
+
> Resource group names can contain only letters, numbers,
127
+
> periods (`.`), underscores (`_`), hyphens (`-`), and
128
+
> parentheses (`(`, `)`), but can't *end* with periods (`.`).
129
+
>
130
+
> If **Cloud** or **Azure Resource Group** doesn't appear,
131
+
> make sure you install the Azure SDK for Visual Studio.
132
+
133
+
If you're using Visual Studio 2019, follow these steps:
134
+
135
+
1. In the **Create a new project** box, select the **Azure Resource Group** project for Visual C# or Visual Basic. Select **Next**.
136
+
137
+
1. Provide a name for the Azure resource group you want to use and other project information. Select **Create**.
138
+
139
+
1. From the template list, select the **Logic App** template. Select **OK**.
After Visual Studio creates your project, Solution Explorer opens and shows your solution. In your solution, the **LogicApp.json** file not only stores your logic app definition but is also an Azure Resource Manager template that you can use for deployment.
144
+
145
+

146
+
147
+
## Create blank logic app workflow
148
+
149
+
When you have your Azure Resource Group project, create your logic app with the **Blank Logic App** template.
150
+
151
+
1. In Solution Explorer, open the **LogicApp.json** file's shortcut menu. Select **Open With Logic App Designer**. (Keyboard: Ctrl + L)
152
+
153
+

154
+
155
+
> [!TIP]
156
+
>
157
+
> If you don't have this command in Visual Studio 2019, check that you have the latest updates for Visual Studio.
158
+
159
+
Visual Studio prompts you for your Azure subscription and an Azure resource group for creating and deploying resources for your logic app workflow and connections.
160
+
161
+
1. For **Subscription**, select your Azure subscription. For **Resource group**, select **Create New** to create another Azure resource group.
162
+
163
+

164
+
165
+
| Setting | Example value | Description |
166
+
| ------- | ------------- | ----------- |
167
+
| User account | Fabrikam <br> [email protected]| The account that you used when you signed in to Visual Studio |
168
+
|**Subscription**| Pay-As-You-Go <br> ([email protected]) | The name for your Azure subscription and associated account |
169
+
|**Resource Group**| MyLogicApp-RG <br> (West US) | The Azure resource group and location for storing and deploying your logic app's resources |
170
+
|**Location**|**Same as Resource Group**| The location type and location to deploy your logic app resource. <br><br>For this quickstart, keep the location type set to **Region** and the location set to **Same as Resource Group**. <br><br>**Note**: After you create your resource group project, you can [change the location type and the location](manage-logic-apps-with-visual-studio.md#change-location), but different location type affects your logic app in various ways. |
171
+
172
+
1. The workflow designer opens a page that shows an introduction video and commonly used triggers. Scroll down past the video and triggers to **Templates**, and select **Blank Logic App**.
173
+
174
+

175
+
176
+
## Build your workflow
177
+
178
+
Next, add an RSS [trigger](../logic-apps/logic-apps-overview.md#logic-app-concepts) that fires when a new feed item appears. Every workflow starts with a trigger, which fires when specific criteria are met. Each time the trigger fires, the Azure Logic Apps engine creates a logic app workflow instance that runs your workflow.
179
+
180
+
1. On the workflow designer, [follow these general steps to add the **RSS** trigger named **When a feed item is published**](quickstart-create-example-consumption-workflow.md?tabs=consumption#add-rss-trigger).
181
+
182
+
1. Finish building the workflow by [following these general steps to add the **Office 365 Outlook** action named **Send an email**](quickstart-create-example-consumption-workflow.md#add-email-action), then return to this article.
183
+
184
+
When you're done, your workflow looks like this example:
1. Save your Visual Studio solution. (Keyboard: Ctrl + S)
189
+
190
+
<aname="deploy-to-Azure"></a>
191
+
192
+
## Deploy logic app to Azure
193
+
194
+
Before you can run and test your workflow, deploy the app to Azure from Visual Studio.
195
+
196
+
1. In Solution Explorer, on your project's shortcut menu, select **Deploy** > **New**. If prompted, sign in with your Azure account.
197
+
198
+

199
+
200
+
1. For this deployment, keep the default Azure subscription, resource group, and other settings. Select **Deploy**.
201
+
202
+

203
+
204
+
1. If the **Edit Parameters** box appears, provide a resource name for your logic app. Save your settings.
205
+
206
+

207
+
208
+
When deployment starts, your app's deployment status appears in the Visual Studio **Output** window. If the status doesn't appear, open the **Show output from** list, and select your Azure resource group.
209
+
210
+

211
+
212
+
If your selected connectors need input from you, a PowerShell window opens in the background and prompts for any necessary passwords or secret keys. After you enter this information, deployment continues.
213
+
214
+

215
+
216
+
After deployment finishes, your logic app is live in the Azure portal and runs on your specified schedule (every minute). If the trigger finds new feed items, the trigger fires and creates a workflow instance that runs the workflow's actions. Your workflow sends email for each new item. Otherwise, if the trigger doesn't find new items, the trigger doesn't fire and "skips" instantiating the workflow. Your workflow waits until the next interval before checking.
217
+
218
+
Here are sample emails that this workflow sends. If you don't get any emails, check your junk email folder.
219
+
220
+

221
+
222
+
Congratulations, you've successfully built and deployed your logic app workflow with Visual Studio. To manage your logic app workflow and review the run history, see [Manage logic apps with Visual Studio](manage-logic-apps-with-visual-studio.md).
223
+
224
+
## Add new logic app
225
+
226
+
When you have an existing Azure Resource Group project, you can add a new blank logic app to that project by using the JSON Outline window.
227
+
228
+
1. In Solution Explorer, open the `<logic-app-name>.json` file.
229
+
230
+
1. From the **View** menu, select **Other Windows** > **JSON Outline**.
231
+
232
+
1. To add a resource to the template file, select **Add Resource** at the top of the JSON Outline window. Or in the JSON Outline window, open the **resources** shortcut menu, and select **Add New Resource**.
233
+
234
+

235
+
236
+
1. In the **Add Resource** dialog box, in the search box, find **logic app**, and select **Logic App**. Name your logic app resource, and select **Add**.
237
+
238
+

239
+
240
+
## Clean up resources
241
+
242
+
When you're done with your logic app, delete the resource group that contains your logic app and related resources.
243
+
244
+
1. Sign in to the [Azure portal](https://portal.azure.com) with the same account used to create your logic app.
245
+
246
+
1. On the Azure portal menu, select **Resource groups**, or search for and select **Resource groups** from any page. Select your logic app's resource group.
247
+
248
+
1. On the **Overview** page, select **Delete resource group**. Enter the resource group name as confirmation, and select **Delete**.
1. Delete the Visual Studio solution from your local computer.
253
+
254
+
## Next steps
255
+
256
+
In this article, you built, deployed, and ran your logic app workflow with Visual Studio. To learn about managing and performing advanced deployment for logic apps with Visual Studio, see the following article:
257
+
258
+
> [!div class="nextstepaction"]
259
+
> [Manage logic apps with Visual Studio](manage-logic-apps-with-visual-studio.md)
0 commit comments