Automated daily financial analysis from Loyverse POS with Google Sheets & email
Automatically fetches daily sales, shifts, and receipts from Loyverse. Calculates gross profit, net operating profit, other key metrics, saves them to a Google Sheet and sends out a daily report via email.
Who’s it for
This template is for any business owner, manager, or analyst using Loyverse POS who needs more advanced financial reporting. If you're a restaurant, bar, or retail owner who wants to automatically track daily net profit, compare sales to historical averages, and build a custom financial dashboard in Google Sheets, this workflow is for you.
How it works / What it does
This workflow runs automatically on a daily schedule. It fetches all sales data and receipts from your Loyverse account for the previous business day, defined by your custom shift times (even past midnight). A powerful Code node then processes all the data to calculate the metrics that Loyverse either doesn't provide at all, or only spreads out across several separate reports instead of in one consolidated place.
Already set up are metrics like...
- -Total Revenue, Gross Profit, and Net Operating Profit
- Cash handling differences (over/under)
- Average spend per receipt (ATV)
- 30-day rolling Net Operating Profit (NOP)
- Performance vs. your historical weekday average
Finally, it appends the single, calculated row of daily metrics to a Google Sheet and sends an easily customizable summary report to your email.
How to set up
This workflow includes detailed Sticky Notes to guide you through the setup process.
Because every business has a unique POS configuration (different POS devices, categories, and payment types), you'll need to set up a few things manually before executing the workflow. I've tried to make this as easy as possible to follow, and the entire setup should only take about 15 minutes.
Preparations & Credential setup
- Subscribe to "Integrations" Add-on in Loyverse ($9 / month) to gain API access.
- Create an Access token in Loyverse
- Create Credentials: In your n8n instance, create credentials for Loyverse (use "Generic" > "Bearer Auth"), Google Sheets (OAuth2), and your Email (SMTP or other).
Make a copy of a prep-configured Google Spreadsheet
(Link in the second sticky note inside the workflow).
Fill MASTER CONFIG:
Open the MASTER CONFIG node. Follow the comments inside to add your Google Sheet ID, Sheet Names, business hours, timezone, and Loyverse IDs (for POS devices, payment types, and categories).
Configure Google Sheet Nodes
- Configure Read Historical Data: Open this node. Follow the instructions in the nearby Sticky Note to paste the expressions for your Document ID and Sheet Name.
- Configure Save Product List: Open this node. Paste in the expressions for Document ID and Sheet Name. The column mapper will load; map your sheet columns (e.g., item_name) to the data on the left (e.g., {{ $json.item_name }}).
- Configure Save Latest Sales Data: Open this node. Paste in the expressions for Document ID and Sheet Name. Save and run the workflow. After that, the column mapper will load. This is the most important step: map your sheet's column names (e.g., "Total Revenue") to the calculated metrics from the Calculate All Metrics node (e.g., {{ $json.totalGrossRevenue }}).
Activate the workflow. 🫡
Requirements
- Loyverse Integrations Subscription
- Loyverse Access Token
- Credentials for Loyverse (Bearer Auth)
- Credentials for Google Sheets (OAuth2)
- Credentials for Email/SMTP sender
How to customize the workflow
This template is designed to be highly flexible.
Central Configuration:
Almost all customization (POS devices, categories, payment types, sheet names) is done in the MASTER CONFIG node. You don't need to dig through other nodes.
Add/Remove Metrics:
The Calculate All Metrics node has additional metrics already set up, just add the relevant collumns to the SalesData sheet or even add your own calculations to the node. Any new metric you add (e.g., metrics.myNewMetric = 123) will be available to map in the Save Latest Sales Data node.
Email Body:
You can easily edit the Send email node to change the text or add new metrics from the Calculate All Metrics node.
n8n Workflow: Automated Daily Financial Analysis from Loyverse POS with Google Sheets & Email
This n8n workflow automates the process of fetching daily sales data from a Loyverse POS system, processing it, storing it in Google Sheets, and sending a daily summary email. It simplifies financial tracking and reporting for businesses using Loyverse.
What it does
This workflow performs the following key steps:
- Triggers on a Schedule: The workflow can be configured to run at specific intervals (e.g., daily) or manually.
- Fetches Loyverse POS Data: It makes an HTTP request to the Loyverse POS API to retrieve daily sales or transaction data.
- Processes Data: A Code node is used to transform and prepare the fetched data for storage and analysis. This likely involves parsing the API response and extracting relevant financial metrics.
- Stores Data in Google Sheets: The processed financial data is then appended or updated in a designated Google Sheet, creating a historical record.
- Sends Daily Summary Email: Finally, an email is composed with a summary of the daily financial analysis and sent to a specified recipient (e.g., business owner, manager).
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance to import and execute the workflow.
- Loyverse POS Account: Access to your Loyverse POS account with API credentials (if required by the HTTP Request node for authentication).
- Google Account: A Google account with access to Google Sheets.
- Google Sheets Credential: An n8n Google Sheets credential configured to access your Google Sheet.
- SMTP Server/Email Service: An SMTP server or an email service configured in n8n for sending emails.
- Email Credential: An n8n Email Send credential configured.
Setup/Usage
- Import the Workflow:
- Copy the provided JSON code.
- In your n8n instance, click "New Workflow".
- Go to "File" > "Import from JSON" and paste the code.
- Configure Credentials:
- HTTP Request (Loyverse): Configure the HTTP Request node with your Loyverse API endpoint and any necessary authentication (e.g., API key, bearer token).
- Google Sheets: Select or create a Google Sheets credential. You will need to grant n8n access to your Google Drive to manage spreadsheets. Specify the Spreadsheet ID and Sheet Name where you want to store the data.
- Send Email: Select or create an Email Send credential. Configure the recipient email address, subject, and body of the email. The email body can include dynamic data from previous nodes.
- Configure Schedule Trigger:
- Adjust the "Schedule Trigger" node to define how often you want the workflow to run (e.g., daily at a specific time).
- Configure Code Node:
- Review and modify the "Code" node as needed to correctly parse the Loyverse API response and format the data for Google Sheets and the email.
- Activate the Workflow:
- Once all credentials and configurations are set, activate the workflow to enable it to run automatically on schedule. You can also test it manually using the "When clicking ‘Execute workflow’" trigger.
Related Templates
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions
AI-powered code review with linting, red-marked corrections in Google Sheets & Slack
Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.
Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review
This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.