More Q and A

More Questions and Answers about how to use Mojito


Feel free to post a comment below and ask any question you have about how to use Mojito. I will try to answer it.



Q: On the Budget tab, what is the Budget Amount column for, in addition to the Expected Amount column? It doesn't seem like I need to use it... is that correct?

A: The "Budget Amount" column is where you specify the budget you are aiming for. The "Expected Amount" column is automatically calculated based on your start/end dates.


So if you have a Budget Amount for Food set at $100 per month, and you select "Last 3 months" as the date range, then the Expected Amount will be calculated to be $300.

FYI, don't edit cells with a light gray background. These cells are calculated based on formulas or scripts behind the scenes. (Note: You can edit the Budget Amount of the "Everything else" row.)



Q:  I would like to separate out business travel expenses from the rest of our travel expenses. I have a "business" tag. I want one budget item (row on the Budget sheet) to be business ( travel + hotel + airlines + taxi,parking+ restaurants). Is there a way to use parentheses or do I have to make a business and a non business tags to separate the two groups?

A: Mojito can do exactly what you want. Just tag your business expenses with the "Business" tag, as you are already doing, then on the Budget sheet, add a Budget item row for "Business Expenses", set the desired Monthly Budget amount, and enter your "Business" tag in the Include Category + Tags column. Now, the trick to preventing those business expenses from showing up in the other budget items is to exclude the "Business" tag from your budgets (under the Budget Options section). I know this sounds counter intuitive. How can we exclude the Business tag and still have a budget item track business expenses!? Here's why it works: the Category + Tags column overrides the excluded categories / tags list. So, when you explicitly list an excluded category or tag for one of your budget items, the budget item will "win". Since your other budget items do not explicitly list the excluded "Business" tag, none of your transactions tags with "Business" will be included in those calculations. I hope that made sense. If not, here is a picture to help you set it up.





Q: I got the error message {your error message here} when I was importing my transactions from Mint. Do you know what the problem is?

A: No idea. It could be something in your transaction data that is causing a problem for Mojito. To help us troubleshoot the problem, turn on debug logging.

  1. In the menu, select Tools > Script editor.
  2. Open the SheetTriggers.gs file (it may be opened for you automatically).
  3. Near the top of that file, find this line:
         Debug.enabled = false;
  4. Change the value to true:
         Debug.enabled = true;
  5. Save and close the script window and close Mojito, then re-open Mojito and try to import again.
  6. Assuming the error happens again, open the log window via the menu:
    Mojito > Display log window
  7. If you don't like debugging code :-) just paste the debug log output into an email and send it to me. b3devs@gmail.com
  8. If you DO like debugging code, feel free to look through the debug log. Your error should appear at the end. Hopefully, the debug log will tell us exactly where (line number and script file) where the error occurred. Also, the log entries that precede the error may give us a clue what is happening.
  9. Don't forget to turn debug logging off when you are done:
         Debug.enabled = false;
    The debug log has a max size, and if you use Mojito for several minutes with debug logging enabled, you will exceed that max size and start getting errors.



Q: I was looking through the Mojito code and noticed that all of the heavy lifting seems to be done by another "library" called MojitoLib. What is the MojitoLib library?

A: I moved a lot of the code into the MojitoLib library so that I could make bug fixes without everyone having to download a new copy of the Mojito spreadsheet or manually fix the code themselves (which they had to do back in October 2013...). Now that Mojito uses the library, users can get the latest bug fixes by opening the spreadsheet script, selecting the Resources > Libraries menu item, then selecting the latest version of MojitoLib from the drop down list.

Q: Couldn't you or some other random person who gets your credentials change MojitoLib and then send our data elsewhere, potentially?

A: Not exactly. The spreadsheet is locked (linked) to a specific version of the MojitoLib library. When a "version" of the library is created, it can't be changed, so I (or anyone else) can't silently change the MojitoLib code that your Mojito spreadsheet is using. You would have to manually change which version of MojitoLib your spreadsheet is using, or download a new copy of the Mojito spreadsheet that is pointing to a different version.

Q: How can I access the source code of that library?

A: You can view the actual MojitoLib script project here. Also, the code for MojitoLib is open source and is available on GitHub.

Q: Can I build and use my own copy of MojitoLib instead of using the shared one?

A:  Download the MojitoLib code from GitHub and follow the steps in the README to build and upload your own copy of MojitoLib to your personal google account. (Hopefully the steps in the README still work?? I'm sure there are newer / better tools to simplify this now ...).

62 comments:

  1. can i download and use in excel?

    ReplyDelete
    Replies
    1. Hi Jack. Sorry, you can't export Mojito as an Excel file and use it in Excel. Mojito is not just cells and formulas. It makes heavy use of Google Apps Script, so it is effectively a standalone online application. You can only use Mojito as a Google spreadsheet.

      -b3

      Delete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. This comment has been removed by a blog administrator.

      Delete
    3. This comment has been removed by the author.

      Delete
  3. I've tried syncing Mojito to Mint.com several times. The OK button just greys out. I tried downloading only a few transactions; the same thing happens. I even signed onto Mint.com first. Nothing works. Now what?

    ReplyDelete
    Replies
    1. Hi James,

      Does it get stuck on the login window, or is it the "Import transactions from Mint" window? Also, is there a little popup message in the lower right that says "Waiting for Mint to sync data from your financial institutions"? That can take a minute or two sometimes.

      If it's just the import that seems to be hanging, can you turn on debug logging and send me the log output? Instructions for how to do that are described further up on this page (More Q and A).

      Thanks,
      -b3

      Delete
  4. I am also having issues using Mojito. I gave it the permissions it requested, but when I click on "Sync all with Mint" then I get a blank popup window that says "Log in to Mint" but no content inside the window. I turned on Debug logging and this is all I get. I am using Chrome Developer Release 44 64bit but I just tested the spreadsheet on IE10 and it works there. I will continue using Internet Explorer for the time being and will also test the spreadsheet on a stable release non-64bit version of Chrome as well and see what happens.

    [2015-04-22 20:31:58.GMT] Login timeout: Ignoring. Window is not open yet.
    [2015-04-22 20:32:04.GMT] Login timeout: Assuming login window has been closed.
    [2015-04-22 20:36:02.GMT] Mint.Session.getCookies: No login cookies in cache
    [2015-04-22 20:36:02.GMT] Login required
    [2015-04-22 20:36:09.GMT] Login timeout: Ignoring. Window is not open yet.
    [2015-04-22 20:36:16.GMT] Login timeout: Ignoring. Window is not open yet.
    [2015-04-22 20:36:23.GMT] Login timeout: Ignoring. Window is not open yet.
    [2015-04-22 20:36:29.GMT] Login timeout: Assuming login window has been closed.

    ReplyDelete
    Replies
    1. Hi Josh, Thanks for debugging the issue a little bit with different browsers. My guess is that Google has been making some back end changes that are causing problems for some people. Hopefully they'll get it resolved soon.

      -b3

      Delete
  5. GREAT APP!!!
    You saved my life(not literally but it sound nice)
    I can not find how to sync automatically
    Could you please help me?

    ReplyDelete
    Replies
    1. Hi eddy,

      Sorry for the (very) late reply. Mojito does not automatically sync with Mint on a recurring interval. However, you should be able to set that up yourself by adding a little bit of code.

      First, you'll need to specify your Mint password on the Settings sheet (it will be hidden).

      Second, you'll need to add a time-driven trigger to your copy of Mojito ( https://developers.google.com/apps-script/guides/triggers/installable#managing_triggers_manually ). Select 'onMenu_1' as the function to run when the timed trigger executes. (The onMenu_1 function is mapped to the "Sync all with Mint" menu item.)

      I haven't set up automatic re-syncing myself, so there may be more steps involved to get it working. If you have success, please post an update here on what you had to do!

      Thanks,
      -b3

      Delete
    2. Hi! Amazing tool you've built here! I've tried setting up a trigger to see if it works. I've noticed that if I wait a while and try to get data again, it asked me for the headers again, even though I've entered my password. I wasn't able to locate anyone else online talking about this so I figured I'd check here to see if automatic syncing is still possible.

      Thanks!

      Delete
    3. Hi there,

      Wanted to chime in that the same thing is happening for me - I have a trigger set to run onMenu_1 on a daily basis, and have entered my password/email on the Settings sheet.

      Upon checking at a later date, the spreadsheet has not updated. When I go into the Script Editor and run onMenu_1 manually, the spreadsheet re-prompts me for the HTTP headers.

      Any help would be much appreciated. Thanks!

      Delete
  6. This tool is quite good. Thank you for developing it.

    Quick Question (I hope). I am programmatically wanting to pull the details for the In/Out tab into another sheet but want to pull it for certain dates and then combine the income/expenses, etc to show trends over time...

    long story short, rather than me writing code to pull in each transaction, can I leverage the code you have running on the In/Out page to just pull out the income/expenses/balance details for a given date range?

    I just don't know what function to call? Sorry my depth of AppsScript isn't enough to be able to figure this out

    ReplyDelete
    Replies
    1. Hi Robert,

      I don't have any code "as-is" to do what you want, but I've cobbled together some bits and pieces that will let you grab transaction data from the TxnData sheet within a given date range and insert it into another sheet (you specify the sheet name). Hopefully this helps. You can figure out the rest from the Google Apps Script docs, StackOverflow, etc.

      -b3

      - - - - - - - - - - - - - - - -

      // In the script editor, define these functions.

      function getTxnsInDateRange(startDate, endDate) {
      var matchingTxnData = [];
      // Get all of the txn data in a 2D array
      var txnDataRange = MojitoLib.Utils.getTxnDataRange();
      var txnData = txnDataRange.getValues();

      // Loop through the array of transactions
      var txnDataLen = txnData.length;
      for (var i = 0; i < txnDataLen; ++i) {
      var txnRow = txnData[i];
      var txnDate = new Date(txnRow[Const.IDX_TXN_DATE]);
      if (txnDate < startDate || txnDate > endDate) {
      continue; // skip txns that are outside of the desired date range
      }

      // Save this txn that is withing the desired date range
      matchingTxnData.push(txnRow);
      }

      return matchingTxnData;
      }


      function getYtdTxns() {
      var today = new Date(); // today
      var jan1st = new Date(today.getFullYear(), 0, 1); // month is zero-based

      return getTxnsInDateRange(jan1st, today);
      }


      function copyYtdTxnsToSheet(sheetName) {
      var values = getYtdTxns();
      var rowCount = values.length;
      var colCount = (rowCount > 0 ? values[0].length : 0);

      // Get a range of cells in the new sheet and write the values to it
      var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName);
      var range = sheet.getRange(1, 1, rowCount, colCount);
      range.setValues(values);
      }

      Delete
  7. Oh, and does Mojito expose Zillow zestimates at all? Just curious!

    ReplyDelete
  8. Hi,
    I have been test driving Mojito for about a few months now. And I since then I was able to see the generated Charts based on the AccountData sheet tab.

    However today, I created a new sheet and linked to Mint again.
    This time I see that the charts are not being generated at all.

    I realized that the downloaded content for the dates in the first column
    appear to be in the Timestamp format now.

    Here is an excerpt of the first column data now.
    1/1/2015 3:00:00
    1/2/2015 3:00:00
    1/3/2015 3:00:00
    1/4/2015 3:00:00
    1/5/2015 3:00:00
    1/6/2015 3:00:00
    1/7/2015 3:00:00

    This is causing the charts now to not be generated as it is expecting the one of the ranges
    to be in a date format only.
    Any ideas or fixes or anyone else noticed this ?

    ReplyDelete
  9. Hi -- love using Mojito, thank you for making it! Recently during a sync I got the error message "Update failed" when it tried to save my changes back to Mint. Any idea what typically causes this?

    ReplyDelete
  10. This is awesome, thank you ever so much!!

    I would like to use YNAB and import in a CSV. But the CSVs need to be formatted in a certain way and split out by account. Is there an easy way to modify the functions you did for Robert to split the transactions out into tabs by Account? After that, I can do the heavy lifting of formatting it in a YNAB-readable way (Date, Payee, Category, Memo, Expense Amount, Income Amount).

    ReplyDelete
    Replies
    1. Hi Dana,

      Sorry, I don't have time to figure out the required code, but you should be able to achieve what you are trying to do by using a simple spreadsheet function.

      Create a new sheet (tab) in Mojito, and put this in the A1 cell:

      =filter(TxnData!A5:M2000, TxnData!C5:C2000 = "My Credit Card Account")

      Change "My Credit Card Account" to the account name you see in column C of the TxnData sheet. Create a new sheet for each account you want (and update the formula for each sheet).

      -b3

      Delete
    2. That worked wonderfully, thanks so much!!

      Delete
  11. Hi.
    Thanks for creating Mojito!
    I'm trying to use it, I'm able to import the transactions + account balances, but I can't get any budget to be run. It's like I don't have any matched transaction (eg. for budget "coffee" I do have transactions with the category "coffee shop" but nothing happens. Any idea what could be wrong?

    ReplyDelete
    Replies
    1. Hi Michel, the category name (or tag) in the "Include Category + Tags" column of the Budget sheet must exactly match the Category (or tag) in Transactions sheet. So, for example, I have budget category+tags like "Coffee Shops" for coffee expenses and "Utilities,Gas Utility,Electricity Utility" for utility expenses.

      Also, make sure the date range at the top of the Budget sheet covers the transactions you're interested in.

      Delete
  12. I believe that's what I have.

    Budget:
    https://www.dropbox.com/s/qp05crph4ohrs5v/Screenshot%202016-04-01%2022.02.46.png?dl=0

    Transaction:
    https://www.dropbox.com/s/38ss3yu01u9hmja/Screenshot%202016-04-01%2022.03.28.png?dl=0

    But it doesn't get colored. Date range is also good.

    ReplyDelete
  13. I do notice something weird, on the TxData tab. The budget matches colored cells appear below the actual transactions:

    https://www.dropbox.com/s/9hjelqb2b9ye63b/Screenshot%202016-04-01%2022.07.00.png?dl=0

    Could that be related? (I had that the first time, removed and reinstalled Mojito, same thing).

    ReplyDelete
  14. Houston, I am having problems!!

    I am using mojito for more than two years (Thanks!!), and today it is failing

    After "sync all" and receiving "login succeeded" , mojito shows:
    "Unable to determine if Mint is ready. Error: error code 1 /code description Session has expired. /description name /name type /type /error
    "

    (I removed the brackets as i cannot post HTML code)
    Am i doing something wrong?

    ReplyDelete
    Replies
    1. I see the problem too. :-( Several users have run into it already. I've posted a note on the blog to alert others. Thanks for the heads up.

      http://b3devs.blogspot.com.es/2016/05/recent-mint-change-has-broken-mojito.html

      Delete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Hi,
    I get the following errors when updating account balances:
    Error: Data retrieval failed. HTTP status code: 301
    TypeError: Cannot read property "length" from undefined.

    I increased the number of columns. Any other recommendations?
    Thanks

    ReplyDelete
  17. Things have been working great except it seems chrome is changing to make the new work around harder to use:

    1) Select All (CTRL+A) no longer works to select the headers, so I have to manually click and drag to select.
    2) Headers don't work to authenticate for me anymore, I am getting an error that the "Cookie:" heading can't be found. Well, I figured out that's because the "c" in "Cookie" isn't capitilized in the headers when copying from Chrome. By changing that one letter it now works again.

    ReplyDelete
    Replies
    1. I have fixed the second issue (version 1.1.6.2). Thanks for figuring out the problem. To your first point, yes, it is annoying that Ctrl+A doesn't work anymore...

      -b3

      Delete
  18. This is amazing. You do fantastic work. Just wanted to let you know that this revolutionized they way I do budgeting. Thanks so much for your efforts

    ReplyDelete
  19. Thanks. I'm glad you're finding it useful. :)

    ReplyDelete
  20. I can't seem to connect my mint session anymore. The box pops up has the title "Mint Authentication - HTTP Headers" With no box to paste the data from Mint into. It's just blank. I updated to the latest version of Mojito. It used to work fine.

    ReplyDelete
    Replies
    1. Hmmm. I tried it just now, with a new copy of Mojito. The auth window showed up fine. I am using the Chrome browser. Also, you should use Mojito on a full computer (or laptop). I'm not sure if Mojito works on mobile phone/tablet browsers.

      -b3

      Delete
    2. I just tried it in Incognito Mode and it worked fine. I'm guessing it's one of my chrome extension blocking something and causing trouble.

      Delete
  21. Somehow the many of my transactions dates get pushed back in time 19 days. I haven't been able to figure out how this happens. I don't expect you to necessarily fix my problem, but I do notice in the getJsonData.xevent response from mint, they provides 2 date fields, date and odate. Could you expose the odate field on the txnData sheet? This would make it very easy for me to identify my problem transactions and easily correct this error when it happens.

    Thanks for all you do. You've built a great tool!

    ReplyDelete
    Replies
    1. Hi Ben, sorry for the belated reply. I updated the code to use the 'odate' field if available and fallback to the 'date' if not. Hopefully that solves your problem. The new version is 1.1.6.3. You can just update your MojitoLib version to get it (see the FAQ page for how to do that).

      Delete
  22. Thank you for sharing your excellent software wtih the communtiy.

    I have been using Quicken for many years to track various accounts, and of late the syncing has become increasingly quirky. I am finding Mint much more reliable in that regard.

    I get reimbursed for various business expenses quarterly, using itemized expense reports generated from Qucken (organizing the itemized transactions by category/tag) with custom dates. Is it possible to create reports like that from Mojito, or alternatively, do you have any other suggestions about how I might generate these types of reports from Mint data?

    ReplyDelete
  23. Good morning. First off, fantastic work, this is amazing. I do have one problem though. All my transactions (except Groceries) came thru as "Everything Else" with the gray color attached to it. Is there a way to easily edit it?

    ReplyDelete
    Replies
    1. Sounds like your Budget sheet doesn't have any categories or tags that match any of your transactions. Maybe the tutorial can help (??). http://b3devs.blogspot.com/p/tutorial-10x.html?m=1#budgets

      Delete
  24. Hello,
    Is there a way to set things up to track a couple's finances separately? We are both on the same mint account, but for instance I'd like to see in/out or networth per person instead of household. The same for savings goals and budgeting.

    Otherwise, so far so good! I paid for a subscription to YNAB just before stumbling on your tool. I'm working on setting things up in Mojito to see if I can make the switch and save $$.

    Thanks. I look forward to your reply!

    ReplyDelete
  25. Also,
    I tried deleting a row in the budget area. I get an error that "EVERYTHING ELSE" must be the last row. It is certainly still the last row.
    I also tried copying the junk row to beneath "UNPLANNED EXPENSES" and removing the old empty spot(MUSIC is what I'm trying to remove). I still get the error message this way.

    Thanks!

    ReplyDelete
  26. Trying to connect Mojito to Mint - VERY FRUSTRATING!!!!

    ReplyDelete
  27. I have a credit card that I use with my partner for joint expenses - we put groceries, travel, car and lots of other things on it. Is there a way to automatically split all transactions from this account and only count 50% of them towards my budget? I know I can do this manually in Mint by Splitting each transaction on that card into 2 transactions, and marking one as a duplicate. But that's a ton of manual labor - it would be a huge time saver for me if there was a way to do this in Mojito, but I'm not sure where to start.

    many thanks for this insanely helpful tool!

    ReplyDelete
    Replies
    1. Yeah, you can achieve that in Mojito. It's not exactly "elegant", but it'll work. On the Settings sheet, you can specify an alternative "Amount" column on the TxnData sheet that should be used in budget calculations, etc. So, on the Settings sheet, find the setting labeled "TxnData column to use for txn amounts". Set the value to V5 (indicating that the "V" column should be used as the "Amount" column). Now, go to cell V5 on the TxnData sheet and paste the following formula into it:
      =if(C5 = "Shared CC Account", E5/2, E5)

      (Replace "Shared CC Account" with the exact name of your shared credit card account, as it appears in column C.) Next, copy cell V5 and paste it into every cell below it, V6 to V-whatever. (Just select the whole block of cells at once and Paste.) This formula will divide the amount in the E column in half if the txn is from the shared credit card account, otherwise, it will leave the amount unchanged. Now, go to the Budget sheet and click the Recalc button. The budget totals should now reflect the amounts in the V column. One possible annoyance: I'm not sure about this, but you may need to re-paste the formula in to column V each time you download your latest txns from Mint.

      Hope this helps.
      -b3

      Delete
  28. I love using Mojito, thank you!!

    I would love to be able to update the data in Mojito without having to use the desktop version.

    Is there a way to update Mojito using the Google Sheets mobile app (I haven't been able to get this to work) or to create a script that would allow Mojito to update automatically?

    Basically, is there any way I can update the data in Mojito without getting on my laptop?

    Thanks!!!

    ReplyDelete
    Replies
    1. Unfortunately, no. The Google Sheets mobile app doesn't run scripts. Mojito is not just a spreadsheet with formulas, it makes heavy use of Google Apps Script to connect to Mint.com, download data, update budgets, etc.

      You can open Mojito in a mobile web browser, but the last time I tried that, it was pretty slow and clunky. YMMV

      -b3

      Delete
  29. I just started using Mojito and have a couple of probably basic questions. Is it possible to remove rows from the budget? Is it possible to sort the budget rows alphabetically? I'm getting errors in both cases. Thanks!

    ReplyDelete
  30. Help! I keep getting "Unable to find "cookie:" entry in HTTP headers" or "Unable to find "token:" entry in HTTP headers" I've tried a few times, still no luck. What am I doing wrong?

    Thanks in advance,
    s.

    ReplyDelete
  31. Hi I keep getting the following error:

    Error: Unexpected error. The 'Everything else' item should be the last row in the 'BudgetItemsRange' named range!


    From what I read this issue was fixed in release 1.1.4.3 (2014.12.06). I'd appreciate any help/advice as to how I should fix this.

    ReplyDelete
  32. I'm not sure if I'm just oblivious, but where is the "connect mojito to your active mint session" button and/or the "Mojito" menu? I can't find it to get started.

    ReplyDelete
    Replies
    1. The Mojito menu is located at the top, next to the Help menu. It may take a few seconds for it to appear after you open the spreadsheet. You can also trigger the connection dialog to appear by clicking the Sync All button on the About sheet. The first time you do this, you will have to authorize the scripts to run, which Google makes somewhat painful (to protect you from getting hacked).

      Delete
  33. Great tool but I see 2 things that are confusing; (1) All my income shows up as negative. Is there are reason this is showing as negative? (2) When setting my budget, I accidentally typed in the expected and actual amount manually in the gray boxes. This is before I read where we shouldn't type in the gray boxes so did I break anything?

    ReplyDelete
  34. I've been getting this error recently... how do I correct?

    Exception: UiApp has been deprecated. Please use HtmlService instead.

    ReplyDelete
    Replies
    1. Nothing you can do. Google no longer supports the method I am using to display dialog windows. The only thing that really works at this point is "Sync All" because it doesn't show any dialog windows.

      I am in the process of re-writing the various windows that are broken. Hopefully will finish sometime this week.

      Delete
    2. I have fixed the problem. Check out my latest blog message for details. https://b3devs.blogspot.com/2019/02/mojito-version-121-is-available-fixes.html

      Delete
  35. Is there a way to add transactions to Mint through Mojito? I have a gap in transactions due to not logging in for a while, and aside from adding transactions one-by-one in Mint I can't seem to find a way to do this (efficiently).

    ReplyDelete
  36. Hello I have loved using mint but after using your most recent work around to connect my mojito account and import my transactions, nothing is showing up on the budget page. I can see my imported transactions on the trans. page but nothing on the "actual amount" column in the budget. Can you help? Thank you!

    ReplyDelete
    Replies
    1. I recopied last year's mojito again and this time it worked! I'm not sure why but happy that it does -

      Delete