n8n/packages/nodes-base/nodes/ExecuteWorkflow/methods/resourceMapping.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
562 B
TypeScript
Raw Normal View History

2024-11-25 14:33:43 -08:00
import type {
ILoadOptionsFunctions,
ResourceMapperField,
ResourceMapperFields,
} from 'n8n-workflow';
export async function getWorkflowInputs(
this: ILoadOptionsFunctions,
): Promise<ResourceMapperFields> {
// TODO: take the columns from the workflow input
const workflowInputs = ['uid', 'Test Field 2', 'Test Field 3'];
const fields: ResourceMapperField[] = workflowInputs.map((col) => ({
id: col,
displayName: col,
required: false,
defaultMatch: true,
2024-11-25 14:33:43 -08:00
display: true,
type: 'number',
2024-11-25 14:33:43 -08:00
canBeUsedToMatch: true,
}));
return { fields };
}