Query Workspace for date of latest draft creation

Hello, Is it possible to query a Workspace from within an action to find the creation date, specifically the month, of the most recent draft in that Workspace?

Yes. If your workspace is already sorted by date, you can just query the workspace and grab the first or last draft and go from it’s date, like:

let workspace = Workspace.find("MY-WORKSPACE-NAME")
let drafts = workspace.query("all") // could also use "inbox" if you only care about the inbox

// get first draft's creation, assuming workspace sorts by created descending...
let mostRecentDate = drafts[0].createdAt

Thank you very much. This is ideal. I can build an action from here.