Skip to content

SQL objects used by n8n ​

Derived from SQL nodes in the active n8n flows (stored procedures via EXEC, tables/views by name match). Full lists are in data/n8n-sql-xref.json.

Most-used stored procedures ​

ProcedureFlowsUsed by
spN8nGetPrimeRateLimitPercent70Adding Jobs to Peer Review Queue; AI peer Review 3.0; Amend Missing Schedules and Schedule Items; Discover and remove deleted invoices…
spEthTaskLockIsLocked27Booking Estimator Process Events; Booking KPI Alert - Run; Client WIP Updates - Process Queue; Email Queue - Send Prod…
spEthTaskLockClear26Booking Estimator Process Events; Booking KPI Alert - Run; Client WIP Updates - Process Queue; Email Queue - Send Prod…
spEthTaskLockInsert25Booking Estimator Process Events; Booking KPI Alert - Run; Client WIP Updates - Process Queue; Email Queue - Send Prod…
spEthSyncUpsertProgress21Prime Sync Accounts Payable Invoices by Date; Prime Sync Allocations by Date; Prime Sync Appointments by Date; Prime Sync AR Invoices by Date…
spEthSyncGetNextDates20Prime Sync Accounts Payable Invoices by Date; Prime Sync Allocations by Date; Prime Sync Appointments by Date; Prime Sync AR Invoices by Date…
spEthGetQueuedIDs11Amend Missing Schedules and Schedule Items; Prime Sync Queued Accounts Payable Invoices (Batched); Prime Sync Queued Allocations (Batched); Prime Sync Queued Allocations By ID…
spEthEmailMessageInsertHTMLWithAttachments5AI peer Review 3.0; Global Error Handler; Prime Create Reviewed Estimate; Prime Job Tag Sync - Immediate Failure Alert…
spEthSyncQueueDelete5Amend Missing Schedules and Schedule Items; Prime Sync Queued Accounts Payable Invoices (Batched); Prime Sync Queued Allocations (Batched); Prime Sync Queued Allocations…
spMakesafeQueueException5n8n Error Handler; Webhook ClickSend SMS Reply; Webhook ElevenLabs MakeSafe Call; Webhook ElevenLabs Message…
spPrimeUpsertHistoryPage5Prime Sync History - 6 Hourly; Prime Sync History - Daily; Prime Sync History - Hourly Estimator Payables; Prime Sync History - Hourly Receivables…
spEthSyncGetNextDatesByGroup5Prime Sync History - 6 Hourly; Prime Sync History - Daily; Prime Sync History - Hourly Estimator Payables; Prime Sync History - Hourly Receivables…
spEthSyncRecordWindowOutcome5Prime Sync History - 6 Hourly; Prime Sync History - Daily; Prime Sync History - Hourly Estimator Payables; Prime Sync History - Hourly Receivables…
spEthEmailMessageInsertHtml4AI Peer Review - Error Handler; Keep MFA Store Up-to-date (Email + Phone) v2; MakeSafe Payroll Weekly Schedule; MakeSafe Weekly Schedule Summary
spPrimeUpsertJob4Prime Job Email Sync; Prime Sync Jobs by Date; Prime Sync Queued Jobs (Batched); Prime Sync Resync Jobs
spPrimeUpsertAllocation4Prime Sync Allocations by Date; Prime Sync Queued Allocations (Batched); Prime Sync Queued Allocations By ID; Prime Sync Queued Allocations
spEthTaskInsert3Adding Jobs to Peer Review Queue; Peer Review Queue from Status Webhooks; Quote Submission Automation
spMakesafeInsertPhoneCall3ENData Request for Service Email; Sedgwick Repairline Make Safe Email; Webhook ElevenLabs MakeSafe Call
spMakesafeQueuePhoneCallSMSMessages3ENData Request for Service Email; Sedgwick Repairline Make Safe Email; Webhook ElevenLabs MakeSafe Call
spMakesafeUpsertPhoneCallFromPrimeJob3Make Safe Queued Allocation Checks; Prime Job Email Sync; Prime Sync Jobs by Date
spElevenLabsInsertConversation3Webhook ElevenLabs MakeSafe Call; Webhook ElevenLabs Message; Webhook Twillio Failure Message
spEthTaskGetNext2Adding Jobs to Peer Review Queue; Make Safe Queued Allocation Checks
spEthTaskClaimNext2AI peer Review 3.0; Make Safe Queued Allocation Checks
spPrimePeerReviewEstimatedetails2AI peer Review 3.0; Peer Review - Predefined Suggestion
spEthTaskComplete2AI peer Review 3.0; Quote Submission Automation
args2Amend Missing Schedules and Schedule Items; Prime Sync Schedules by Date
spPrimeUpsertSchedule2Amend Missing Schedules and Schedule Items; Prime Sync Schedules by Date
spPrimeUpsertScheduleItem2Amend Missing Schedules and Schedule Items; Prime Sync Schedules by Date
spEthEmailMessageGetQueue2Email Queue - Send Prod; Email Queue - Send Test
spEthEmailMessageMarkSent2Email Queue - Send Prod; Email Queue - Send Test
spEthEmailMessageGetAttachment2Email Queue - Send Prod; Email Queue - Send Test
spEthEmailMessageMarkFailed2Email Queue - Send Prod; Email Queue - Send Test
spEthTaskGetCount2Endata Quote Rates - Process Queue; Task Queue - Depth API
spIsOutsideBusinessHours2ENData Request for Service Email; Sedgwick Repairline Make Safe Email
spEthEmailMessageInsertText2Hudu Backup Email Alert; Webhook ElevenLabs Message
spMakesafeGetUserScheduleWeeklySummary2MakeSafe Payroll Weekly Schedule; MakeSafe Weekly Schedule Summary
stored2prime DataCentre Email - Attachment SWMS Count; prime DataCentre Email - Conversion Report
spEthSyncQueueMissingObjectsByJobID2Prime Job Email Sync; Prime Sync Jobs by Date
spPrimeUpsertAccountsPayableInvoice2Prime Sync Accounts Payable Invoices by Date; Prime Sync Queued Accounts Payable Invoices (Batched)
spPrimeUpsertEstimateTemplateItem2Prime Sync Estimate Template Items - Ethos Only; Prime Sync Estimate Template Items and Overrides

Most-used tables and views ​

ObjectFlowsUsed by
ethSyncSchedule37Prime Sync Accounts Payable Invoices by Date; Prime Sync Allocations by Date; Prime Sync AllocationStatuses; Prime Sync Appointments by Date…
primeJobs10AI peer Review 3.0; Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; PC Build - Start from Assessment Report…
ethTask5Adding Jobs to Peer Review Queue; AI peer Review 3.0; Peer Review Queue from Status Webhooks; Quote Submission Automation…
primeSiteForms5Endata Scope Email at Estimate Approved for Submission; PC Build - Start from Assessment Report; Peer Review Queue from Status Webhooks; Report Freshness Check…
primeUsers4AI peer Review 3.0; Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; PC Build - Write Form
primeContacts4AI peer Review 3.0; Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; Quote Submission Automation
primeStatuses4Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; PC Build - Start from Assessment Report; Peer Review Queue from Status Webhooks
primejobs3Adding Jobs to Peer Review Queue; AI peer Review 3.0; Report Freshness Check
EthPeerReviewStatus3AI peer Review 3.0; Report Freshness Check; Scheduled Report Refresh
EthPeerReviewCatalogueRun3AI peer Review 3.0; Peer Review - Predefined Suggestion; Report Freshness Check
ethPrimeWebhookLog3Endata Scope Email at Estimate Approved for Submission; PC Build - Start from Assessment Report; Peer Review Queue from Status Webhooks
primeSiteFormItems3Endata Scope Email at Estimate Approved for Submission; Report Freshness Check; SWMS Stage Three Judgement
ethEmailMessage3Endata Scope Email at Estimate Approved for Submission; Report Freshness Check; SWMS Daily Decision Report
EthMFAOtpAccounts3Get Current OTP Code; Register OTP Account; Remove OTP Account
EthSwmsWorkOrderDecision3Report Freshness Check; SWMS Daily Decision Report; SWMS Stage Three Judgement
ethWorkQueue_Preview3Work queue - Dead letter digest; Work queue - Prime budget; Work queue - Settle
primeEstimateTemplateItems2AI peer Review 3.0; Peer Review - Predefined Suggestion
primeNonPredefinedItemLog2AI peer Review 3.0; Peer Review - Predefined Suggestion
EthCHUTradeMap2Endata Scope Email at Estimate Approved for Submission; Quote Submission Automation
EthCHUUnitAlias2Endata Scope Email at Estimate Approved for Submission; Quote Submission Automation
EthEstimateLineCatalogueMatch2Eth Catalogue Reporting Refresh (nightly); Report Freshness Check
EthCatalogueItemUsage2Eth Catalogue Reporting Refresh (nightly); Report Freshness Check
EthEstimateCatalogueSummary2Eth Catalogue Reporting Refresh (nightly); Report Freshness Check
EthMFAAsAService2Get Latest MFA Code For Service; Keep MFA Store Up-to-date (Email + Phone) v2
primeEstimates2PC Build - Draft Form; Peer Review Queue from Status Webhooks
EthPcBuildTemplateField2PC Build - Draft Form; PC Build - Write Form
EthPcBuildRun2PC Build - Start from Assessment Report; PC Build - Write Form
EthAGTemplateWordingCodes2Prime Create Reviewed Estimate; Report Freshness Check
EthEstimatorOpenJobs2Prime Job Tag Sync - Estimator Job Type; Report Freshness Check
EthEstimatorQuoteLife2Prime Job Tag Sync - Estimator Job Type; Report Freshness Check
primeWorkOrders2SWMS Daily Decision Report; SWMS Stage Three Judgement
EthSwmsStage3Judgement2SWMS Daily Decision Report; SWMS Stage Three Judgement
primeWorkOrderItems2SWMS Daily Decision Report; SWMS Stage Three Judgement
ethWorkQueueMessage_Preview2Work queue - Dead letter digest; Work queue - Settle
EthCatalogueCandidateDecision1AI peer Review 3.0
primeinvoicecheck1Discover and remove deleted invoices
primeAccountsReceivableInvoices1Discover and remove deleted invoices
primeScheduleItemCheck1Discover and remove deleted schedule items (Batched)
ethFileTemplate1Endata Scope Email at Estimate Approved for Submission
endataLocations1Endata Scope Email at Estimate Approved for Submission