Skip to main content
P

Patrick Campbell

3
Workflows

Workflows by Patrick Campbell

Workflow preview: Send automated payment reminders for Xero invoices via Outlook email
Free intermediate

Send automated payment reminders for Xero invoices via Outlook email

## Who's this for Small business owners, finance teams, accountants, and bookkeepers who use Xero for invoicing and want to improve cash flow by automating payment reminders. If you're spending time manually following up on unpaid invoices or struggling with late payments, this workflow eliminates the manual effort and ensures consistent, timely communication with customers while maintaining a complete audit trail. ## What it does This workflow automatically monitors all invoices in your Xero account and sends friendly payment reminders to customers when invoices are approaching their due date. It runs daily at noon, checks every invoice, calculates how many days until payment is due, sends personalized email reminders for invoices due within 7 days, and logs each reminder activity back into Xero's invoice history. The automation ensures no invoice slips through the cracks, reduces the administrative burden of accounts receivable management, and maintains professional customer relationships through polite, timely reminders—all while keeping your Xero records up to date with reminder tracking. ## How it works The workflow executes automatically every day at 12 PM and follows this process: - Triggers the daily check using the Schedule Trigger node - Fetches all invoices from your Xero account using the Xero API integration - Filters out invoices that are already marked as "PAID" to avoid sending unnecessary reminders - Calculates the number of days remaining until each unpaid invoice is due using a JavaScript code node - Identifies invoices that are due within the next 7 days (customizable threshold) - Sends personalized email reminders to customers via Microsoft Outlook, including invoice number, due date, and amount - Logs the reminder activity back into Xero's invoice history with the date sent and days until due - Creates a complete audit trail in Xero showing when reminders were sent for each invoice The workflow only sends reminders for invoices meeting the criteria, so customers aren't bombarded with unnecessary emails. The Xero history logging ensures your team can see at a glance which customers have been reminded and when, preventing duplicate reminders and providing accountability. ## Requirements - Xero account with API access enabled (available to all Xero users at no additional cost) - Microsoft Outlook or Office 365 account for sending email reminders - Valid email addresses configured for all customers in your Xero contact records - n8n instance (self-hosted or cloud) with credentials configured for: - Xero OAuth2 connection (used twice: once for fetching invoices, once for logging history) - Microsoft Outlook OAuth2 connection ## Setup instructions **1. Enable Xero API access** Ensure your Xero account has API access enabled. This is available by default for all Xero accounts. You'll need administrator access to create the API connection. **2. Configure n8n credentials** In your n8n instance, set up OAuth2 credentials for: - **Xero:** Follow n8n's Xero credential documentation to authorize access to your Xero organization. Make sure the credentials have permission to both read invoices and write to invoice history. - **Microsoft Outlook:** Set up OAuth2 connection to allow n8n to send emails on your behalf **3. Assign credentials to nodes** Open the workflow and assign your configured credentials to these nodes: - "Fetch All Xero Invoices" → Select your Xero credential - "Send Email Reminder to Customer" → Select your Microsoft Outlook credential - "Log Reminder in Xero History" → Select your Xero credential (same as above) **4. Customize the email template** Edit the "Send Email Reminder to Customer" node to personalize the message: - Update the sender name and signature - Add your company branding or logo - Include payment instructions or online payment links - Adjust the tone to match your customer communication style - Add any legal disclaimers or terms if required - Customize the subject line if needed **5. Adjust the reminder threshold (optional)** By default, reminders are sent for invoices due within 7 days. To change this: - Open the "Calculate Days Until Due" code node - Find the line: `isDueSoon: diffDays <= 7 && diffDays >= 0` - Change `7` to your preferred number of days (e.g., `14` for two weeks notice) **6. Test the workflow** Before enabling the daily schedule: - Use the manual trigger to test with your actual Xero data - Verify that invoices are fetched correctly - Check that the date calculations are accurate - Send a test email to yourself to review the message format - Confirm the reminder is logged in Xero's invoice history - Verify only qualifying invoices trigger reminders **7. Activate the workflow** Once testing is complete, activate the workflow. It will run automatically every day at noon (or your customized schedule time).

P
Patrick Campbell
Invoice Processing
12 Jan 2026
0
0
Workflow preview: Track monthly OpenAI token usage with Google Sheets and Gmail reports
Free intermediate

Track monthly OpenAI token usage with Google Sheets and Gmail reports

**Who's this for** Finance teams, AI developers, product managers, and business owners who need to monitor and control OpenAI API costs across different models and projects. If you're using GPT-4, GPT-3.5, or other OpenAI models and want to track spending patterns, identify cost optimization opportunities, and generate stakeholder reports, this workflow is for you. **What it does** This workflow automatically tracks your OpenAI token usage on a monthly basis, breaks down costs by model and date, stores the data in Google Sheets with automatic cost calculations, and emails PDF reports to stakeholders. It transforms raw API usage data into actionable insights, helping you understand which models are driving costs, identify usage trends over time, and maintain budget accountability. The workflow runs completely hands-free once configured, generating comprehensive monthly reports without manual intervention. **How it works** The workflow executes automatically on the 5th of each month and follows these steps: Creates a new Google Sheet from your template with the naming format "Token_Tracking_[Month]_[Year]" Fetches the previous month's OpenAI usage data via the OpenAI Admin API Transforms raw API responses into a clean daily breakdown showing usage by model Appends the data to Google Sheets with columns for date, model, input tokens, and output tokens Your Google Sheets formulas automatically calculate costs based on OpenAI's pricing for each model Exports the completed report as both PDF and Excel formats Emails the PDF report to designated stakeholders with a summary message Archives the Excel file to Google Drive for long-term recordkeeping and historical analysis **Requirements** OpenAI account with Admin API access (required to access organization usage endpoints) Google Sheets template pre-configured with cost calculation formulas Google Drive for report storage and archiving Gmail account for sending email notifications n8n instance (self-hosted or cloud) with the following credentials configured: OpenAI API credentials Google Sheets OAuth2 Google Drive OAuth2 Gmail OAuth2 **Setup instructions** 1. Create your Google Sheets template Set up a Google Sheet with these columns: - Date - Model - Token Usage In - Token Usage Out - Token Cost Input (formula: =C2 * [price per 1M input tokens] / 1000000) - Token Cost Output (formula: =D2 * [price per 1M output tokens] / 1000000) - Total Cost USD (formula: =E2 + F2) - Total Cost AUD (optional, formula: =G2 * [exchange rate]) (workflow contains a template) Include pricing formulas based on OpenAI's current pricing. Add summary calculations at the bottom to total costs by model. **2. Configure n8n credentials** In your n8n instance, set up credentials for: OpenAI API (you'll need admin access to your organization) Google Sheets (OAuth2 connection) Google Drive (OAuth2 connection) Gmail (OAuth2 connection) **3. Update workflow placeholders** Replace the following placeholders in the workflow: your-api-key-id: Your OpenAI API key ID (find this in your OpenAI dashboard) your-template-file-id: The ID of your Google Sheets template your-archive-folder-id: The Google Drive folder ID where reports should be archived [email protected]: The email address that should receive monthly reports **4. Assign credentials to nodes** Open each node that requires credentials and select the appropriate credential from your configured options: "Fetch OpenAI Usage Data" → OpenAI API credential "Append Data to Google Sheet" → Google Sheets credential "Create Monthly Report from Template" → Google Drive credential "Export Sheet as Excel" → Google Drive credential "Export Sheet as PDF for Email" → Google Drive credential "Archive Report to Drive" → Google Drive credential "Email Report to Stakeholder" → Gmail credential **5. Test the workflow** Before enabling the schedule, manually execute the workflow to ensure: The template copies successfully OpenAI data fetches correctly Data appends to the sheet properly PDF and Excel exports work Email sends successfully File archives to the correct folder **6. Enable the schedule** Once testing is complete, activate the workflow. It will run automatically on the 5th of each month.

P
Patrick Campbell
Document Extraction
12 Jan 2026
0
0
Workflow preview: Pdf to markdown converter with LlamaCloud parser
Free intermediate

Pdf to markdown converter with LlamaCloud parser

PDF to Markdown Converter (LlamaCloud) Description: How it works This workflow extracts structured content from complex PDFs using LlamaCloud's advanced parsing engine: Download PDF – Retrieves your PDF from Google Drive (or any source) Upload to LlamaCloud – Sends the PDF to LlamaCloud's parsing API and receives a job ID Poll for completion – Automatically checks parsing status every 30 seconds until complete Retrieve markdown – Fetches the clean, structured markdown output with preserved tables, layouts, and formatting The workflow handles complex PDFs with multi-column layouts, tables, and embedded images that traditional parsers struggle with. Set up steps Time estimate: ~5 minutes You'll need to configure one main integration: LlamaCloud API key – Sign up at cloud.llamaindex.ai, generate an API key, and create a Generic Header Auth credential in n8n with Authorization: Bearer YOUR_API_KEY Google Drive OAuth (optional) – Connect your Google account if using the Drive node, or replace with any PDF source Once configured, the workflow automatically handles parsing, retry logic, and markdown extraction. Output is ready for AI processing or content transformation workflows.

P
Patrick Campbell
Document Extraction
15 Dec 2025
159
0