Macros Library

The Abaque Macros library provides a curated set of functions designed to automate common bookkeeping tasks directly from your Google Sheets macros. Unlike custom functions that are called from within a spreadsheet cell, these functions are invoked by the container-bound script tied to your Abaque Google Sheet—ensuring your document remains lean and high-performing.

By accessing automation routines through the abaqueMacros namespace, advanced operations such as ledger balancing and real-time transaction updates can be executed on-demand precisely when needed.

Included Functions:

Global

  • settlePayment
  • notifyOnRemarkDate

⚙️ settlePayment()

Pre-configured in Template File Requires v5+
Sheet Context: Journal
Cursor Position: Target transaction row
Default Shortcut: Ctrl + Alt + Shift + 1

Generates the corresponding balancing payment entry for a sale or purchase transaction.

System Logic

The macro analyzes the account string format in the selected row to dynamically determine the transaction type:

  • Sale Detected if the Debit column contains: 1060 | 1100 | Accounts Receivable
  • Purchase Detected if the Credit column contains: 2621 | 2100 | Accounts Payable

Action After Running the Macro

The macro appends the balanced transaction pair, automatically prefixing the description with "Debit - [ITEM cell content]" or "Credit - [ITEM cell content]". To complete the entry, you must click on the empty asset/bank cell within the newly created row to select the appropriate bank account.

⚙️ notifyOnRemarkDate()

Time-Driven Trigger Required Requires v6+
Sheet Context: Journal list / Array-based
Execution Context: Automated background task
Parameters: 3 Arguments (1 Optional)

Scans specified Journal sheets for upcoming or milestone dates entered in the Remark column and automatically dispatches email notifications to designated recipients.

Unlike settlePayment(), this routine is designed to run silently as a scheduled background process (e.g., once a day) rather than being executed manually by a user interacting with the sheet.

Implementation Steps

  1. Open your document's macros.gs file and add a wrapper function that passes your tailored configuration parameters:
    function triggerRemarkNotifications() {
        // abaqueMacros.notifyOnRemarkDate(sheetNames, emails, remarkColumn);
        abaqueMacros.notifyOnRemarkDate(["Journal"], "accounting@yourdomain.com");
    }
  2. In the Apps Script editor, navigate to the Triggers panel (the clock icon on the left menu).
  3. Click Add Trigger, select triggerRemarkNotifications as the function to run, choose Time-driven as the event source, and configure it to run on a daily timer (e.g., every morning).

Expected Arguments

Argument Type Description
sheetNames Array An array containing the exact text names of the Journal sheets whose Remark columns need to be scanned.
emails String or Array A single recipient email address string, or an array containing multiple target email addresses.
remarkColumn Number
(Optional)
The exact column index number of the Remark column in your target sheets. Defaults to 9 if left undefined.

Library Notes

Requires v6+ Upgrading & Re-authorization

To upgrade the library to v6:

  1. Open your spreadsheet and go to Extensions → Apps Script.
  2. In the Editor's left sidebar click on abaqueMacros under the Libraries section.
  3. In the Version dropdown, select 6 and click Save.

Functions introduced in v6 communicate with the Abaque notification server to dispatch emails on your behalf. This requires the External requests (script.external_request) Google permission, which triggers a one-time re-authorization prompt the first time any v6+ macro runs after upgrading from v5.

During this process, Google will display the warning "Google hasn't verified this app" and may identify your own Google account as the app developer—this is simply how Google attributes scripts to the owner of the spreadsheet copy, regardless of who wrote the underlying code.

Both warnings are safe to proceed through. To continue:

  1. Click Advanced at the bottom left of the warning screen.
  2. Click Go to Abaque (macros) (unsafe). The "unsafe" label is Google's default wording for any script not running under a verified Google Cloud project—it does not reflect the actual safety of Abaque Macros.
  3. Review the requested permissions and click Allow. This only needs to be done once per spreadsheet.