AboutBlog

Tiny Rage at Expense Reporting Software

Expensify doesn’t let you add groups of people to expenses.

This is a sentence I’ve now typed to a search engine, a support forum, and finally a chatbot, in increasing states of despair. The answer is always the same: no, you cannot. You must add each attendee individually, like a medieval scribe copying out the names of the damned.

I organize a lot of company events. The last offsite generated 28 expenses, each requiring 20 attendees. That’s 560 individual copy-paste operations. At roughly one second each, (I’m quite fast, it’s one of my few marketable skills) I spent nine and a half minutes clicking a text field, pasting an email, waiting for a dropdown, and pressing enter.

Some people aren’t even searchable by email, only by name. Why? No idea. Keeps you alert, I suppose.

I’ve raised this with our accounts payable team three times now. The third time, I cc’d a colleague, who gently pointed out that I was “misdirecting my annoyance.” She was right. The AP team didn’t build Expensify. They’re just trapped here with me.

Anyway, I wrote a bookmarklet. It took about 20 minutes, which means it’ll pay for itself by the fourth offsite.

The only interesting bit is that Expensify uses React, so you can’t just set an input’s value like a normal person. React doesn’t trust you. It keeps its own private record of what the input contains, and if you try to change it directly, React ignores you—a text field with trust issues. So you have to call the native value setter and dispatch synthetic beforeinput and input events to trick React into believing a human is typing. Then you send fake arrow-key and enter events.

The bookmarklet generator below will create one for your own list of attendees. Enter your emails, click generate, then drag the link to your bookmarks bar (or create a new bookmark and paste the code as the URL). To use it, focus the attendee input field in Expensify and click your bookmarklet.

I spent longer writing this blog post than I would have spent adding attendees manually for the next two years. But at least now my suffering has content.


with ❤️ from kevin