Using Upsert function when you don't know the objectId ahead of time

The problem is right here:

The argument says “objects” (plural). The argument you are passing is a single object, but it must a list. All bulk operations expect a collection of objects.