MongoDB Help & Support
What MongoDB Triggers and Actions are Supported?
- New Field - Triggers when you add a new field to a collection.
- New Document - Triggers when you add a new document to a collection.
- New Collection - Triggers when you add a new collection.
- New Database - Triggers when you add a new database.
- Create Document - Create a new document in a collection of your choice.
How to Get Started with MongoDB
The hardest part of connecting to MongoDB is getting the connection settings right. When connecting a new MongoDB account these are the fields you are presented with:
Host The IP address or hostname (db.example.com) of where your database instance resides. Make sure it is accessible from outside your network. We send out database connections from the IP addresses listed below.
Port 27071 is the default, change it if you're using a non-standard port.
Database Name of the database to read data out of.
Username Username with access to the database. We recommend creating a brand new Zapier-specific user with highly limited permission scope.
Password Similar to the username, make this a unique strong password (check out https://random.org).
Note: all fields are stored encrypted in our database. Of course, we have the encryption keys on hand but they are stored separately to minimize risk. Nonetheless, we recommend not hooking a production database to Zapier. Instead, set up an intermediary database to connect with Zapier then dump data back to your main production database using some out-of-band process.
Common Problems with MongoDB
Is your database IP restricted?#
This is useful if you use a non-AWS host, for example: Rackspace, HostGator, Linode, DigitalOcean, etc. Zapier connections currently come from static IP addresses. Zapier will make connections to your database from an IP located in the us-east-1 region. A list of those IPs can be found at the following URL in JSON format:
Is your database in a VPC?#
If your database is hosted within a VPC, it might not be assigned a public-facing IP address. On AWS, for example, you would need to assign an Elastic IP in a public-facing VPC subnet.
Not all documents are triggering the zap#
Check the field you are using for the
Order By Field. Although the help text suggests using the
_id field, it's possible that the ID field in your database doesn't auto-increment or have the timestamp encoded into it. Sometimes Mongo randomly generates characters for the ID field, and if you order by that field, we'll sort the results in reverse alphabetical order. Once you have over 100 results, any new documents with an ID that starts with a letter in the beginning of the alphabet or with a number will be missed.
To fix, make sure to use an
Order By Field that is either a timestamp or an auto incremented number.
Popular Things To Do With MongoDB
Need More Help? - Our support team is happy to help -- send us a message