n8n-nodes-cleverflow
Version:
n8n node to integrate with CleverFlow API for creating workflow runs and processing Tally Forms
21 lines • 889 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.execute = void 0;
const apiHelpers_1 = require("../helpers/apiHelpers");
async function execute(index) {
const runIdentifierType = this.getNodeParameter('runIdentifierType', index);
let url;
if (runIdentifierType === 'uid') {
const workspaceName = this.getNodeParameter('workspaceId', index);
const runUid = this.getNodeParameter('runUid', index);
const workspaceSlug = workspaceName.toLowerCase().replace(/[^a-z0-9]/g, "-");
url = `/workspaces/${workspaceSlug}/runs/${runUid}`;
}
else {
const runId = this.getNodeParameter('runId', index);
url = `/runs/${runId}`;
}
return (0, apiHelpers_1.makeApiRequest)(this, 'GET', url, undefined, undefined);
}
exports.execute = execute;
//# sourceMappingURL=get.js.map