mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Convert to File Node): Operation to convert a string in a plain text file, option to format JSON when creating file (#8620)
This commit is contained in:
@@ -52,6 +52,13 @@ export const properties: INodeProperties[] = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Format',
|
||||
name: 'format',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to format the JSON data for easier reading',
|
||||
},
|
||||
{
|
||||
displayName: 'Encoding',
|
||||
name: 'encoding',
|
||||
@@ -98,6 +105,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData
|
||||
mimeType: 'application/json',
|
||||
encoding: options.encoding as string,
|
||||
addBOM: options.addBOM as boolean,
|
||||
format: options.format as boolean,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -131,6 +139,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData
|
||||
fileName: options.fileName as string,
|
||||
encoding: options.encoding as string,
|
||||
addBOM: options.addBOM as boolean,
|
||||
format: options.format as boolean,
|
||||
mimeType: 'application/json',
|
||||
itemIndex: i,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user