Integrate MongoDB and Leonardo AI to automate workflows with scalable backend

Connect MongoDB and Leonardo AI nodes to in your workflow. Integrate with any tool or database and ship powerful backend logic and APIs instantly - No code required!

getting started

How To Connect MongoDB and Leonardo AI

Supported Triggers & Actions

MongoDB NODES

MongoDB Trigger

Trigger a workflow on data changes in your MongoDB database. Parse the incoming data payload from MongoDB and create a workflow connected to other apps. Check out the [Full Documentation](https://docs.buildship.com/trigger-nodes/mongodb-trigger) on how connect to your MongoDB project.

Delete Document

Deletes a document from a specified collection in MongoDB by document ID and returns the operation response.

Fetch Document

Fetches and returns the entire document data from a MongoDB collection based on the given document ID.

Full Text Search

This performs a full-text search in a specified MongoDB collection, conducts the search, returns matched documents. To enable full-text search (FTS) in MongoDB, follow this [guide](https://docs.buildship.com/tutorials/mongodb-search#full-text-search) on setting up MongoDB Search Index.

Hybrid Search

This performs a hybrid search in a specified MongoDB collection, conducts the search, returns matched documents. To enable semantic search in MongoDB, follow this [guide](https://docs.buildship.com/tutorials/mongodb-search#hybrid-search) on setting up search indexes.

Insert Document

Inserts the given data into a MongoDB collection and returns the ids of the inserted documents.

Query Collection

Queries for multiple documents in a MongoDB collection using connection string, database name, collection name, query, sort, and projection.

Semantic Search

This performs a semantic search in a specified MongoDB collection, conducts the search, returns matched documents. To enable semantic search in MongoDB, follow this [guide](https://docs.buildship.com/tutorials/mongodb-search#semantic-search) on setting up vector search index.

script

Update Document

Updates a specific document in a MongoDB collection using the updateOne function and returns the operation result.

script

Leonardo AI NODES

Generate Image

This endpoint generates images with the given generation prompt and returns the Generation ID.

script

Generate Prompt

This endpoint returns a random image generation prompt.

script

Improve Prompt

This endpoint returns an improved image generation prompt.

script

Upload Dataset Image

This endpoint uploads the given file buffer to the signed URL provided by the **Upload Init Image** node. Detailed instructions for using this endpoint are available in the guide: [How to upload an image using a presigned URL](https://docs.leonardo.ai/docs/how-to-upload-an-image-using-a-presigned-url).

script

Upload Init Image

This endpoint returns a random image generation prompt. Detailed instructions for using this endpoint are available in the guide: [How to upload an image using a presigned URL](https://docs.leonardo.ai/docs/how-to-upload-an-image-using-a-presigned-url).

script

blog posts & tutorials

Recommended Reads

Below are recommneded blogs that will help in your journey