节点与集成

MongoDB credentials

You can use these credentials to authenticate the following nodes:

Prerequisites

  • Create a user account with the appropriate permissions on a MongoDB server.
  • As a Project Owner, add all the n8n IP addresses to the IP Access List Entries in the project's Network Access. Refer to Add IP Access List entries for detailed instructions.

If you are setting up MongoDB from scratch, create a cluster and a database. Refer to the MongoDB Atlas documentation for more detailed instructions on these steps.

Supported authentication methods

  • Database connection - Connection string
  • Database connection - Values

Related resources

Refer to the MongoDBs Atlas documentation for more information about the service.

Using database connection - Connection string

To configure this credential, you'll need the Prerequisites listed above. Then:

  1. Select Connection String as the Configuration Type.
  2. Enter your MongoDB Connection String. To get your connection string in MongoDB, go to Database > Connect.
  3. Select Drivers.
  4. Copy the code you see in Add your connection string into your application code. It will be something like: mongodb+srv://yourName:yourPassword@clusterName.mongodb.net/?retryWrites=true&w=majority.
  5. Replace the <password> and <username> in the connection string with the database user's credentials you'll be using.
  6. Enter that connection string into n8n.
  7. Refer to Connection String for information on finding and formatting your connection string.
  8. Enter your Database name. This is the name of the database that the user whose details you added to the connection string is logging into.
  9. Select whether to Use TLS: Turn on to use TLS. You must have your MongoDB database configured to use TLS and have an x.509 certificate generated. Add information for these certificate fields in n8n:
  • CA Certificate
  • Public Client Certificate
  • Private Client Key
  • Passphrase

Refer to MongoDB's x.509 documentation for more information on working with x.509 certificates.

Using database connection - Values

To configure this credential, you'll need the Prerequisites listed above. Then:

  1. Select Values as the Configuration Type.
  2. Enter the database Host name or address.
  3. Enter the Database name.
  4. Enter the User you'd like to log in as.
  5. Enter the user's Password.
  6. Enter the Port to connect over. This is the port number your server uses to listen for incoming connections.
  7. Select whether to Use TLS: Turn on to use TLS. You must have your MongoDB database configured to use TLS and have an x.509 certificate generated. Add information for these certificate fields in n8n:
  • CA Certificate
  • Public Client Certificate
  • Private Client Key
  • Passphrase

Refer to MongoDB's x.509 documentation for more information on working with x.509 certificates.

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明