n8n-nodes-elearning-magic 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -10,12 +10,12 @@ npm install n8n-nodes-elearning-magic
|
|
|
10
10
|
Restart n8n after install.
|
|
11
11
|
|
|
12
12
|
## Configure
|
|
13
|
-
1) Add the **eLearning Magic
|
|
14
|
-
2) Set a unique **Webhook Path**.
|
|
15
|
-
3) Create an **eLearning Magic Signing Secret** credential with your
|
|
13
|
+
1) Add the **eLearning Magic** trigger node.
|
|
14
|
+
2) Set a unique **Webhook Path**. After you save/activate, the node shows copyable Test/Production URLs (like the n8n Webhook node).
|
|
15
|
+
3) Create an **eLearning Magic Signing Secret** credential with your secret.
|
|
16
16
|
4) (Optional) Set a **Node ID** and enable **Enforce Node ID Match**.
|
|
17
|
-
5) Copy the webhook URL from the node and paste it into the eLearning Magic app when creating
|
|
18
|
-
6) Activate the workflow. Incoming events
|
|
17
|
+
5) Copy the webhook URL from the node and paste it into the eLearning Magic app when creating a connection (use the same secret and Node ID).
|
|
18
|
+
6) Activate the workflow. Incoming events appear with request body, headers, query, and meta flags for signature/Node ID checks.
|
|
19
19
|
|
|
20
20
|
## Headers expected
|
|
21
21
|
- `X-EM-Signature`: HMAC-SHA256 of the raw body using your signing secret.
|
|
@@ -19,14 +19,14 @@ const safeCompare = (a, b) => {
|
|
|
19
19
|
class ElearningMagicTrigger {
|
|
20
20
|
constructor() {
|
|
21
21
|
this.description = {
|
|
22
|
-
displayName: 'eLearning Magic
|
|
22
|
+
displayName: 'eLearning Magic',
|
|
23
23
|
name: 'elearningMagicTrigger',
|
|
24
24
|
icon: 'fa:magic',
|
|
25
25
|
group: ['trigger'],
|
|
26
26
|
version: 1,
|
|
27
27
|
description: 'Receive SCORM wrapper payloads from eLearning Magic via a signed webhook',
|
|
28
28
|
defaults: {
|
|
29
|
-
name: 'eLearning Magic
|
|
29
|
+
name: 'eLearning Magic',
|
|
30
30
|
},
|
|
31
31
|
subtitle: '={{$parameter["path"]}}',
|
|
32
32
|
inputs: [],
|
|
@@ -43,6 +43,7 @@ class ElearningMagicTrigger {
|
|
|
43
43
|
httpMethod: 'POST',
|
|
44
44
|
responseMode: 'onReceived',
|
|
45
45
|
path: '={{$parameter["path"]}}',
|
|
46
|
+
isFullPath: true,
|
|
46
47
|
restartWebhook: true,
|
|
47
48
|
},
|
|
48
49
|
],
|