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
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-scenario-function-sb-trigger.md
+88-35Lines changed: 88 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,47 +1,92 @@
1
1
---
2
2
title: Scenario - Trigger logic apps with Azure Functions and Azure Service Bus | Microsoft Docs
3
-
description: Create a function to trigger a logic app by using Azure Functions and Azure Service Bus
4
-
services: logic-apps,functions
5
-
documentationcenter: .net,nodejs,java
6
-
author: jeffhollan
7
-
manager: jeconnoc
8
-
editor: ''
9
-
10
-
ms.assetid: 19cbd921-7071-4221-ab86-b44d0fc0ecef
3
+
description: Create functions that trigger logic apps by using Azure Functions and Azure Service Bus
4
+
services: logic-apps
11
5
ms.service: logic-apps
12
-
ms.devlang: multiple
6
+
ms.suite: integration
7
+
author: ecfan
8
+
ms.reviewer: jehollan, klam, LADocs
13
9
ms.topic: article
14
-
ms.tgt_pltfrm: na
15
-
ms.workload: integration
10
+
ms.assetid: 19cbd921-7071-4221-ab86-b44d0fc0ecef
16
11
ms.date: 05/23/2016
17
-
ms.author: LADocs; jehollan
18
-
19
12
---
20
-
# Scenario: Trigger a logic app with Azure Functions and Azure Service Bus
21
13
22
-
You can use Azure Functions to create a trigger for a logic app when you need to deploy a long-running listener or task. For example, you can create a function that listens in on a queue and then immediately fire a logic app as a push trigger.
14
+
# Scenario: Trigger logic apps with Azure Functions and Azure Service Bus
15
+
16
+
You can use Azure Functions to create a trigger for a logic app
17
+
when you need to deploy a long-running listener or task. For example,
18
+
you can create a function that listens in on a queue and then
19
+
immediately fire a logic app as a push trigger.
20
+
21
+
## Prerequisites
22
+
23
+
* An Azure subscription. If you don't have an Azure subscription,
24
+
<ahref="https://azure.microsoft.com/free/"target="_blank">sign up for a free Azure account</a>.
25
+
26
+
* Basic knowledge about [how to create logic apps](../logic-apps/quickstart-create-first-logic-app-workflow.md)
27
+
28
+
* Before you can create an Azure function,
29
+
[create a function app](../azure-functions/functions-create-function-app-portal.md).
30
+
31
+
## Create logic app
32
+
33
+
In this example, you have a function running for
34
+
each logic app that needs to be triggered.
35
+
First, create a logic app that has an HTTP request trigger.
36
+
The function calls that endpoint whenever a queue message is received.
37
+
38
+
1. Sign in to the [Azure portal](https://portal.azure.com),
39
+
and create blank logic app.
40
+
41
+
If you're new to logic apps, review
42
+
[Quickstart: Create your first logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
In this example, you have a function running for each logic app that needs to be triggered. First, create a logic app that has an HTTP request trigger. The function calls that endpoint whenever a queue message is received.
50
+
You can optionally specify a JSON schema to use
51
+
with the queue message by using a tool like
52
+
[jsonschema.net](http://jsonschema.net).
53
+
JSON schemas help the Logic App Designer understand
54
+
the structure of the data and makes properties easier
55
+
for you to select throughout the workflow.
56
+
To specify a schema, paste the schema in
57
+
the **Request Body JSON Schema** box, for example:
26
58
27
-
1. Create a logic app.
28
-
2. Select the **Manual - When an HTTP Request is Received** trigger.
29
-
Optionally, you can specify a JSON schema to use with the queue message by using a tool like [jsonschema.net](http://jsonschema.net). Paste the schema in the trigger. Schemas help the designer understand the shape of the data and flow properties more easily through the workflow.
30
-
2. Add any additional steps that you want to occur after a queue message is received. For example, send an email via Office 365.
31
-
3. Save the logic app to generate the callback URL for the trigger to this logic app. The URL appears on the trigger card.
![The callback URL appears on the trigger card][1]
61
+
1. Add any other actions you want to happen after receiving the queue message.
34
62
35
-
## Build the function
36
-
Next, you must create a function that acts as the trigger and listens to the queue.
63
+
For example, you can send an email with the Office 365 Outlook connector.
37
64
38
-
1. In the [Azure Functions portal](https://functions.azure.com/), select **New Function**, and then select the **ServiceBusQueueTrigger - C#** template.
65
+
1. Save your logic app, which generates the
66
+
callback URL for the trigger in this logic app.
67
+
This URL appears in the **HTTP POST URL** property.
68
+
69
+

70
+
71
+
## Create Azure function
72
+
73
+
Next, create the function that acts as the trigger and listens to the queue.
74
+
75
+
1. In the Azure portal, open and expand your function app, if not already open.
76
+
77
+
1. Under your function app name, expand **Functions**.
78
+
On the **Functions** pane, choose **New function**.
79
+
Select this template: **Service Bus Queue trigger - C#**
39
80
40
-
![Azure Functions portal][2]
41
-
2. Configure the connection to the Service Bus queue, which uses the Azure Service Bus SDK `OnMessageReceive()` listener.
42
-
3. Write a basic function to call the logic app endpoint (created earlier) by using the queue message as a trigger. Here's a full example of a function. The example uses an `application/json` message content type, but you can change this type as necessary.
To test, add a queue message via a tool like [Service Bus Explorer](https://github.com/paolosalvatori/ServiceBusExplorer). See the logic app fire immediately after the function receives the message.
108
+
This example uses the `application/json` message content type,
109
+
but you can change this type as necessary.
110
+
111
+
1. To test the function, add a queue message by using a tool such as the [Service Bus Explorer](https://github.com/paolosalvatori/ServiceBusExplorer).
112
+
113
+
The logic app triggers immediately after the
114
+
function receives the message.
115
+
116
+
## Get support
117
+
118
+
* For questions, visit the [Azure Logic Apps forum](https://social.msdn.microsoft.com/Forums/en-US/home?forum=azurelogicapps).
119
+
* To submit or vote on feature ideas, visit the [Logic Apps user feedback site](http://aka.ms/logicapps-wish).
title: Connect to file systems on premises - Azure Logic Apps | Microsoft Docs
3
-
description: Connect to on-premises file systems from logic app workflows through the on-premises data gateway and File System connector
4
-
keywords: file systems, on premises
3
+
description: Automate tasks and workflows that connect to on-premises file systems with the File System connector through the on-premises data gateway in Azure Logic Apps
5
4
services: logic-apps
6
-
author: derek1ee
7
-
manager: jeconnoc
8
-
documentationcenter: ''
9
-
10
-
ms.assetid:
11
5
ms.service: logic-apps
12
-
ms.devlang: na
6
+
ms.suite: integration
7
+
author: derek1ee
8
+
ms.author: deli
9
+
ms.reviewer: klam, estfan, LADocs
13
10
ms.topic: article
14
-
ms.tgt_pltfrm: na
15
-
ms.workload: na
16
11
ms.date: 09/18/2017
17
-
ms.author: LADocs; deli
18
12
---
19
13
20
-
# Connect to on-premises file systems from logic apps with the File System connector
14
+
# Connect to on-premises file systems with Azure Logic Apps
15
+
16
+
With the File System connector and Azure Logic Apps,
17
+
you can create automated tasks and workflows that
18
+
create and manage files on an on-premises file share,
19
+
for example:
20
+
21
+
- Create, get, append, update, and delete files
22
+
- List files in folders or root folders.
23
+
- Get file content and metadata.
21
24
22
-
To manage data and securely access on-premises resources,
23
-
your logic apps can use the on-premises data gateway.
24
-
This article shows how you can connect to a file system on premises
25
-
through this basic example scenario: copy a file that's uploaded to Dropbox to a file share,
26
-
then send an email.
25
+
This article shows how you can connect to an on-premises
26
+
file system as described by this example scenario:
27
+
copy a file that's uploaded to Dropbox to a file share,
28
+
and then send an email. To securely connect and access on-premises systems,
29
+
logic apps use the [on-premises data gateway](../logic-apps/logic-apps-gateway-connection.md).
30
+
If you're new to logic apps, review [What is Azure Logic Apps?](../logic-apps/logic-apps-overview.md)
27
31
28
32
## Prerequisites
29
33
30
-
* Download the latest [on-premises data gateway](https://www.microsoft.com/download/details.aspx?id=53127).
34
+
* An Azure subscription. If you don't have an Azure subscription,
35
+
<ahref="https://azure.microsoft.com/free/"target="_blank">sign up for a free Azure account</a>.
31
36
32
-
* Install and set up the latest on-premises data gateway, version 1.15.6150.1 or above.
33
-
For the steps, see [Connect to data sources on premises](http://aka.ms/logicapps-gateway).
34
-
You must install the gateway on an on-premises machine
35
-
before you can continue with these steps.
37
+
* Before you can connect logic apps to on-premises
38
+
systems such as your file system server, you need to
39
+
[install and set up an on-premises data gateway](../logic-apps/logic-apps-gateway-install.md).
40
+
That way, you can specify to use your gateway installation when
41
+
you create the file system connection from your logic app.
36
42
37
-
*Basic knowledge about [how to create logic apps](../logic-apps/quickstart-create-first-logic-app-workflow.md)
43
+
*A [Drobox account](https://www.dropbox.com/) and your user credentials
38
44
39
-
## Add trigger and actions for connecting to your file system
45
+
Your credentials authorize your logic app to create
46
+
a connection and access your Drobox account.
40
47
41
-
1. Create a blank logic app. Add this trigger as the first step: **Dropbox - When a file is created**
48
+
* Basic knowledge about [how to create logic apps](../logic-apps/quickstart-create-first-logic-app-workflow.md).
49
+
For this example, you need a blank logic app.
42
50
43
-
2. Under the trigger, choose **+ Next step** > **Add an action**.
51
+
## Add trigger and actions
44
52
45
-
3. In the search box, enter "file system" as your filter.
46
-
When you see all the actions for the File System connector,
47
-
choose the **File System - Create file** action.
53
+
[!INCLUDE [Create connection general intro](../../includes/connectors-create-connection-general-intro.md)]
48
54
49
-

55
+
1. Sign in to the [Azure portal](https://portal.azure.com),
56
+
and open your logic app in Logic App Designer, if not open already.
50
57
51
-
4. If you don't already have a connection to your file system,
58
+
1. In the search box, enter "dropbox" as your filter.
59
+
From the triggers list, select this trigger:
60
+
**When a file is created**
61
+
62
+
1. Under the trigger, choose **Next step**.
63
+
In the search box, enter "file system" as your filter.
64
+
From the actions list, select this action:
65
+
**Create file - File System**
66
+
67
+

68
+
69
+
1. If you don't already have a connection to your file system,
52
70
you're prompted to create a connection.
53
71
54
-
5. Select **Connect via on-premises data gateway**.
0 commit comments