import { IExecuteFunctions } from 'n8n-core' ; import { INodeExecutionData , INodeType , INodeTypeDescription , } from 'n8n-workflow' ; export class ExampleNode implements INodeType { description : INodeTypeDescription = { displayName : 'Example Node' , name : 'exampleNode' , group : [ 'transform' ] , version : 1 , description : 'Basic Example Node' , defaults : { name : 'Example Node' , color : '#772244' , } , inputs : [ 'main' ] , outputs : [ 'main' ] , properties : [ { displayName : 'My String' , name : 'myString' , type : 'string' , default : '' , placeholder : 'Placeholder value' , description : 'The description text' , } ] } ; async execute ( this ) { const items = this . getInputData ( ) ; let item ; let myString ; for ( let itemIndex = 0 ; itemIndex < items . length ; itemIndex ++ ) { myString = this . getNodeParameter ( 'myString' , itemIndex , '' ) as string ; item = items [ itemIndex ] ; item . json [ 'myString' ] = myString ; } return this . prepareOutputData ( items ) ; } }