mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -7,6 +7,7 @@ import type {
|
||||
|
||||
import * as spreadsheet from './actions/spreadsheet.operation';
|
||||
import * as toBinary from './actions/toBinary.operation';
|
||||
import * as toText from './actions/toText.operation';
|
||||
import * as toJson from './actions/toJson.operation';
|
||||
import * as iCall from './actions/iCall.operation';
|
||||
|
||||
@@ -17,7 +18,7 @@ export class ConvertToFile implements INodeType {
|
||||
name: 'convertToFile',
|
||||
icon: 'file:convertToFile.svg',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
version: [1, 1.1],
|
||||
description: 'Convert JSON data to binary data',
|
||||
defaults: {
|
||||
name: 'Convert to File',
|
||||
@@ -67,6 +68,12 @@ export class ConvertToFile implements INodeType {
|
||||
action: 'Convert to RTF',
|
||||
description: 'Transform input data into a table in an RTF file',
|
||||
},
|
||||
{
|
||||
name: 'Convert to Text File',
|
||||
value: 'toText',
|
||||
action: 'Convert to text file',
|
||||
description: 'Transform input data string into a file',
|
||||
},
|
||||
{
|
||||
name: 'Convert to XLS',
|
||||
value: 'xls',
|
||||
@@ -90,6 +97,7 @@ export class ConvertToFile implements INodeType {
|
||||
},
|
||||
...spreadsheet.description,
|
||||
...toBinary.description,
|
||||
...toText.description,
|
||||
...toJson.description,
|
||||
...iCall.description,
|
||||
],
|
||||
@@ -112,6 +120,10 @@ export class ConvertToFile implements INodeType {
|
||||
returnData = await toBinary.execute.call(this, items);
|
||||
}
|
||||
|
||||
if (operation === 'toText') {
|
||||
returnData = await toText.execute.call(this, items);
|
||||
}
|
||||
|
||||
if (operation === 'iCal') {
|
||||
returnData = await iCall.execute.call(this, items);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user