I’m creating my own trigger node (webhook) and I want to set some custom execution data when accepting a request.
From the documentation and n8n implementation, I found that Execution Node uses ctx.getWorkflowDataProxy(0)
to modify execution object. It seems that Trigger node itself doesn’t accept this method:
async webhook(context: IWebhookFunctions): Promise<IWebhookResponseData> {
console.log('🔔 Webhook request received');
const req = context.getRequestObject();
const bodyData = context.getBodyData();
const httpMethod = req.method?.toUpperCase() || 'POST';
// error here - only `execute` method accepts this
// const dataProxy = context.getWorkflowDataProxy(0);
}
Any workarounds?