Conrad Decker

RSS

Basecamp Bulk Project Delete

I was recently working on an API integration between Shopify & Basecamp and found myself with a large number of projects in Basecamp that I had to remove. From what I could tell, the Basecamp API doesn’t have a way to delete projects (at least it’s not documented) and there’s no bulk delete functionality in the existing UI so I was forced to figure out the easiest way to do this sans clicking and confirming delete for every project.

Upon closer inspection, the confirmation process that Basecamp has in place is interesting. They show a javascript confirmation box which POSTs to a url along the lines of /project_url/project/delete_project. This means running a simple GET request on the URL won’t successfully delete the project.

After playing around for a little while I came up with this simple JS snippet that I ran in my Console in Google Chrome. It embeds JQuery on the page, and loops through the project listing and POSTs to each projects respective delete url’s.

Bulk Project Delete from Basecamp

This snippet is very basic and will delete every project in your account so I wouldn’t recommend utilizing it in it’s current state. With some simple adjustments however, you could easily limit the projects that it deletes. I only wanted to delete specific projects that contained “Order #” in their title. To do so I made the following adjustment. 

Bulk Project Delete from Basecamp With Filter

Both of these could obviously be simplified and run without JQuery but in an attempt to spend as little amount of time as possible getting this working I went with what I knew best. If anyone has a way to simplify this, I’d love to see it. From here, you could even go one step further and turn the snippet into a bookmarklet. That said, I’d have to imagine it’s unlikely that this is something anyone would be doing often.