Skip to content

Commit 7414252

Browse files
authored
Merge pull request #141 from AlexaCRM/webhooksPowerAutomate
add webhook + power automate page
2 parents 3acdacd + 3fc768a commit 7414252

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

datapress/knowledge_base/devInfo/webhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Webhooks
33
sidebar_position: 1
4-
slug: /webhooks
4+
slug: /knowledge-base/webhooks
55
tags:
66
- DataPress
77
---
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Using Power Automate HTTP Webhook Trigger
3+
slug: /knowledge-base/http-webhook-trigger
4+
sidebar_position: 2
5+
tags:
6+
- Power Automate
7+
- Webhooks
8+
- Integration
9+
---
10+
11+
# Using Power Automate HTTP Webhook Trigger
12+
13+
Power Automate supports **HTTP Webhook triggers** through custom connectors, allowing flows to be triggered by external systems in real time. This article outlines two common scenarios:
14+
15+
- Creating a **dynamic webhook** on the fly
16+
- Registering a **fixed webhook** for known endpoints
17+
18+
## Scenario 1: Creating a Webhook on the Fly
19+
20+
In this approach, a webhook is **created dynamically** each time a request comes in. This is useful when the target site is not known in advance or changes frequently.
21+
22+
### How It Works
23+
24+
1. Power Automate receives a request (e.g., from a form or API).
25+
2. It extracts the **site URL** from the request body or headers.
26+
3. It sends a **POST** request to that site to register a webhook.
27+
4. Once the event is received and processed, the webhook is **deleted** (either automatically or manually).
28+
29+
## Scenario 2: Creating a Fixed Webhook
30+
If the target site is known in advance, you can configure a static webhook during connector setup. This is ideal for stable integrations with a single WordPress instance or API.
31+
This setup registers the webhook once and listens for events continuously until the flow is disabled or removed.
32+
33+
## Example Flow
34+
35+
- **Subscribe Method:** `POST`
36+
- **Subscribe URI:** `https://{dynamic-site}/wp-json/integration-cds/v1/webhooks`
37+
- **Subscribe Body:**
38+
39+
```json
40+
{
41+
"name": "Power Automate Create",
42+
"description": "Description",
43+
"topic": "form/create",
44+
"target": "@{listCallbackUrl()}",
45+
"form_type": "gravity",
46+
"form_id": "all"
47+
}
48+
```
49+
50+
- **Unsubscribe Method**: DELETE (optional, depending on the external system)
51+
52+
Power Automate will automatically attempt to unregister the webhook when the flow is disabled or deleted. However, we recommend verifying that the webhook has been removed manually.
53+
54+
## Best Practices
55+
56+
Always validate the callback URL `(@{listCallbackUrl()})` is correctly passed to the external system.
57+
58+
Use authentication (e.g., basic auth or API keys) when registering webhooks to prevent unauthorized access.
59+
60+
Monitor webhook lifecycle events and clean up unused registrations to avoid clutter or duplicate triggers.

docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const config: Config = {
101101
from: ['/integration-cds/user-binding'],
102102
},
103103
{
104-
to: '/webhooks',
104+
to: '/knowledge-base/webhooks',
105105
from: ['/integration-cds/webhooks'],
106106
},
107107
{

static/images/http-webhook.png

93.6 KB
Loading

0 commit comments

Comments
 (0)