Automation Action – Lookup From A MongoDB Database | ThinkAutomation

Automation Action: Lookup From A MongoDB Database

Lookup a document from a MongoDB database and assign it to a Variable.

Read a document from a MongoDB Collection and assign the Json to a variable. This action can lookup data from any local MongoDB, or cloud based MongoDB compatible document databases including Amazon DocumentDB, Azure Cosmos and MongoDB Atlas.

Enter the MongoDB Connection String, Database Name and Collection Name. Enter the Query json and optionally the Projection and Sort json. Click the Test button to test the connection and query.

You can use %variable% replacements in the query. For example:

 { "_id": { "$eq": "%OrderNumber%" } }

See: Query Documents — MongoDB Manual for query syntax.

Select the variable to assign the returned document(s) to from the Assign To list.

The Json can be returned as either:

  • MongoDB Relaxed Extended – returns Json as stored in MongoDB. This will include additional objects for date, long, objectid etc.
  • Standard – returns standard Json.

Select from the Json Output Mode list.

You can then use Extract Field Actions (with the extract Json path option) to extract individual fields from the document.

This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, documents, local files and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.

You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.

Download Free 30 Day Trial

Back To Automation Actions List

ThinkAutomation Home