{"product_id":"n8n-lms-access-reconciliation-with-google-sheets-payment-status","title":"n8n LMS Access Reconciliation with Google Sheets Payment Status","description":"\u003ch3\u003eKeep LMS access in sync with Google Sheets payments—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow reconciles student access in your LMS with payment status stored in Google Sheets. Every day, it automatically archives or unarchives users per tenant (based on region mapping) and records the confirmed actions back into the “Access Action” column.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eRuns daily\u003c\/b\u003e at \u003cb\u003e7:30 PM (Asia\/Kolkata)\u003c\/b\u003e via a scheduled trigger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eLoads configuration\u003c\/b\u003e such as the Google Sheets \u003cb\u003espreadsheet ID\u003c\/b\u003e, a \u003cb\u003egrace period\u003c\/b\u003e, and \u003cb\u003eregion-to-tenant mapping\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eAuthenticates to the LMS API\u003c\/b\u003e using environment-provided credentials (\u003cb\u003eLMS_API_BASE\u003c\/b\u003e, \u003cb\u003eLMS_USERNAME\u003c\/b\u003e, \u003cb\u003eLMS_PASSWORD\u003c\/b\u003e) and uses the login response to obtain an API key for subsequent calls.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eSelects the correct Google Sheets tabs\u003c\/b\u003e by finding the \u003cb\u003ecurrent month\u003c\/b\u003e and \u003cb\u003eprevious month\u003c\/b\u003e based on their tab titles.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eComputes the desired access state per email\u003c\/b\u003e:\n    \u003cul\u003e\n      \u003cli\u003e\n\u003cb\u003eActivate\u003c\/b\u003e when payment is received.\u003c\/li\u003e\n      \u003cli\u003e\n\u003cb\u003eArchive\u003c\/b\u003e when overdue beyond the configured grace period on the \u003cb\u003ecurrent month\u003c\/b\u003e tab.\u003c\/li\u003e\n      \u003cli\u003e\n\u003cb\u003eOtherwise leave unchanged\u003c\/b\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eResolves region into one or more tenant IDs\u003c\/b\u003e, then checks each user’s observed archived status in the LMS per tenant.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eApplies only necessary changes\u003c\/b\u003e (archive\/unarchive) through the LMS API.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eWrites back results\u003c\/b\u003e: after successful updates, performs a \u003cb\u003esingle batch update\u003c\/b\u003e to add either \u003cb\u003e“Archived on YYYY-MM-DD”\u003c\/b\u003e or \u003cb\u003e“Unarchived on YYYY-MM-DD”\u003c\/b\u003e in the sheet’s \u003cb\u003eAccess Action\u003c\/b\u003e column.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eMulti-tenant SaaS programs where student access must reflect paid enrollments.\u003c\/li\u003e\n  \u003cli\u003eAutomated enforcement of access rules when payments expire beyond a grace period.\u003c\/li\u003e\n  \u003cli\u003eOperational reporting by updating Google Sheets with the exact action date taken in the LMS.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eNodes \/ stack\u003c\/b\u003e: \u003cb\u003eSchedule Trigger\u003c\/b\u003e, \u003cb\u003eHTTP Request\u003c\/b\u003e, \u003cb\u003eCode\u003c\/b\u003e, and \u003cb\u003eSticky Note\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eIntegrations\u003c\/b\u003e: LMS via HTTP API (authenticated using \u003cb\u003eLMS_API_BASE\u003c\/b\u003e, \u003cb\u003eLMS_USERNAME\u003c\/b\u003e, \u003cb\u003eLMS_PASSWORD\u003c\/b\u003e) and \u003cb\u003eGoogle Sheets\u003c\/b\u003e for payment status and action logging.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45950316380339,"sku":"N8N-19067","price":49.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/mWJsETLFEhKRZVnw_JlwF_qyTSV5fT.png?v=1788514552","url":"https:\/\/buyflowscripts.com\/products\/n8n-lms-access-reconciliation-with-google-sheets-payment-status","provider":"N8N Commerce","version":"1.0","type":"link"}