n8n-nodes-cleverflow
Version:
n8n node to integrate with CleverFlow API for creating workflow runs and processing Tally Forms
22 lines • 860 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.execute = void 0;
const apiHelpers_1 = require("../helpers/apiHelpers");
async function execute(index) {
const workspaceName = this.getNodeParameter('workspaceId', index);
const workflowKey = this.getNodeParameter('workflowId', index);
const runName = this.getNodeParameter('runName', index, '');
const dynamicFields = this.getNodeParameter('dynamicDataFields', index);
const fields = dynamicFields.fields || [];
const body = {
workspace: workspaceName,
workflow_key: workflowKey,
data: fields,
};
if (runName) {
body.name = runName;
}
return (0, apiHelpers_1.makeApiRequest)(this, 'POST', '/public/create_run', body);
}
exports.execute = execute;
//# sourceMappingURL=create.js.map