UNPKG

n8n-nodes-cleverflow

Version:

n8n node to integrate with CleverFlow API for creating workflow runs and processing Tally Forms

25 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeApiRequest = void 0; async function makeApiRequest(executeFunctions, method, url, body, query) { const credentials = await executeFunctions.getCredentials('cleverFlowApi'); const baseUrl = credentials.baseUrl ? `${credentials.baseUrl}/api` : 'https://api.cleverflow.com/api'; const timestamp = Date.now(); const urlWithCache = `${url}${url.includes('?') ? '&' : '?'}_nocache=${timestamp}`; return executeFunctions.helpers.httpRequest({ method, url: urlWithCache, baseURL: baseUrl, headers: { Authorization: `Token ${credentials.apiToken}`, 'Content-Type': 'application/json', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0' }, body, qs: query, }); } exports.makeApiRequest = makeApiRequest; //# sourceMappingURL=apiHelpers.js.map