Skip to content

Commit 5fb8a1c

Browse files
committed
add http trigger guides
1 parent fa73dd8 commit 5fb8a1c

File tree

9 files changed

+67
-42
lines changed

9 files changed

+67
-42
lines changed

reports/llms-report.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"startedAt": "2025-11-11T01:58:33.890Z",
2+
"startedAt": "2025-11-11T12:13:25.939Z",
33
"siteBase": "https://docs.chain.link",
44
"sections": [
55
{
66
"section": "cre-go",
77
"pagesProcessed": 84,
88
"outputPath": "src/content/cre/llms-full-go.txt",
9-
"bytes": 631871,
9+
"bytes": 632196,
1010
"prevBytes": 631871,
11-
"deltaBytes": 0
11+
"deltaBytes": 325
1212
},
1313
{
1414
"section": "cre-ts",
1515
"pagesProcessed": 79,
1616
"outputPath": "src/content/cre/llms-full-ts.txt",
17-
"bytes": 587337,
17+
"bytes": 587662,
1818
"prevBytes": 587337,
19-
"deltaBytes": 0
19+
"deltaBytes": 325
2020
},
2121
{
2222
"section": "vrf",
@@ -123,5 +123,5 @@
123123
"deltaBytes": 0
124124
}
125125
],
126-
"finishedAt": "2025-11-11T01:58:38.894Z"
126+
"finishedAt": "2025-11-11T12:13:30.721Z"
127127
}

src/content/cre/guides/workflow/using-triggers/http-trigger/configuration-go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func InitWorkflow(config *Config, logger *slog.Logger, secretsProvider cre.Secre
7878
- **`Type`**: Must be `http.KeyType_KEY_TYPE_ECDSA_EVM` (currently the only supported authentication method)
7979
- **Multiple keys**: You can include multiple authorized addresses in the slice
8080

81-
When an HTTP request is made to your workflow's endpoint, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
81+
When an HTTP request is made to trigger your workflow, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
8282

8383
## Callback and payload
8484

src/content/cre/guides/workflow/using-triggers/http-trigger/configuration-ts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ main()
7575
- **`type`**: Must be `"KEY_TYPE_ECDSA_EVM"` (currently the only supported authentication method)
7676
- **Multiple keys**: You can include multiple authorized addresses in the array
7777

78-
When an HTTP request is made to your workflow's endpoint, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
78+
When an HTTP request is made to trigger your workflow, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
7979

8080
## Callback and payload
8181

src/content/cre/guides/workflow/using-triggers/http-trigger/overview-go.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ When you deploy a workflow with an HTTP trigger:
2020

2121
1. **External systems send HTTP POST requests** to a CRE gateway
2222
1. **The request specifies your workflow ID** in the JSON-RPC body along with the input payload
23-
1. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address
23+
1. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address in the target workflow
2424
1. **CRE validates the signature** against your configured `authorizedKeys`
2525
1. **If authorized**, your workflow callback executes with the request payload
2626

@@ -37,7 +37,7 @@ HTTP triggers are ideal for:
3737
- **Webhook integration**: Receive events from external services (GitHub, payment processors, etc.)
3838
- **On-demand execution**: Allow users or systems to trigger specific workflow logic when needed
3939
- **API gateway patterns**: Create authenticated endpoints that execute blockchain operations
40-
- **Event bridging**: Connect web2 events to web3 workflows
40+
- **Event bridging**: Connect offchain systems events to workflows
4141

4242
## The complete HTTP trigger journey
4343

src/content/cre/guides/workflow/using-triggers/http-trigger/overview-ts.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ When you deploy a workflow with an HTTP trigger:
2020

2121
1. **External systems send HTTP POST requests** to a CRE gateway
2222
1. **The request specifies your workflow ID** in the JSON-RPC body along with the input payload
23-
1. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address
23+
1. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address in the target workflow
2424
1. **CRE validates the signature** against your configured `authorizedKeys`
2525
1. **If authorized**, your workflow callback executes with the request payload
2626

@@ -37,7 +37,7 @@ HTTP triggers are ideal for:
3737
- **Webhook integration**: Receive events from external services (GitHub, payment processors, etc.)
3838
- **On-demand execution**: Allow users or systems to trigger specific workflow logic when needed
3939
- **API gateway patterns**: Create authenticated endpoints that execute blockchain operations
40-
- **Event bridging**: Connect web2 events to web3 workflows
40+
- **Event bridging**: Connect offchain systems events to workflows
4141

4242
## The complete HTTP trigger journey
4343

src/content/cre/guides/workflow/using-triggers/http-trigger/testing-in-simulation.mdx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --htt
8888

8989
For complex payloads or reusable test data, store your JSON in a file and reference it in non-interactive mode.
9090

91-
**Create a payload file** in your project root (the directory where you run `cre workflow simulate`):
91+
**Option 1: File in workflow folder**
9292

93-
**`test-payload.json`:**
93+
Create the payload file in your workflow directory:
94+
95+
**`my-http-workflow/test-payload.json`:**
9496

9597
```json
9698
{
@@ -104,18 +106,25 @@ For complex payloads or reusable test data, store your JSON in a file and refere
104106
}
105107
```
106108

107-
**Simulate with file input:**
109+
**Simulate:**
108110

109111
```bash
110112
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload test-payload.json --target staging-settings
111113
```
112114

113-
You can also use the `@` prefix:
115+
**Option 2: File at project root**
116+
117+
Create the payload file at your project root. Simulate (using `../` to reference the parent directory):
114118

115119
```bash
116-
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload @test-payload.json --target staging-settings
120+
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload ../test-payload.json --target staging-settings
117121
```
118122

123+
<Aside type="note" title="File paths are relative to the workflow folder">
124+
The CLI resolves file paths relative to the **workflow folder** you're simulating. Use just the filename for files in
125+
the workflow folder, or `../filename.json` for files at the project root.
126+
</Aside>
127+
119128
## Example workflow simulation
120129

121130
Let's simulate a complete workflow that processes HTTP requests.

src/content/cre/guides/workflow/using-triggers/http-trigger/triggering-deployed-workflows.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ Content-Type: application/json
7474
Authorization: Bearer <JWT_TOKEN>
7575
7676
{
77-
"jsonrpc": "2.0",
7877
"id": "unique-request-id",
78+
"jsonrpc": "2.0",
7979
"method": "workflows.execute",
8080
"params": {
8181
"input": {

src/content/cre/llms-full-go.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,11 @@ cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --htt
10491049

10501050
For complex payloads or reusable test data, store your JSON in a file and reference it in non-interactive mode.
10511051

1052-
**Create a payload file** in your project root (the directory where you run `cre workflow simulate`):
1052+
**Option 1: File in workflow folder**
10531053

1054-
**`test-payload.json`:**
1054+
Create the payload file in your workflow directory:
1055+
1056+
**`my-http-workflow/test-payload.json`:**
10551057

10561058
```json
10571059
{
@@ -1065,18 +1067,25 @@ For complex payloads or reusable test data, store your JSON in a file and refere
10651067
}
10661068
```
10671069

1068-
**Simulate with file input:**
1070+
**Simulate:**
10691071

10701072
```bash
10711073
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload test-payload.json --target staging-settings
10721074
```
10731075

1074-
You can also use the `@` prefix:
1076+
**Option 2: File at project root**
1077+
1078+
Create the payload file at your project root. Simulate (using `../` to reference the parent directory):
10751079

10761080
```bash
1077-
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload @test-payload.json --target staging-settings
1081+
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload ../test-payload.json --target staging-settings
10781082
```
10791083

1084+
<Aside type="note" title="File paths are relative to the workflow folder">
1085+
The CLI resolves file paths relative to the **workflow folder** you're simulating. Use just the filename for files in
1086+
the workflow folder, or `../filename.json` for files at the project root.
1087+
</Aside>
1088+
10801089
## Example workflow simulation
10811090

10821091
Let's simulate a complete workflow that processes HTTP requests.
@@ -1328,8 +1337,8 @@ Content-Type: application/json
13281337
Authorization: Bearer <JWT_TOKEN>
13291338

13301339
{
1331-
"jsonrpc": "2.0",
13321340
"id": "unique-request-id",
1341+
"jsonrpc": "2.0",
13331342
"method": "workflows.execute",
13341343
"params": {
13351344
"input": {
@@ -12108,7 +12117,7 @@ func InitWorkflow(config *Config, logger *slog.Logger, secretsProvider cre.Secre
1210812117
- **`Type`**: Must be `http.KeyType_KEY_TYPE_ECDSA_EVM` (currently the only supported authentication method)
1210912118
- **Multiple keys**: You can include multiple authorized addresses in the slice
1211012119

12111-
When an HTTP request is made to your workflow's endpoint, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
12120+
When an HTTP request is made to trigger your workflow, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
1211212121

1211312122
## Callback and payload
1211412123

@@ -12154,12 +12163,11 @@ The HTTP trigger allows external systems to initiate your workflow execution by
1215412163

1215512164
When you deploy a workflow with an HTTP trigger:
1215612165

12157-
1. **Your workflow receives a unique endpoint** managed by the CRE gateway
12158-
2. **External systems send HTTP requests** with JSON payloads to this endpoint
12159-
3. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address
12166+
1. **External systems send HTTP POST requests** to a CRE gateway
12167+
2. **The request specifies your workflow ID** in the JSON-RPC body along with the input payload
12168+
3. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address in the target workflow
1216012169
4. **CRE validates the signature** against your configured `authorizedKeys`
1216112170
5. **If authorized**, your workflow callback executes with the request payload
12162-
6. **Your callback's return value** becomes the HTTP response sent back to the requester
1216312171

1216412172
<Aside type="note" title="Security by design">
1216512173
For **deployed workflows**, HTTP triggers use cryptographic signatures to ensure only authorized addresses can execute
@@ -12174,7 +12182,7 @@ HTTP triggers are ideal for:
1217412182
- **Webhook integration**: Receive events from external services (GitHub, payment processors, etc.)
1217512183
- **On-demand execution**: Allow users or systems to trigger specific workflow logic when needed
1217612184
- **API gateway patterns**: Create authenticated endpoints that execute blockchain operations
12177-
- **Event bridging**: Connect web2 events to web3 workflows
12185+
- **Event bridging**: Connect offchain systems events to workflows
1217812186

1217912187
## The complete HTTP trigger journey
1218012188

src/content/cre/llms-full-ts.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,9 +1049,11 @@ cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --htt
10491049

10501050
For complex payloads or reusable test data, store your JSON in a file and reference it in non-interactive mode.
10511051

1052-
**Create a payload file** in your project root (the directory where you run `cre workflow simulate`):
1052+
**Option 1: File in workflow folder**
10531053

1054-
**`test-payload.json`:**
1054+
Create the payload file in your workflow directory:
1055+
1056+
**`my-http-workflow/test-payload.json`:**
10551057

10561058
```json
10571059
{
@@ -1065,18 +1067,25 @@ For complex payloads or reusable test data, store your JSON in a file and refere
10651067
}
10661068
```
10671069

1068-
**Simulate with file input:**
1070+
**Simulate:**
10691071

10701072
```bash
10711073
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload test-payload.json --target staging-settings
10721074
```
10731075

1074-
You can also use the `@` prefix:
1076+
**Option 2: File at project root**
1077+
1078+
Create the payload file at your project root. Simulate (using `../` to reference the parent directory):
10751079

10761080
```bash
1077-
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload @test-payload.json --target staging-settings
1081+
cre workflow simulate my-http-workflow --non-interactive --trigger-index 0 --http-payload ../test-payload.json --target staging-settings
10781082
```
10791083

1084+
<Aside type="note" title="File paths are relative to the workflow folder">
1085+
The CLI resolves file paths relative to the **workflow folder** you're simulating. Use just the filename for files in
1086+
the workflow folder, or `../filename.json` for files at the project root.
1087+
</Aside>
1088+
10801089
## Example workflow simulation
10811090

10821091
Let's simulate a complete workflow that processes HTTP requests.
@@ -1316,8 +1325,8 @@ Content-Type: application/json
13161325
Authorization: Bearer <JWT_TOKEN>
13171326

13181327
{
1319-
"jsonrpc": "2.0",
13201328
"id": "unique-request-id",
1329+
"jsonrpc": "2.0",
13211330
"method": "workflows.execute",
13221331
"params": {
13231332
"input": {
@@ -11025,7 +11034,7 @@ main()
1102511034
- **`type`**: Must be `"KEY_TYPE_ECDSA_EVM"` (currently the only supported authentication method)
1102611035
- **Multiple keys**: You can include multiple authorized addresses in the array
1102711036

11028-
When an HTTP request is made to your workflow's endpoint, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
11037+
When an HTTP request is made to trigger your workflow, CRE verifies that the request was signed by a private key corresponding to one of the authorized addresses.
1102911038

1103011039
## Callback and payload
1103111040

@@ -11070,12 +11079,11 @@ The HTTP trigger allows external systems to initiate your workflow execution by
1107011079

1107111080
When you deploy a workflow with an HTTP trigger:
1107211081

11073-
1. **Your workflow receives a unique endpoint** managed by the CRE gateway
11074-
2. **External systems send HTTP requests** with JSON payloads to this endpoint
11075-
3. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address
11082+
1. **External systems send HTTP POST requests** to a CRE gateway
11083+
2. **The request specifies your workflow ID** in the JSON-RPC body along with the input payload
11084+
3. **Requests must be cryptographically signed** using a private key corresponding to an authorized EVM address in the target workflow
1107611085
4. **CRE validates the signature** against your configured `authorizedKeys`
1107711086
5. **If authorized**, your workflow callback executes with the request payload
11078-
6. **Your callback's return value** becomes the HTTP response sent back to the requester
1107911087

1108011088
<Aside type="note" title="Security by design">
1108111089
For **deployed workflows**, HTTP triggers use cryptographic signatures to ensure only authorized addresses can execute
@@ -11090,7 +11098,7 @@ HTTP triggers are ideal for:
1109011098
- **Webhook integration**: Receive events from external services (GitHub, payment processors, etc.)
1109111099
- **On-demand execution**: Allow users or systems to trigger specific workflow logic when needed
1109211100
- **API gateway patterns**: Create authenticated endpoints that execute blockchain operations
11093-
- **Event bridging**: Connect web2 events to web3 workflows
11101+
- **Event bridging**: Connect offchain systems events to workflows
1109411102

1109511103
## The complete HTTP trigger journey
1109611104

0 commit comments

Comments
 (0)