This is very much still WIP, but i've been building a library for the Basecamp 3 api so i can build a bunch of automations against that.

Here is a gist of the lib file:

https://gist.github.com/peterjohnhunt/128ded029c93fb8f6c4845df7fc590c2

and here is an example of how it could be used to create a task

// Menu: Basecamp - Create Task
// Description: Create a Basecamp task

let { me, selectTodoList, createTodo } = await lib("basecamp")

let list = await selectTodoList()

setHint(`${list.bucket.name} - ${list.title}`)

let title = await arg('Task name:')

let today = new Date()
let dd = String(today.getDate()).padStart(2, '0')
let mm = String(today.getMonth() + 1).padStart(2, '0')
let yyyy = today.getFullYear()

let response = await createTodo({
  content: title,
  assignee_ids: [me.id],
  due_on: `${yyyy}-${mm}-${dd}`
}, list.bucket.id, list.id)

setHint(`${title} Created!`)

wait(2000)