Search code examples
mongodbuipath

Connecting to MongoDB to be used in UIPath


I am trying to connect to MongoDB so I can use it in UIPath but there are no APIs available other than DB administrative APIs. I want to manipulate the actual data in the data table. How can I do this, other than creating a robot that manipulates the table directly.


Solution

  • If you are using MongoDB Atlas, which is Cloud based, does not have ANY CRUD APIs. In MongoDB Server side, the CRUD APIs are deprecated so for sure they will not have it in the cloud version.

    Unfortunately, you will need to go through a third party to connect to MongoDB. Luckily there are a few out there. The one I like to use is PrestoAPI.

    Got to the PrestoAPI Website: https://prestoapi.com/ Click on get started for free

    Fill out the user data, select if this is for personal or business and then select Free There will be a confirmation email sent Confirm your email, (you may have to resend the confirmation link) and then sign in Once you log in, you will see this:

    Click on Connect to A Database Click again to get this pop up All information needed is in the connection string we got from MongoDB Driver is MongoDB We will use the database Sample_airbnb from the database sample

    Click on test

    Once it says connection successful, we can move on FYI, sometimes PrestoAPI will drop the “+srv” from the beginning of the connection string. Ensure that this part is correct or recopy again from MongoDB You will get this result Go back to the dashboard and click on Create a project

    You should see the AirBNB name Click on Submit Next, select “Create your first endpoint”

    It will give you a list to go through. Ensure you pick the name of the Endpoint (you only get 10 of them) Select the database, the component (Table) and the table you want to read

    For now, everything else can stay as default but you can always go back and tweak them Once complete, click Submit. You now have a list of usable CRUD APIs for your MongoDB Atlas

    You can now use these end points and call them in Node.js, UIPath or wherever a regular REST API can be called