# 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

Field Description
Collection The name of the target database collection where documents will be inserted. Note: Names are case-sensitive.
Document schema Defines 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 document Defines the mapping between source data and the MongoDB documents to be inserted.

# Output

Field Description
Collection name The name of the target database collection where documents were inserted.
Inserted IDs An array of _id values of the inserted documents.
Number of documents inserted The total number of documents inserted into the collection.

# Resources

Last updated: 1/11/2022, 5:21:18 PM