first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled

This commit is contained in:
2026-03-17 16:22:57 +03:30
commit 3d5eaf9445
15349 changed files with 2847338 additions and 0 deletions
@@ -0,0 +1,20 @@
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import * as createEvent from '../../../ICalendar/createEvent.operation';
export const description: INodeProperties[] = updateDisplayOptions(
{
show: {
operation: ['iCal'],
},
},
createEvent.description,
);
export async function execute(this: IExecuteFunctions, items: INodeExecutionData[]) {
const returnData = await createEvent.execute.call(this, items);
return returnData;
}
@@ -0,0 +1,137 @@
import {
NodeOperationError,
type IExecuteFunctions,
type INodeExecutionData,
type INodeProperties,
} from 'n8n-workflow';
import type { JsonToSpreadsheetBinaryOptions, JsonToSpreadsheetBinaryFormat } from '@utils/binary';
import { convertJsonToSpreadsheetBinary } from '@utils/binary';
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
export const operations = ['csv', 'html', 'rtf', 'ods', 'xls', 'xlsx'];
export const properties: INodeProperties[] = [
{
displayName: 'Put Output File in Field',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
placeholder: 'e.g data',
hint: 'The name of the output binary field to put the file in',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add option',
default: {},
options: [
{
displayName: 'Compression',
name: 'compression',
type: 'boolean',
displayOptions: {
show: {
'/operation': ['xlsx', 'ods'],
},
},
default: false,
description: 'Whether to reduce the output file size',
},
{
displayName: 'Delimiter',
name: 'delimiter',
type: 'string',
displayOptions: {
show: {
'/operation': ['csv'],
},
},
default: ',',
description: 'The character to use to separate fields',
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
default: '',
description: 'Name of the output file',
},
{
displayName: 'Header Row',
name: 'headerRow',
type: 'boolean',
default: true,
description: 'Whether the first row of the file contains the header names',
},
{
displayName: 'Sheet Name',
name: 'sheetName',
type: 'string',
displayOptions: {
show: {
'/operation': ['ods', 'xls', 'xlsx'],
},
},
default: 'Sheet',
description: 'Name of the sheet to create in the spreadsheet',
placeholder: 'e.g. mySheet',
},
],
},
];
const displayOptions = {
show: {
operation: operations,
},
};
export const description = updateDisplayOptions(displayOptions, properties);
export async function execute(
this: IExecuteFunctions,
items: INodeExecutionData[],
operation: string,
) {
let returnData: INodeExecutionData[] = [];
const pairedItem = generatePairedItemData(items.length);
try {
const options = this.getNodeParameter('options', 0, {}) as JsonToSpreadsheetBinaryOptions;
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0, 'data');
const binaryData = await convertJsonToSpreadsheetBinary.call(
this,
items,
operation as JsonToSpreadsheetBinaryFormat,
options,
'File',
);
const newItem: INodeExecutionData = {
json: {},
binary: {
[binaryPropertyName]: binaryData,
},
pairedItem,
};
returnData = [newItem];
} catch (error) {
if (this.continueOnFail()) {
returnData.push({
json: {
error: error.message,
},
pairedItem,
});
} else {
throw new NodeOperationError(this.getNode(), error);
}
}
return returnData;
}
@@ -0,0 +1,159 @@
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import type { JsonToBinaryOptions } from '@utils/binary';
import { createBinaryFromJson } from '@utils/binary';
import { encodeDecodeOptions } from '@utils/descriptions';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
{
displayName: 'Base64 Input Field',
name: 'sourceProperty',
type: 'string',
default: '',
required: true,
placeholder: 'e.g data',
requiresDataPath: 'single',
description:
"The name of the input field that contains the base64 string to convert to a file. Use dot-notation for deep fields (e.g. 'level1.level2.currentKey').",
},
{
displayName: 'Put Output File in Field',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
placeholder: 'e.g data',
hint: 'The name of the output binary field to put the file in',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add option',
default: {},
options: [
{
displayName: 'Add Byte Order Mark (BOM)',
description:
'Whether to add special marker at the start of your text file. This marker helps some programs understand how to read the file correctly.',
name: 'addBOM',
displayOptions: {
show: {
encoding: ['utf8', 'cesu8', 'ucs2'],
},
},
type: 'boolean',
default: false,
},
{
displayName: 'Data Is Base64',
name: 'dataIsBase64',
type: 'boolean',
default: true,
description: 'Whether the data is already base64 encoded',
displayOptions: {
show: {
'@version': [1],
},
},
},
{
displayName: 'Encoding',
name: 'encoding',
type: 'options',
options: encodeDecodeOptions,
default: 'utf8',
description: 'Choose the character set to use to encode the data',
displayOptions: {
hide: {
dataIsBase64: [true],
'@version': [{ _cnd: { gt: 1 } }],
},
},
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
default: '',
placeholder: 'e.g. myFile',
description: 'Name of the output file',
},
{
displayName: 'MIME Type',
name: 'mimeType',
type: 'string',
default: '',
placeholder: 'e.g text/plain',
description:
'The MIME type of the output file. <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types" target="_blank">Common MIME types</a>.',
},
],
},
];
const displayOptions = {
show: {
operation: ['toBinary'],
},
};
export const description = updateDisplayOptions(displayOptions, properties);
export async function execute(this: IExecuteFunctions, items: INodeExecutionData[]) {
const returnData: INodeExecutionData[] = [];
const nodeVersion = this.getNode().typeVersion;
for (let i = 0; i < items.length; i++) {
try {
const options = this.getNodeParameter('options', i, {});
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i, 'data');
const sourceProperty = this.getNodeParameter('sourceProperty', i) as string;
let dataIsBase64 = true;
if (nodeVersion === 1) {
dataIsBase64 = options.dataIsBase64 !== false;
}
const jsonToBinaryOptions: JsonToBinaryOptions = {
sourceKey: sourceProperty,
fileName: options.fileName as string,
mimeType: options.mimeType as string,
dataIsBase64,
encoding: options.encoding as string,
addBOM: options.addBOM as boolean,
itemIndex: i,
};
const binaryData = await createBinaryFromJson.call(this, items[i].json, jsonToBinaryOptions);
const newItem: INodeExecutionData = {
json: {},
binary: {
[binaryPropertyName]: binaryData,
},
pairedItem: { item: i },
};
returnData.push(newItem);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({
json: {
error: error.message,
},
pairedItem: {
item: i,
},
});
continue;
}
throw new NodeOperationError(this.getNode(), error, { itemIndex: i });
}
}
return returnData;
}
@@ -0,0 +1,174 @@
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { createBinaryFromJson } from '@utils/binary';
import { encodeDecodeOptions } from '@utils/descriptions';
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
{
displayName: 'Mode',
name: 'mode',
type: 'options',
noDataExpression: true,
options: [
{
name: 'All Items to One File',
value: 'once',
},
{
name: 'Each Item to Separate File',
value: 'each',
},
],
default: 'once',
},
{
displayName: 'Put Output File in Field',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
placeholder: 'e.g data',
hint: 'The name of the output binary field to put the file in',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add option',
default: {},
options: [
{
displayName: 'Add Byte Order Mark (BOM)',
name: 'addBOM',
type: 'boolean',
default: false,
description:
'Whether to add special marker at the start of your text file. This marker helps some programs understand how to read the file correctly.',
displayOptions: {
show: {
encoding: ['utf8', 'cesu8', 'ucs2'],
},
},
},
{
displayName: 'Format',
name: 'format',
type: 'boolean',
default: false,
description: 'Whether to format the JSON data for easier reading',
},
{
displayName: 'Encoding',
name: 'encoding',
type: 'options',
options: encodeDecodeOptions,
default: 'utf8',
description: 'Choose the character set to use to encode the data',
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
default: '',
placeholder: 'e.g. myFile.json',
description: 'Name of the output file',
},
],
},
];
const displayOptions = {
show: {
operation: ['toJson'],
},
};
export const description = updateDisplayOptions(displayOptions, properties);
export async function execute(this: IExecuteFunctions, items: INodeExecutionData[]) {
let returnData: INodeExecutionData[] = [];
const mode = this.getNodeParameter('mode', 0, 'once') as string;
if (mode === 'once') {
const pairedItem = generatePairedItemData(items.length);
try {
const options = this.getNodeParameter('options', 0, {});
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0, 'data');
const binaryData = await createBinaryFromJson.call(
this,
items.map((item) => item.json),
{
fileName: options.fileName as string,
mimeType: 'application/json',
encoding: options.encoding as string,
addBOM: options.addBOM as boolean,
format: options.format as boolean,
},
);
const newItem: INodeExecutionData = {
json: {},
binary: {
[binaryPropertyName]: binaryData,
},
pairedItem,
};
returnData = [newItem];
} catch (error) {
if (this.continueOnFail()) {
returnData.push({
json: {
error: error.message,
},
pairedItem,
});
}
throw new NodeOperationError(this.getNode(), error);
}
} else {
for (let i = 0; i < items.length; i++) {
try {
const options = this.getNodeParameter('options', i, {});
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i, 'data');
const binaryData = await createBinaryFromJson.call(this, items[i].json, {
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,
});
const newItem: INodeExecutionData = {
json: {},
binary: {
[binaryPropertyName]: binaryData,
},
pairedItem: { item: i },
};
returnData.push(newItem);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({
json: {
error: error.message,
},
pairedItem: {
item: i,
},
});
continue;
}
throw new NodeOperationError(this.getNode(), error, { itemIndex: i });
}
}
}
return returnData;
}
@@ -0,0 +1,125 @@
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import type { JsonToBinaryOptions } from '@utils/binary';
import { createBinaryFromJson } from '@utils/binary';
import { encodeDecodeOptions } from '@utils/descriptions';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
{
displayName: 'Text Input Field',
name: 'sourceProperty',
type: 'string',
default: '',
required: true,
placeholder: 'e.g data',
requiresDataPath: 'single',
description:
"The name of the input field that contains a string to convert to a file. Use dot-notation for deep fields (e.g. 'level1.level2.currentKey').",
},
{
displayName: 'Put Output File in Field',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
placeholder: 'e.g data',
hint: 'The name of the output binary field to put the file in',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add option',
default: {},
options: [
{
displayName: 'Add Byte Order Mark (BOM)',
description:
'Whether to add special marker at the start of your text file. This marker helps some programs understand how to read the file correctly.',
name: 'addBOM',
displayOptions: {
show: {
encoding: ['utf8', 'cesu8', 'ucs2'],
},
},
type: 'boolean',
default: false,
},
{
displayName: 'Encoding',
name: 'encoding',
type: 'options',
options: encodeDecodeOptions,
default: 'utf8',
description: 'Choose the character set to use to encode the data',
},
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
default: '',
placeholder: 'e.g. myFile',
description: 'Name of the output file',
},
],
},
];
const displayOptions = {
show: {
operation: ['toText'],
},
};
export const description = updateDisplayOptions(displayOptions, properties);
export async function execute(this: IExecuteFunctions, items: INodeExecutionData[]) {
const returnData: INodeExecutionData[] = [];
for (let i = 0; i < items.length; i++) {
try {
const options = this.getNodeParameter('options', i, {});
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i, 'data');
const sourceProperty = this.getNodeParameter('sourceProperty', i) as string;
const jsonToBinaryOptions: JsonToBinaryOptions = {
sourceKey: sourceProperty,
fileName: (options.fileName as string) || 'file.txt',
mimeType: 'text/plain',
dataIsBase64: false,
encoding: options.encoding as string,
addBOM: options.addBOM as boolean,
itemIndex: i,
};
const binaryData = await createBinaryFromJson.call(this, items[i].json, jsonToBinaryOptions);
const newItem: INodeExecutionData = {
json: {},
binary: {
[binaryPropertyName]: binaryData,
},
pairedItem: { item: i },
};
returnData.push(newItem);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({
json: {
error: error.message,
},
pairedItem: {
item: i,
},
});
continue;
}
throw new NodeOperationError(this.getNode(), error, { itemIndex: i });
}
}
return returnData;
}