{"product_id":"n8n-workflow-rewrite-legal-time-entries-w-gpt-4o-graph","title":"n8n Workflow: Rewrite Legal Time Entries w\/ GPT-4o \u0026 Graph","description":"\u003ch3\u003eRewrite attorney time entry narratives with GPT-4o—automatically, on schedule, and with SharePoint compliance checks\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n workflow\u003c\/strong\u003e pulls legal \u003cstrong\u003etime entries\u003c\/strong\u003e from \u003cstrong\u003eSharePoint\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI (GPT-4o)\u003c\/strong\u003e to rewrite each narrative, checks the result for \u003cstrong\u003ebilling guideline compliance\u003c\/strong\u003e, saves the AI-reviewed text back to SharePoint, and emails a run digest through \u003cstrong\u003eMicrosoft Outlook\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns every two hours\u003c\/strong\u003e on a schedule.\u003c\/li\u003e\n  \u003cli\u003eFetches \u003cstrong\u003eTime Entries\u003c\/strong\u003e, \u003cstrong\u003eProjects\u003c\/strong\u003e, \u003cstrong\u003eBilling Guidelines\u003c\/strong\u003e, and \u003cstrong\u003eClients\u003c\/strong\u003e from SharePoint lists using the \u003cstrong\u003eMicrosoft Graph API\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eSelects entries that include a \u003cstrong\u003enarrative\u003c\/strong\u003e and have a \u003cstrong\u003eStatus\u003c\/strong\u003e of \u003cstrong\u003e“Complete”\u003c\/strong\u003e, then links each time entry to its related project, client, and applicable billing guidelines (firm-wide and client-specific).\u003c\/li\u003e\n  \u003cli\u003eSends each selected entry to \u003cstrong\u003eGPT-4o\u003c\/strong\u003e to return a \u003cstrong\u003estrict JSON\u003c\/strong\u003e response containing:\n    \u003cul\u003e\n      \u003cli\u003eAn \u003cstrong\u003eAI narrative\u003c\/strong\u003e rewrite\u003c\/li\u003e\n      \u003cli\u003eAny \u003cstrong\u003ecompliance issues\u003c\/strong\u003e\n\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003eUpdates the SharePoint time entry with the \u003cstrong\u003eAI narrative\u003c\/strong\u003e, sets \u003cstrong\u003eStatus\u003c\/strong\u003e to \u003cstrong\u003e“AI Reviewed”\u003c\/strong\u003e or \u003cstrong\u003e“Flagged”\u003c\/strong\u003e, and if flagged, appends issues to \u003cstrong\u003eNotes\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eGenerates an \u003cstrong\u003eHTML summary\u003c\/strong\u003e of processed and flagged entries and emails it via \u003cstrong\u003eMicrosoft Outlook\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eReducing manual effort in reviewing and standardizing attorney time entry narratives.\u003c\/li\u003e\n  \u003cli\u003eEnsuring time entry wording aligns with firm-wide and client-specific \u003cstrong\u003ebilling guidelines\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eOperational reporting: sending stakeholders a scheduled digest of what was processed and what needs attention.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSchedule Trigger\u003c\/strong\u003e (every 2 hours)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMicrosoft Graph\u003c\/strong\u003e via HTTP Request to read\/write SharePoint lists and send mail\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSplit in Batches\u003c\/strong\u003e for processing time entries\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI (GPT-4o)\u003c\/strong\u003e to rewrite narratives and check compliance\u003c\/li\u003e\n  \u003cli\u003eNodes\/utility elements: \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003esticky note\u003c\/strong\u003e, \u003cstrong\u003ehttp request\u003c\/strong\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eSetup note:\u003c\/strong\u003e Create the four SharePoint lists (\u003cem\u003eTime Entries\u003c\/em\u003e, \u003cem\u003eProjects\u003c\/em\u003e, \u003cem\u003eBilling Guidelines\u003c\/em\u003e, \u003cem\u003eClients\u003c\/em\u003e), add an OAuth2 Microsoft Graph credential with permissions to read\/write SharePoint lists and send mail, then configure the SharePoint site ID and list IDs in the workflow values.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45748942799027,"sku":"N8N-17708","price":38.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Q3X1HtiXxx_ZhL8rI5_zR_UBM0G4H0.png?v=1785574973","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-rewrite-legal-time-entries-w-gpt-4o-graph","provider":"N8N Commerce","version":"1.0","type":"link"}