diff --git a/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte b/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte
index f2a52088ad..54e6b2dbbf 100644
--- a/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte
+++ b/packages/builder/src/components/automation/AutomationPanel/BlockList/AutomationBlock.svelte
@@ -1,6 +1,6 @@
-
+
- copyToClipboard()}>
+ copyToClipboard()}>
diff --git a/packages/server/src/api/controllers/webhook.js b/packages/server/src/api/controllers/webhook.js
index a593133a47..c759105fed 100644
--- a/packages/server/src/api/controllers/webhook.js
+++ b/packages/server/src/api/controllers/webhook.js
@@ -87,7 +87,13 @@ exports.trigger = async ctx => {
validate(ctx.request.body, webhook.bodySchema)
const target = await db.get(webhook.action.target)
if (webhook.action.type === exports.WebhookType.AUTOMATION) {
- await triggers.externalTrigger(target, ctx.request.body)
+ // trigger with both the pure request and then expand it
+ // incase the user has produced a schema to bind to
+ await triggers.externalTrigger(target, {
+ body: ctx.request.body,
+ ...ctx.request.body,
+ instanceId: ctx.params.instance,
+ })
}
ctx.status = 200
ctx.body = "Webhook trigger fired successfully"
diff --git a/packages/server/src/automations/triggers.js b/packages/server/src/automations/triggers.js
index 4870cfd051..6dd163ea8e 100644
--- a/packages/server/src/automations/triggers.js
+++ b/packages/server/src/automations/triggers.js
@@ -108,8 +108,13 @@ const BUILTIN_DEFINITIONS = {
required: ["schemaUrl", "triggerUrl"],
},
outputs: {
- properties: {},
- required: [],
+ properties: {
+ body: {
+ type: "object",
+ description: "Body of the request which hit the webhook",
+ },
+ },
+ required: ["body"],
},
},
type: "TRIGGER",