See llms.txt for all machine-readable content.

Back to Templates

Log paid Workspace369 invoices in Google Sheets and email your team with Gmail

Quick overview

This workflow listens for Workspace369 invoice.paid webhooks, verifies the invoice and payment via the Workspace369 API, logs the payment to Google Sheets only once, and emails your team a paid-invoice notice or an alert on errors.

How it works

  1. Receives a POST webhook from Workspace369 and immediately responds, then keeps only events where event_type equals invoice.paid.
  2. Fetches the invoice details and the invoice’s payment list from the Workspace369 API using a Bearer token, retrying failed calls up to three times.
  3. Confirms the invoice is fully paid and (if provided) the referenced payment exists on the invoice, then builds a Google Sheets row and an email message from the API data.
  4. Searches Google Sheets for the webhook ID to prevent duplicate logging.
  5. If the webhook ID is not found, appends the payment row to the sheet and sends an invoice-paid email via Gmail.
  6. If the API check fails, the payment cannot be confirmed, or Google Sheets operations fail, sends an alert email via Gmail instead of writing anything to the sheet.

Setup

  1. In Workspace369, enable AI connections and create a personal access token with invoices:read permission, then add it to n8n as an HTTP Bearer Auth credential.
  2. Create a Google Sheet with a tab matching the workflow’s tab name (default: Payments) and a header row that includes a “Webhook ID” column for de-duplication.
  3. Connect Google Sheets and Gmail credentials in n8n, then set the Google Sheet URL, tab name, and recipient email address in the Settings step.
  4. Copy the n8n production webhook URL and register it in Workspace369 Webhooks for the invoice.paid event.