dataintermediate10 min setupby Mantle

Monthly Stripe invoice summary to a spreadsheet

List the month's paid invoices and append the totals to a Google Sheet finance already reads.

1st of the monthPaid invoicesAppend the summa

Drag to pan, pinch to zoom. This is the real graph the template installs.

Purpose

List the month's paid invoices and append the totals to a Google Sheet finance already reads.

How it works

What it does

  • Runs at 06:00 on the first of each month.
  • Lists up to 100 paid Stripe invoices.
  • Appends a dated summary row to a Google Sheet.

Validation

This template is contract-validated: the unit suite checks every node type, every config key and the whole graph against the same rules a saved workflow passes. It has not been run against the live provider — the ids, names and columns below are placeholders to replace with your own.

Nodes 3

  1. 011st of the month 06:00trigger.scheduleTrigger
  2. 02Paid invoicesstripe.list_invoicesApp
  3. 03Append the summarygoogle_sheets.appendApp
View template JSON
{
  "format": "mantle-workflow/v1",
  "id": "stripe-invoice-summary-sheet",
  "name": "Monthly Stripe invoice summary to a spreadsheet",
  "graph": {
    "nodes": [
      {
        "id": "cron",
        "type": "trigger.schedule",
        "label": "1st of the month 06:00",
        "config": {
          "cron_expr": "0 6 1 * *",
          "timezone": "UTC"
        },
        "worker_type": "generic-worker",
        "position": {
          "x": 60,
          "y": 220
        }
      },
      {
        "id": "invoices",
        "type": "stripe.list_invoices",
        "label": "Paid invoices",
        "config": {
          "status": "paid",
          "limit": 100
        },
        "worker_type": "generic-worker",
        "position": {
          "x": 380,
          "y": 220
        }
      },
      {
        "id": "append",
        "type": "google_sheets.append",
        "label": "Append the summary",
        "config": {
          "spreadsheet_id": "1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789",
          "range": "Invoices!A:C",
          "values": [
            [
              "{{ $today }}",
              "paid",
              "{{ steps.invoices.count }}"
            ]
          ]
        },
        "worker_type": "generic-worker",
        "position": {
          "x": 700,
          "y": 220
        }
      }
    ],
    "edges": [
      {
        "from": "cron",
        "to": "invoices"
      },
      {
        "from": "invoices",
        "to": "append"
      }
    ]
  }
}

Requirements

The connections and permissions each step needs, from the node contracts in the catalog.

  • StripeAPI key

    Used by Paid invoices.

    Credential: the Stripe secret key (sk_...)

  • Google SheetsOAuth 2.0

    Used by Append the summary.

    Credential: {"client_id", "client_secret", "refresh_token"}

    • The refresh token must have the spreadsheets scope.

Setup

  • Narrow the window with created_after / created_before (Unix seconds) if you want exactly last month.
  • Set spreadsheet_id and range, and add columns to values for anything else you want recorded.
  • Pick Stripe and Google Sheets connections.

Sample input and output

Synthetic examples: node-contract samples or placeholders, never customer data.

Input

Runs on the cron schedule 0 6 1 * * (UTC). There is no incoming payload: the first step fetches the data.

Output

Append the summary google_sheets.append

{
  "updated_cells": 0,
  "updated_range": "",
  "updated_rows": 1
}

Failure handling

What the graph does when a step fails, read from its retry settings, error branches and error policies.

  • A step that fails, after any retries, fails the run. The failed step is kept with its input and error.

See it run, then make it yours.

Templates install as drafts. Edit any step, and Workflow Health re-checks the graph on every save.