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
When you want a workflow trigger or action to wait for events at a service endpoint before they run, use the **HTTP Webhook** trigger or action, rather than poll on a schedule. The HTTP **Webhook** trigger and action subscribes to a service endpoint and waits for specific service events to happen before running.
17
+
When you want a workflow trigger or action to wait for events or data to arrive at a target service endpoint before they run, use the **HTTP Webhook** trigger or action, rather than proactively check the endpoint on a schedule. The **HTTP Webhook** trigger or action subscribes to the service endpoint and waits for new events or data before running. You can use the webhook pattern for long-running tasks and asynchronous processing.
18
18
19
19
The following list describes example webhook-based workflows:
20
20
21
21
- An **HTTP Webhook** trigger waits for an event to arrive from Azure Event Hubs before running the workflow.
22
22
- An **HTTP Webhook** action waits for an approval in Office 365 Outlook before continuing the next action in the workflow.
23
23
24
-
This guide shows how to set up the **HTTP Webhook** trigger and **HTTP Webhook** action so your workflow can receive and respond to events at a service endpoint.
24
+
This guide shows how to set up the **HTTP Webhook** trigger and **HTTP Webhook** action so your workflow can receive and respond to new events or data at a service endpoint.
25
25
26
26
## How do webhooks work?
27
27
28
-
A webhook trigger or action works based on events at a service endpoint and doesn't automatically check or poll for new data or events. After you add a webhook trigger or action to a workflow and then save the workflow, or after you reenable a disabled logic app resource, the webhook trigger or action *subscribes* to the specified service endpoint by registering a *callback URL* with the endpoint. The trigger or action then waits for the service endpoint to call the URL, which runs the trigger or action. Like the [**Request** trigger](connectors-native-reqres.md), a webhook trigger fires immediately.
28
+
A webhook trigger or action doesn't *poll* or proactively check for new events or data at the target service endpoint. Instead, the trigger or action waits until new events or data arrive at the service endpoint before they run. After you add a webhook trigger or action to your workflow and then save the workflow, or after you reenable a disabled logic app resource, the webhook trigger or action *subscribes* to the service endpoint by generating and registering a *callback URL* with the endpoint. The trigger or action then waits for the service endpoint to call the URL, which runs the trigger or action. Like the [**Request** trigger](connectors-native-reqres.md), an **HTTP Webhook** trigger fires immediately.
29
+
30
+
For example, the **Office 365 Outlook** connector action named [**Send approval email**](/connectors/office365/#send-approval-email) follows the webhook pattern but works only with Office 365 Outlook. You can extend the webhook pattern into any service by using the **HTTP Webhook** trigger or action with the service endpoint you want.
29
31
30
32
A webhook trigger stays subscribed to a service endpoint until you manually take one of the following actions:
31
33
@@ -37,32 +39,26 @@ A webhook action stays subscribed to a service endpoint until one of the followi
37
39
38
40
- The webhook action successfully finishes.
39
41
- The workflow run is canceled while waiting for a response.
40
-
-Before a workflow run times out.
42
+
-The workflow run times out.
41
43
- You change any webhook action parameter values that a webhook trigger uses as inputs.
42
44
43
-
For example, the **Office 365 Outlook** connector action named [**Send approval email**](/connectors/office365/#send-approval-email) follows the webhook pattern. You can extend this pattern into any service by using the webhook action.
44
-
45
45
For more information, see:
46
46
47
47
-[Webhooks and subscriptions](../logic-apps/logic-apps-workflow-actions-triggers.md#webhooks-and-subscriptions)
48
48
-[Create custom APIs that support a webhook](../logic-apps/logic-apps-create-api-app.md)
49
-
50
-
For information about encryption, security, and authorization for inbound calls to your logic app, such as [Transport Layer Security (TLS)](https://en.wikipedia.org/wiki/Transport_Layer_Security) or [Microsoft Entra ID Open Authentication](../active-directory/develop/index.yml), see [Access for inbound calls to request-based triggers](../logic-apps/logic-apps-securing-a-logic-app.md#secure-inbound-requests).
51
-
52
-
## Connector technical reference
53
-
54
-
For more information about the **HTTP Webhook** trigger and action parameters, see [HTTP Webhook parameters](../logic-apps/logic-apps-workflow-actions-triggers.md#http-webhook-trigger). The trigger and action have the same parameters.
49
+
-[Access for outbound calls to other services and systems](../logic-apps/logic-apps-securing-a-logic-app.md#secure-outbound-requests)
55
50
56
51
## Prerequisites
57
52
58
53
- An Azure account and subscription. [Get a free Azure account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
59
54
60
-
- The URL for a deployed service endpoint or API that supports the webhook subscribe and unsubscribe pattern for [webhook triggers in workflows](../logic-apps/logic-apps-create-api-app.md#webhook-triggers) or [webhook actions in workflows](../logic-apps/logic-apps-create-api-app.md#webhook-actions).
55
+
- The URL for a deployed service endpoint or API.
61
56
62
-
- The Standard or Consumption logic app workflow where you want to use the **HTTP Webhook** trigger or action.
57
+
This item must support the pattern to subscribe and unsubscribe for [webhook triggers in workflows](../logic-apps/logic-apps-create-api-app.md#webhook-triggers) or [webhook actions in workflows](../logic-apps/logic-apps-create-api-app.md#webhook-actions).
63
58
64
-
- To use the **HTTP Webhook** trigger, you need to create a logic app resource with a blank workflow.
59
+
- The Standard or Consumption logic app workflow where you want to use the **HTTP Webhook** trigger or action.
65
60
61
+
- To use the **HTTP Webhook** trigger, create a logic app resource with a blank workflow.
66
62
- To use the **HTTP Webhook** action, start your workflow with any trigger that works best for your scenario. The examples use the **HTTP Webhook** trigger.
67
63
68
64
## Add an HTTP Webhook trigger
@@ -81,8 +77,8 @@ This built-in trigger calls the subscribe endpoint on the target service and reg
81
77
|-----------|----------|-------------|
82
78
|**Subscribe Method**| Yes | The method to use for subscribing to the target endpoint. |
83
79
|**Subscribe URI**| Yes | The URL to use for subscribing to the target endpoint. |
84
-
|**Subscribe Body**| No | Any message body to include in the subscribe request. This example includes the callback URL that uniquely identifies the subscriber, which is your workflow, by using the `@listCallbackUrl()` expression to retrieve your trigger's callback URL. |
85
-
|**Unsubscribe Body**| No | Any message body to include in the unsubscribe request. <br><br>**Note**: This parameter doesn't support using the `listCallbackUrl()` function. However, the trigger automatically includes and sends the headers, `x-ms-client-tracking-id` and `x-ms-workflow-operation-name`, which the target service can use to uniquely identify the subscriber. |
80
+
|**Subscribe Body**| No | Any message body to include in the subscribe request. This example includes the callback URL that uniquely identifies the subscriber, which is your workflow, by using the [`listCallbackUrl()` expression function](../logic-apps/expression-functions-reference.md#listcallbackurl) to retrieve your trigger's callback URL. |
81
+
|**Unsubscribe Body**| No | Any message body to include in the unsubscribe request. <br><br>**Note**: This parameter doesn't support using the `listCallbackUrl()`expression function. However, the trigger automatically includes and sends the headers, `x-ms-client-tracking-id` and `x-ms-workflow-operation-name`, which the target service can use to uniquely identify the subscriber. |
86
82
87
83
1. To add other trigger parameters, open the **Advanced parameters** list.
88
84
@@ -118,8 +114,8 @@ This built-in action calls the subscribe endpoint on the target service and regi
118
114
|-----------|----------|-------------|
119
115
|**Subscribe Method**| Yes | The method to use for subscribing to the target endpoint. |
120
116
|**Subscribe URI**| Yes | The URL to use for subscribing to the target endpoint. |
121
-
|**Subscribe Body**| No | Any message body to include in the subscribe request. This example includes the callback URL that uniquely identifies the subscriber, which is your workflow, by using the `@listCallbackUrl()` expression to retrieve your action's callback URL. |
122
-
|**Unsubscribe Body**| No | Any message body to include in the unsubscribe request. <br><br>**Note**: This parameter doesn't support using the `listCallbackUrl()` function. However, the action automatically includes and sends the headers, `x-ms-client-tracking-id` and `x-ms-workflow-operation-name`, which the target service can use to uniquely identify the subscriber. |
117
+
|**Subscribe Body**| No | Any message body to include in the subscribe request. This example includes the callback URL that uniquely identifies the subscriber, which is your workflow, by using the [`listCallbackUrl()` expression function](../logic-apps/expression-functions-reference.md#listcallbackurl) to retrieve your action's callback URL. |
118
+
|**Unsubscribe Body**| No | Any message body to include in the unsubscribe request. <br><br>**Note**: This parameter doesn't support using the `listCallbackUrl()`expression function. However, the action automatically includes and sends the headers, `x-ms-client-tracking-id` and `x-ms-workflow-operation-name`, which the target service can use to uniquely identify the subscriber. |
123
119
124
120
1. To add other action parameters, open the **Advanced parameters** list.
125
121
@@ -139,7 +135,61 @@ This built-in action calls the subscribe endpoint on the target service and regi
139
135
140
136
When this action runs, your workflow calls the subscribe endpoint on the target service and registers the callback URL. Your workflow pauses and waits for the target service to send an `HTTP POST` request to the callback URL. When this event happens, the action passes any data in the request to the workflow. If the operation successfully completes, the action unsubscribes from the endpoint, and your workflow continues to the next action.
141
137
142
-
## Trigger and action outputs
138
+
## Connector technical reference
139
+
140
+
For more information about the **HTTP Webhook** trigger and action parameters, see [HTTP Webhook parameters](../logic-apps/logic-apps-workflow-actions-triggers.md#http-webhook-trigger). The trigger and action have the same parameters.
The callback URL for the **HTTP Webhook** trigger or action is automatically generated by the [`listCallbackUrl()` REST API method](/rest/api/logic/workflow-triggers/list-callback-url). By default, the SAS token in the callback URL doesn't have a time-based expiration. The callback URL stays valid for the workflow run duration.
145
+
146
+
### Timeout limits
147
+
148
+
The following table describes the timeout limits for the **HTTP Webhook** action, based on the logic app hosting option:
149
+
150
+
| Hosting option | Workflow type | Duration |
151
+
|----------------|---------------|----------|
152
+
| Consumption | Stateful | Up to 90 days. |
153
+
| Standard | Stateful | Up to 30 days. |
154
+
| Standard | Stateless | 5 minutes <br>(fixed limit) |
155
+
156
+
The **HTTP Webhook** action's callback URL becomes invalid when the following events happen:
157
+
158
+
- You cancel the workflow.
159
+
- You delete or disable the workflow or logic app resource.
160
+
- You rotate the workflow's access keys.
161
+
- The workflow times out.
162
+
163
+
For other HTTP limits, see [HTTP limits in Azure Logic Apps](../logic-apps/logic-apps-limits-and-config.md#http-request-limits).
164
+
165
+
#### Change timeout limit
166
+
167
+
To change this limit for the **HTTP Webhook** action in stateful workflows by using the Azure portal, see the [Timeout duration table for outbound HTTP requests](../logic-apps/logic-apps-limits-and-config.md#http-request-limits). Or, in the action's JSON definition, add the `limit.timeout` object, and set the value to the duration you want, for example:
0 commit comments