import { definePostInstallLogicFunction } from 'twenty-sdk/define'; import { GRANOLA_BACKFILL_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers'; import { granolaBackfillHandler } from 'src/logic-functions/handlers/granola-backfill-handler'; export default definePostInstallLogicFunction({ universalIdentifier: GRANOLA_BACKFILL_LOGIC_FUNCTION_UNIVERSAL_IDENTIFIER, name: 'granola-backfill', description: 'On install, backfills the last 30 days of Granola meetings: upserts a Note + NoteTargets on participants and a CallRecording with the summary and transcript for each meeting.', timeoutSeconds: 300, shouldRunOnVersionUpgrade: true, handler: granolaBackfillHandler, });