MongoDB Atlas - Insert documents action

This action inserts a batch of documents with a fixed structure into a MongoDB Collection. When we say "fixed", we mean that you know all the possible fields a document can have.

Note: If any of the following are true, use the Replicate documents action instead:

  • The documents' schema is flexible or unknown, or
  • You want to update existing records

Limitations


Input

FieldDescription
CollectionThe name of the target database collection where documents will be inserted. Note: Names are case-sensitive.
Document schemaDefines the schema of the documents to be inserted. You can add fields manually or provide sample JSON using the Schema generator. Note: For integer and decimal data, there are a few limitations to be aware of.
Input documentDefines the mapping between source data and the MongoDB documents to be inserted.

Output

FieldDescription
Collection nameThe name of the target database collection where documents were inserted.
Inserted IDsAn array of _id values of the inserted documents.
Number of documents insertedThe total number of documents inserted into the collection.

Resources

Last updated: