Issues Connecting MongoDB Atlas with Zapier

I’m working on an automation using Zapier to create a new document in my MongoDB collection every time a new row is added to my spreadsheet.

However, I’m facing difficulties connecting Zapier to my MongoDB Atlas database. The connection string I have works well with other apps, but Zapier refuses to accept it.

In the Zapier connection dialog, I input my MongoDB connection string in the host field, omitting the username and password as they are to be entered separately:

mongodb+srv://:@maincluster-abc123.mongodb.net/mydb?retryWrites=true&w=majority

Yet, I consistently receive the following error message:

maincluster-abc123.mongodb.net:27017: [Errno -5] No address associated with hostname

I’ve confirmed that my Atlas cluster is operational and accessible, as I’m able to connect with other tools using the same details.

What should I enter in the host field for the MongoDB connection in Zapier? Is there a specific format that I need to follow different from the usual Atlas connection string?

same problem! double check your network access in atlas - u might need to add your ip or set it to 0.0.0.0/0 just for testing. also, make sure the db name in the string is correct. that helped me!

Had the exact same problem with Zapier and MongoDB Atlas. Zapier can’t handle the SRV connection string format. You need to use the standard format instead - no ‘+srv’. Go to your Atlas dashboard and grab the connection string for drivers 3.4 or earlier. It’ll look like: mongodb://maincluster-shard-00-00-abc123.mongodb.net:27017,maincluster-shard-00-01-abc123.mongodb.net:27017/mydb. Just put the hostname (skip the ports) in Zapier’s host field and you’re good to go.

Zapier struggles with MongoDB Atlas’s SRV connection strings. To resolve this, access your Atlas dashboard and select your cluster’s connection settings. Opt for ‘Connect your application’ and choose the driver version 3.4 or earlier, which provides the standard connection format with individual host addresses. Only copy one host address into Zapier’s host field, excluding ‘mongodb://’ and port numbers. For the authentication database, use ‘admin’ unless you have modified that in Atlas.