Quick overview
This workflow pulls journal entries from Money Forward Accounting for a selected office and calendar year, classifies them into five Japanese tax-prep report types, and generates or updates five XLSX files in Google Drive using a Google Sheets template.
How it works
- Starts manually and exchanges your Money Forward API credentials for an access token, then verifies the tenant and lists accessible offices.
- Calculates the accounting periods that overlap the configured calendar year and fetches all Money Forward journal entries across those periods (with pagination).
- Fetches the Money Forward account master, selects fixed-asset accounts, and merges this with the retrieved journals.
- Classifies journal entry lines into five categories (withholding tax, rent, fees ≥ JPY 3,000, consumables ≥ JPY 50,000, and fixed assets), then formats rows for each report.
- Groups the formatted rows into five report datasets and determines a client folder name based on the Money Forward office.
- Finds or creates the client folder and year subfolder in Google Drive, then prepares five export jobs pointing to that destination.
- For each report, copies the Google Sheets template, appends the report rows, exports the sheet as XLSX, uploads or overwrites the matching XLSX file in Google Drive, and deletes the temporary spreadsheet copy.
Setup
- Add Money Forward API credentials for HTTP Header Auth and ensure the account has access to the target Money Forward Accounting office.
- Add Google Drive OAuth2 and Google Sheets OAuth2 credentials with permission to create folders, copy files, upload/update XLSX files, and edit spreadsheets.
- Create a Google Drive root folder and a Google Sheets template whose first sheet (ID 0) has headers A:J: クライアント名, 帳票種類, 日付, 摘要, 勘定科目, 補助科目, 借方, 貸方, 支払先, 仕訳ID (and format columns G:H as numbers).
- In “Configure Report Settings”, replace the placeholders with your Money Forward office code, target year, Google Drive root folder ID, and Google Sheets template spreadsheet ID.