@firefliesai/n8n-nodes-fireflies
Version:
An n8n integration for the Fireflies.ai API that enables workflow automation with meeting transcripts, analytics, summaries, and other conversation data from Fireflies.ai's AI meeting assistant.
63 lines • 2.61 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTranscriptsList = getTranscriptsList;
const transport_1 = require("../../transport");
const helpers_1 = require("../../helpers");
async function getTranscriptsList(ef, index) {
var _a;
try {
const limit = ef.getNodeParameter('limit', index, 50);
const skip = ef.getNodeParameter('skip', index, 0);
const filters = ef.getNodeParameter('filters', index, {});
const variables = {
limit,
skip,
};
if (filters.title)
variables.title = filters.title;
if (filters.date !== undefined)
variables.date = filters.date;
if (filters.fromDate)
variables.fromDate = filters.fromDate;
if (filters.toDate)
variables.toDate = filters.toDate;
if (filters.hostEmail)
variables.hostEmail = filters.hostEmail;
if (filters.organizerEmail)
variables.organizerEmail = filters.organizerEmail;
if (filters.participantEmail)
variables.participantEmail = filters.participantEmail;
if (filters.userId)
variables.userId = filters.userId;
if (filters.mine !== undefined)
variables.mine = filters.mine;
if (filters.keyword)
variables.keyword = filters.keyword;
if (filters.scope)
variables.scope = filters.scope;
if (filters.organizers) {
const organizers = filters.organizers.split(',').map((s) => s.trim()).filter(Boolean);
if (organizers.length > 0)
variables.organizers = organizers;
}
if (filters.participants) {
const participants = filters.participants.split(',').map((s) => s.trim()).filter(Boolean);
if (participants.length > 0)
variables.participants = participants;
}
if (filters.channelId)
variables.channelId = filters.channelId;
const response = await transport_1.callGraphQLApi.call(ef, helpers_1.getTranscriptsListQuery, variables);
return ((_a = response.transcripts) !== null && _a !== void 0 ? _a : []).map((transcript) => ({
json: {
success: true,
data: transcript,
},
}));
}
catch (error) {
const errorResponse = (0, helpers_1.handleOperationError)(ef.getNode(), error, ef.continueOnFail(), 'getTranscriptsList');
return [{ json: errorResponse }];
}
}
//# sourceMappingURL=getTranscriptsList.js.map