Connect Superblocks to MongoDB to build apps with read and write access to a MongoDB instance:
- Read data from MongoDB and utilize it in API steps or UI components
- Save information retrieved by other API steps or UI components by writing data to a database
Setting up MongoDB
1. Add integration
Select MongoDB from the integrations page.
2. Configure settings
Fill out the form with the following settings:
|Name||Name that will be displayed to users when selecting this integration in Superblocks|
|Connection URI||Connection URI used to connect to a MongoDB instance. See Connection URI Docs for standard format.|
|Database Name||Name of database to connect to|
3. Test and save
Click Test Connection to check that Superblocks can connect to the data source.
After connecting successfully, click Create to save the integration.
4. Set profiles
Optionally, configure different profiles for separate development environments.
Creating MongoDB steps
Connect to your MongoDB integration from Superblocks by creating steps in Application APIs, Workflows, and Scheduled Jobs. Depending on the permissions of the database user configured in the integration (read only, read/write, write only), you can configure a Superblocks MongoDB step to read from and/or write to a database. To get started, enter your query into the text area of the MongoDB step. Then click "Run" to see the Result and Executed Operation below.
Query syntax examples
The MongoDB integration supports the MongoDB Extended JSON (v2) query syntax. Here are some examples on referencing certain data types:
Visualize data from MongoDB in UI components like charts, tables, and grids.
Enrich customer order data with sales data from MongoDB combined with data from other sources, like Snowflake.
Send out a daily report via email of the latest sales data.
Check out our guide on common errors across database integrations, in addition to common MongoDB connection issues. If you are encountering an error that you don't see in the guide, or the provided steps are insufficient to resolve the error, please contact us at email@example.com.