Add new rows to Google Sheets for new MongoDB documents
MongoDB + Google Sheets
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.
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:
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.
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.
MongoDB + Google Sheets
Typeform + MongoDB
Google Sheets + MongoDB
MongoDB + Slack
MongoDB + Mailchimp
Webhooks by Zapier + MongoDB
Get started with a Free account