Ready to get started?

Learn more about CData Cloud Hub or sign up for a free trial:

Learn More

Create MongoDB-Connected Nintex Workflows

Use the CData Cloud Hub to connect to MongoDB from Nintex Workflow Cloud and build custom workflows using live MongoDB data.

Nintex Workflow Cloud is a cloud-based platform where you can design workflows to automate simple or complex processes using drag-and-drop interactions — without writing any code. When paired with the CData Cloud Hub, you get instant, cloud-to-cloud access to MongoDB data for business applications. This article shows how to create a virtual database for MongoDB in Cloud Hub and build a simple workflow from MongoDB data in Nintex.

The CData Cloud Hub provides a pure MySQL, cloud-to-cloud interface for MongoDB, allowing you to build workflows from live MongoDB data in Nintex Workflow Cloud — without replicating the data to a natively supported database. Nintex allows you to access data directly using SQL queries. Using optimized data processing out of the box, the CData Cloud Hub pushes all supported SQL operations (filters, JOINs, etc.) directly to MongoDB, leveraging server-side processing to quickly return the requested MongoDB data.

Create a Virtual MySQL Database for MongoDB Data

CData Cloud Hub uses a straightforward, point-and-click interface to connect to data sources and generate APIs.

  1. Log into Cloud Hub and click Databases.
  2. Select "MongoDB" from Available Data Sources.
  3. Enter the necessary authentication properties to connect to MongoDB.

    Set the Server, Database, User, and Password connection properties to connect to MongoDB. To access MongoDB collections as tables you can use automatic schema discovery or write your own schema definitions. Schemas are defined in .rsd files, which have a simple format. You can also execute free-form queries that are not tied to the schema.

  4. Click Test Database.
  5. Click Privileges -> Add and add the new user (or an existing user) with the appropriate permissions.

With the virtual database created, you are ready to connect to MongoDB data from Nintex.

Connect to MongoDB in Nintex

The steps below outline creating a new connection for access to MongoDB the CData Cloud Hub from Nintex to create a new MongoDB data source.

  1. Log into Nintex Workflow Cloud
  2. In the Connections tab, click "Add new"
  3. Select MySQL as the connector and click "Connect"
  4. In the MySQL connection wizard, set the following properties:
    • Connection Name: name the connection (e.g., CData Cloud Hub MongoDB Connection)
    • Username: your Cloud Hub username
    • Password: your Cloud Hub password
    • Database Host: your Cloud Hub MySQL endpoint (e.g., myinstance.cdatacloud.net)
    • Database Name: the virtual MongoDB database (e.g., MongoDB1)
  5. Click "Connect"
  6. Configure the connection permissions and click "Save permissions"

Create a Simple MongoDB Workflow

With the connection to the CData Cloud Hub configured, we are ready to build a simple workflow to access MongoDB data. Start by clicking the "Create workflow" button.

Configure the Start Event Action

  1. Click the start event task and select the "Form" event
  2. Click "Design form"
  3. Drag a "Text - Long" element onto the Form and click the element to configure it
    • Set "Title" to "Enter SQL query"
    • Set "Required" to true
  4. Drag a "Text - Short" element onto the Form and click the element to configure it
    • Set "Title" to "Enter desired result column"
    • Set "Required" to true

Configure an "Execute a Query" Action

  1. Add an "Execute a query" action after the "Start event: Form" action and click to configure the action
  2. Set "SQL Script" to the "Enter SQL Query" variable from the "Start event" action
  3. Set "Column to retrieve" to the "Enter desired result column" variable from the "Start event" action
  4. Set "Retrieved column" to a new variable (e.g., "values")

Configure a "Send an Email" Action

  1. Add a "Send an email" action after the "Execute a query" action and click to configure the action
  2. Set the "Recipient email address"
  3. Set the "Subject"
  4. Set the "Message body" to the variable created for the retrieved column

Once you configure the actions, click "Save," name the Workflow, and click "Save" again. You now have a simple workflow that will query MongoDB using SQL and send an email with the results.

To learn more about SQL data access to 150+ SaaS, Big Data, and NoSQL sources directly from your cloud applications, check out the CData Cloud Hub. Sign up for a free trial and reach out to our Support Team if you have any questions.