Giter Club home page Giter Club logo

Comments (3)

Joffcom avatar Joffcom commented on September 13, 2024

Hey @ybom77,

We have created an internal ticket to look into this which we will be tracking as "GHC-225"

from n8n.

Joffcom avatar Joffcom commented on September 13, 2024

Hey @ybom77

Quickly looking at this it is likely to be an issue with the code being used in the custom node rather than an issue with n8n itself.

The form trigger node I created which is based on the webhook node appears to be working correctly still.

Can you share a link to your node so we can take a look?

from n8n.

ybom77 avatar ybom77 commented on September 13, 2024

@Joffcom Thanks for your reply, this is my node

import type {INodeType, INodeTypeDescription, IWebhookFunctions, IWebhookResponseData} from "n8n-workflow";

export class AppWebhookTrigger implements INodeType {
	description: INodeTypeDescription = {
		defaults: {
			name: 'app webhook'
		},
		displayName: 'app webhook Trigger',
		description: 'app webhook',
		name: 'weixinMpTrigger',
		inputs: [],
		outputs: ['main'],
		group: ['trigger'],
		version: 1,
		properties: [
			{
				displayName: 'Event',
				name: 'event',
				type: 'options',
				noDataExpression: true,
				options: [{
					displayName: "path1",
					name: 'Path1',
					value: "text"
				}, {
					displayName: "path2",
					name: "Path2",
					value: "image"
				}, {
					displayName: "path3",
					name: "Path3",
					value: "voice"
				}],
				default: 'text'
			}
		],
		webhooks: [
			{
				name: 'default',
				httpMethod: 'POST',
				responseMode: 'onReceived',
				path: '={{$parameter["event"]',
			}
		]
	}

	async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
		const requestBody = this.getRequestObject().body || {}
		return {
			workflowData: [
				[
					{
						json: requestBody
					}
				]
			],
			webhookResponse: "success"
		}
	}
}


from n8n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.