Zum Inhalt springen
NEULerne Alaaddin kennen, deinen KI-Flaschengeist mit Stimme. trig8n startet am 1. Januar 2027. Neuigkeiten ansehen

Bibliothek / Dateien & Cloud-Speicher

Dateien & Cloud-Speicher

Monatliche Rechnungstab in datierte Drive-Ordner mit Google Sheets archivieren

Läuft am ersten Tag jedes Monats, kopiert den Rechnungstab des Vormonats in den Drive-Ordner des jeweiligen Monats (legt den Ordner bei Bedarf an) und sendet anschließend einen Link per E-Mail.

Was sie bewirkt

# Archive last month's invoice tab into a dated Drive folder On the first of every month this lifts last month's tab out of your working invoice spreadsheet, files a formatted copy inside that month's Drive folder, and emails you a link. The working sheet stops growing forever and your accountant gets one clean file per month, next to the invoices themselves. ### How it works 1. A Code node works out last month once and hands the tab, folder and archive names to every node after it. 2. Drive is searched for the month folder, for example 2026-03, and it is created if missing. 3. The folder is checked for an archive of that month. If one exists the run stops, so re-running never duplicates. 4. The tab list is searched for last month. If it is missing you get an email listing the tabs that do exist. 5. A new spreadsheet is created through the Sheets API and moved into the folder, so no Apps Script is needed. 6. The tab is copied in, then one batch call renames it, freezes and bolds the header, sizes columns and deletes the empty default sheet. 7. With the config flag on, last month's tab is deleted from the working sheet, but only after the archive exists. You then get a summary email with a link. ### Setup 1. Connect your Google account on the Sheets API nodes, Drive on the folder nodes, and Gmail. 2. Open Set config and add your spreadsheet ID, the parent folder holding your month folders, email and timezone. 3. Tabs must be named like March 2026 and month folders like 2026-03. 4. Leave removeTabAfterArchiving off until you trust the archive. ### Customization Change archiveSuffix for something other than Invoices in the file name.

Die Schritte

  1. Run on the 1st
  2. Set config
  3. Work out last month
  4. Look for the month folder
  5. Folder exists?
  6. Create the month folder
  7. Use that folder
  8. Look for an existing archive
  9. Already archived?
  10. Stop, already done
  11. Get every tab in the sheet
  12. Find last month's tab
  13. Tab found?
  14. Email that there was nothing to archive

Insgesamt 22 Schritte.

Ähnliche Automatisierungen