You can use the Update for MongoDB node.
The node's Upsert property default setting is set to true - meaning that an existing document will be updated but if the document does not exist, a new document will be created.
See the 'Interfaces and Adapters' > 'Update For MongoDB' topic in the Help documentation. This information is also available for the latest version of the product, here.