Appearance
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
| Procedure | Flows | Used by |
|---|---|---|
| spN8nGetPrimeRateLimitPercent | 70 | Adding Jobs to Peer Review Queue; AI peer Review 3.0; Amend Missing Schedules and Schedule Items; Discover and remove deleted invoices… |
| spEthTaskLockIsLocked | 27 | Booking Estimator Process Events; Booking KPI Alert - Run; Client WIP Updates - Process Queue; Email Queue - Send Prod… |
| spEthTaskLockClear | 26 | Booking Estimator Process Events; Booking KPI Alert - Run; Client WIP Updates - Process Queue; Email Queue - Send Prod… |
| spEthTaskLockInsert | 25 | Booking Estimator Process Events; Booking KPI Alert - Run; Client WIP Updates - Process Queue; Email Queue - Send Prod… |
| spEthSyncUpsertProgress | 21 | Prime Sync Accounts Payable Invoices by Date; Prime Sync Allocations by Date; Prime Sync Appointments by Date; Prime Sync AR Invoices by Date… |
| spEthSyncGetNextDates | 20 | Prime Sync Accounts Payable Invoices by Date; Prime Sync Allocations by Date; Prime Sync Appointments by Date; Prime Sync AR Invoices by Date… |
| spEthGetQueuedIDs | 11 | Amend Missing Schedules and Schedule Items; Prime Sync Queued Accounts Payable Invoices (Batched); Prime Sync Queued Allocations (Batched); Prime Sync Queued Allocations By ID… |
| spEthEmailMessageInsertHTMLWithAttachments | 5 | AI peer Review 3.0; Global Error Handler; Prime Create Reviewed Estimate; Prime Job Tag Sync - Immediate Failure Alert… |
| spEthSyncQueueDelete | 5 | Amend Missing Schedules and Schedule Items; Prime Sync Queued Accounts Payable Invoices (Batched); Prime Sync Queued Allocations (Batched); Prime Sync Queued Allocations… |
| spMakesafeQueueException | 5 | n8n Error Handler; Webhook ClickSend SMS Reply; Webhook ElevenLabs MakeSafe Call; Webhook ElevenLabs Message… |
| spPrimeUpsertHistoryPage | 5 | Prime Sync History - 6 Hourly; Prime Sync History - Daily; Prime Sync History - Hourly Estimator Payables; Prime Sync History - Hourly Receivables… |
| spEthSyncGetNextDatesByGroup | 5 | Prime Sync History - 6 Hourly; Prime Sync History - Daily; Prime Sync History - Hourly Estimator Payables; Prime Sync History - Hourly Receivables… |
| spEthSyncRecordWindowOutcome | 5 | Prime Sync History - 6 Hourly; Prime Sync History - Daily; Prime Sync History - Hourly Estimator Payables; Prime Sync History - Hourly Receivables… |
| spEthEmailMessageInsertHtml | 4 | AI Peer Review - Error Handler; Keep MFA Store Up-to-date (Email + Phone) v2; MakeSafe Payroll Weekly Schedule; MakeSafe Weekly Schedule Summary |
| spPrimeUpsertJob | 4 | Prime Job Email Sync; Prime Sync Jobs by Date; Prime Sync Queued Jobs (Batched); Prime Sync Resync Jobs |
| spPrimeUpsertAllocation | 4 | Prime Sync Allocations by Date; Prime Sync Queued Allocations (Batched); Prime Sync Queued Allocations By ID; Prime Sync Queued Allocations |
| spEthTaskInsert | 3 | Adding Jobs to Peer Review Queue; Peer Review Queue from Status Webhooks; Quote Submission Automation |
| spMakesafeInsertPhoneCall | 3 | ENData Request for Service Email; Sedgwick Repairline Make Safe Email; Webhook ElevenLabs MakeSafe Call |
| spMakesafeQueuePhoneCallSMSMessages | 3 | ENData Request for Service Email; Sedgwick Repairline Make Safe Email; Webhook ElevenLabs MakeSafe Call |
| spMakesafeUpsertPhoneCallFromPrimeJob | 3 | Make Safe Queued Allocation Checks; Prime Job Email Sync; Prime Sync Jobs by Date |
| spElevenLabsInsertConversation | 3 | Webhook ElevenLabs MakeSafe Call; Webhook ElevenLabs Message; Webhook Twillio Failure Message |
| spEthTaskGetNext | 2 | Adding Jobs to Peer Review Queue; Make Safe Queued Allocation Checks |
| spEthTaskClaimNext | 2 | AI peer Review 3.0; Make Safe Queued Allocation Checks |
| spPrimePeerReviewEstimatedetails | 2 | AI peer Review 3.0; Peer Review - Predefined Suggestion |
| spEthTaskComplete | 2 | AI peer Review 3.0; Quote Submission Automation |
| args | 2 | Amend Missing Schedules and Schedule Items; Prime Sync Schedules by Date |
| spPrimeUpsertSchedule | 2 | Amend Missing Schedules and Schedule Items; Prime Sync Schedules by Date |
| spPrimeUpsertScheduleItem | 2 | Amend Missing Schedules and Schedule Items; Prime Sync Schedules by Date |
| spEthEmailMessageGetQueue | 2 | Email Queue - Send Prod; Email Queue - Send Test |
| spEthEmailMessageMarkSent | 2 | Email Queue - Send Prod; Email Queue - Send Test |
| spEthEmailMessageGetAttachment | 2 | Email Queue - Send Prod; Email Queue - Send Test |
| spEthEmailMessageMarkFailed | 2 | Email Queue - Send Prod; Email Queue - Send Test |
| spEthTaskGetCount | 2 | Endata Quote Rates - Process Queue; Task Queue - Depth API |
| spIsOutsideBusinessHours | 2 | ENData Request for Service Email; Sedgwick Repairline Make Safe Email |
| spEthEmailMessageInsertText | 2 | Hudu Backup Email Alert; Webhook ElevenLabs Message |
| spMakesafeGetUserScheduleWeeklySummary | 2 | MakeSafe Payroll Weekly Schedule; MakeSafe Weekly Schedule Summary |
| stored | 2 | prime DataCentre Email - Attachment SWMS Count; prime DataCentre Email - Conversion Report |
| spEthSyncQueueMissingObjectsByJobID | 2 | Prime Job Email Sync; Prime Sync Jobs by Date |
| spPrimeUpsertAccountsPayableInvoice | 2 | Prime Sync Accounts Payable Invoices by Date; Prime Sync Queued Accounts Payable Invoices (Batched) |
| spPrimeUpsertEstimateTemplateItem | 2 | Prime Sync Estimate Template Items - Ethos Only; Prime Sync Estimate Template Items and Overrides |
Most-used tables and views
| Object | Flows | Used by |
|---|---|---|
| ethSyncSchedule | 37 | Prime Sync Accounts Payable Invoices by Date; Prime Sync Allocations by Date; Prime Sync AllocationStatuses; Prime Sync Appointments by Date… |
| primeJobs | 10 | AI peer Review 3.0; Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; PC Build - Start from Assessment Report… |
| ethTask | 5 | Adding Jobs to Peer Review Queue; AI peer Review 3.0; Peer Review Queue from Status Webhooks; Quote Submission Automation… |
| primeSiteForms | 5 | Endata Scope Email at Estimate Approved for Submission; PC Build - Start from Assessment Report; Peer Review Queue from Status Webhooks; Report Freshness Check… |
| primeUsers | 4 | AI peer Review 3.0; Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; PC Build - Write Form |
| primeContacts | 4 | AI peer Review 3.0; Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; Quote Submission Automation |
| primeStatuses | 4 | Endata Scope Email at Estimate Approved for Submission; PC Build - Draft Form; PC Build - Start from Assessment Report; Peer Review Queue from Status Webhooks |
| primejobs | 3 | Adding Jobs to Peer Review Queue; AI peer Review 3.0; Report Freshness Check |
| EthPeerReviewStatus | 3 | AI peer Review 3.0; Report Freshness Check; Scheduled Report Refresh |
| EthPeerReviewCatalogueRun | 3 | AI peer Review 3.0; Peer Review - Predefined Suggestion; Report Freshness Check |
| ethPrimeWebhookLog | 3 | Endata Scope Email at Estimate Approved for Submission; PC Build - Start from Assessment Report; Peer Review Queue from Status Webhooks |
| primeSiteFormItems | 3 | Endata Scope Email at Estimate Approved for Submission; Report Freshness Check; SWMS Stage Three Judgement |
| ethEmailMessage | 3 | Endata Scope Email at Estimate Approved for Submission; Report Freshness Check; SWMS Daily Decision Report |
| EthMFAOtpAccounts | 3 | Get Current OTP Code; Register OTP Account; Remove OTP Account |
| EthSwmsWorkOrderDecision | 3 | Report Freshness Check; SWMS Daily Decision Report; SWMS Stage Three Judgement |
| ethWorkQueue_Preview | 3 | Work queue - Dead letter digest; Work queue - Prime budget; Work queue - Settle |
| primeEstimateTemplateItems | 2 | AI peer Review 3.0; Peer Review - Predefined Suggestion |
| primeNonPredefinedItemLog | 2 | AI peer Review 3.0; Peer Review - Predefined Suggestion |
| EthCHUTradeMap | 2 | Endata Scope Email at Estimate Approved for Submission; Quote Submission Automation |
| EthCHUUnitAlias | 2 | Endata Scope Email at Estimate Approved for Submission; Quote Submission Automation |
| EthEstimateLineCatalogueMatch | 2 | Eth Catalogue Reporting Refresh (nightly); Report Freshness Check |
| EthCatalogueItemUsage | 2 | Eth Catalogue Reporting Refresh (nightly); Report Freshness Check |
| EthEstimateCatalogueSummary | 2 | Eth Catalogue Reporting Refresh (nightly); Report Freshness Check |
| EthMFAAsAService | 2 | Get Latest MFA Code For Service; Keep MFA Store Up-to-date (Email + Phone) v2 |
| primeEstimates | 2 | PC Build - Draft Form; Peer Review Queue from Status Webhooks |
| EthPcBuildTemplateField | 2 | PC Build - Draft Form; PC Build - Write Form |
| EthPcBuildRun | 2 | PC Build - Start from Assessment Report; PC Build - Write Form |
| EthAGTemplateWordingCodes | 2 | Prime Create Reviewed Estimate; Report Freshness Check |
| EthEstimatorOpenJobs | 2 | Prime Job Tag Sync - Estimator Job Type; Report Freshness Check |
| EthEstimatorQuoteLife | 2 | Prime Job Tag Sync - Estimator Job Type; Report Freshness Check |
| primeWorkOrders | 2 | SWMS Daily Decision Report; SWMS Stage Three Judgement |
| EthSwmsStage3Judgement | 2 | SWMS Daily Decision Report; SWMS Stage Three Judgement |
| primeWorkOrderItems | 2 | SWMS Daily Decision Report; SWMS Stage Three Judgement |
| ethWorkQueueMessage_Preview | 2 | Work queue - Dead letter digest; Work queue - Settle |
| EthCatalogueCandidateDecision | 1 | AI peer Review 3.0 |
| primeinvoicecheck | 1 | Discover and remove deleted invoices |
| primeAccountsReceivableInvoices | 1 | Discover and remove deleted invoices |
| primeScheduleItemCheck | 1 | Discover and remove deleted schedule items (Batched) |
| ethFileTemplate | 1 | Endata Scope Email at Estimate Approved for Submission |
| endataLocations | 1 | Endata Scope Email at Estimate Approved for Submission |

