Skip to content

Prototype for using the Up Banking API in Google Sheets

License

Notifications You must be signed in to change notification settings

azz/up-api-google-sheets

Repository files navigation

up-api-google-sheets

Prototype for using the Up Banking API in Google Sheets.

NOTE: The Up API is in beta release for personal use only.

Installation

  1. Create a new Google Sheet and select "Extensions" → "Apps Script".
  2. Paste in the contents of up.js into the code window.
  3. Save the script, and rename the project to "Up API" and accept the authorization request (you may need to proceed through a security warning, as this is not a published Addon).
  4. Click the "Run" button with the "onOpen" function selected.
  5. Go back to your Google Sheet and you should have a new "Up API" drop-down. Select"Up API" → "Set Up...".

Usage

Once you have authenticated ("Up API" → "Set Up..."), you will be able to insert formulas.

All the formulas provided by this script can be inserted from the "Up API" menu. Doing so will insert the formula, apply some styling, then auto-size the columns. Alternatively, you can enter in the formulas manually.

You can share a sheet with someone else and they will have to use their own personal access token. None of your data will be shared.

Your token will only be stored for one day. After this time your data will be cleared and you will have to re-authenticate.

Functions

UP_TRANSACTIONS(yeah, filterQuery, type)

Retrieve transactions across all of your Up accounts.

UP_TRANSACTIONS_BETWEEN(yeah, since, until, filterQuery, type)

Retrieve all transactions between two dates.

UP_TRANSACTIONS_FOR_ACCOUNT(yeah, accountId, filterQuery, type)

Retrieve transactions from a specific Up account.

UP_ACCOUNTS(yeah)

Retrieve all your Up accounts, including balances.

UP_CATEGORIES(yeah)

Retrieve all Up pre-defined categories, including parent categories.

UP_TAGS(yeah)

Retrieve all your user-defined tags.

UP_PING(yeah)

Ping the Up API to validate your token.

UP_TRANSACTIONS(yeah, filterQuery, type)

Retrieve transactions across all of your Up accounts.

Kind: global function
Returns: Up Transactions
Customfunction:

Param Type Default Description
yeah Dependencies.
filterQuery string The filter querystring to use, e.g. "filter[status]=HELD&filter[category]=booze".
type "DEBIT" | "CREDIT" Further filter transactions by direction (ALL/CREDIT/DEBIT).

Example

=UP_TRANSACTIONS(Yeah, "filter[category]=takeaway", "DEBIT") // All outgoing transactions classified as "takeaway".

UP_TRANSACTIONS_BETWEEN(yeah, since, until, filterQuery, type)

Retrieve all transactions between two dates.

Kind: global function
Returns: Up Transactions
Customfunction:

Param Type Default Description
yeah Dependencies.
since Date The start date.
until Date The end date.
filterQuery string The filter querystring to use, e.g. "filter[status]=HELD&filter[category]=booze".
type "DEBIT" | "CREDIT" Further filter transactions by direction (ALL/CREDIT/DEBIT).

Example

=UP_TRANSACTIONS_BETWEEN(Yeah, TODAY() - 7, TODAY()) // All transactions in the last week.

Example

=UP_TRANSACTIONS_BETWEEN(Yeah, A1, B1) // All transactions between the dates set in cells `A1` and `B1`.

UP_TRANSACTIONS_FOR_ACCOUNT(yeah, accountId, filterQuery, type)

Retrieve transactions from a specific Up account.

Kind: global function
Returns: Up Transactions
Customfunction:

Param Type Default Description
yeah Dependencies.
accountId string The Up Account ID.
filterQuery string The filter querystring to use, e.g. "filter[status]=HELD&filter[category]=booze".
type "DEBIT" | "CREDIT" Further filter transactions by direction (ALL/CREDIT/DEBIT).

Example

=UP_TRANSACTIONS_FOR_ACCOUNT(Yeah, "aaaa-bbbb-cccc-dddd-eee") // All transactions for the specified account.

UP_ACCOUNTS(yeah)

Retrieve all your Up accounts, including balances.

Kind: global function
Returns: Up Accounts
Customfunction:

Param Description
yeah Dependencies.

Example

=UP_ACCOUNTS(Yeah) // Get all accounts.

UP_CATEGORIES(yeah)

Retrieve all Up pre-defined categories, including parent categories.

Kind: global function
Returns: Up Categories
Customfunction:

Param Description
yeah Dependencies.

Example

=UP_CATEGORIES(Yeah) // Get all categories.

UP_TAGS(yeah)

Retrieve all your user-defined tags.

Kind: global function
Returns: Up Tags
Customfunction:

Param Description
yeah Dependencies.

Example

=UP_TAGS(Yeah) // Get all tags.

UP_PING(yeah)

Ping the Up API to validate your token.

Kind: global function
Returns: Up Ping
Customfunction:
Example

=UP_PING(Yeah) // Ping the API.