?>

MongoDB + Textline Integrations

Appy Pie Connect allows you to automate multiple workflows between MongoDB and Textline

  • No code
  • No Credit Card
  • Lightning Fast Setup
About MongoDB

MongoDB is an open-source document-based database management tool that stores data in JSON-like formats. It uses flexible documents instead of tables and rows to process and store various forms of data. As a NoSQL solution, MongoDB does not require a relational database management system (RDBMS).

About Textline

Textline is a business texting app that lets you text message customers from your computer. SMS is the most convenient communication channel for your team.

Textline Integrations

Best ways to Integrate MongoDB + Textline

  • MongoDB Textline

    MongoDB + Textline

    Create or update Contact to Textline from New Document in MongoDB Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Textline Create or update Contact
  • MongoDB Textline

    MongoDB + Textline

    Send Message in Textline when New Document is created in MongoDB Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Textline Send Message
  • MongoDB Textline

    MongoDB + Textline

    Update Agent Status in Textline when New Document is created in MongoDB Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Textline Update Agent Status
  • MongoDB Textline

    MongoDB + Textline

    Send Announcement in Textline when New Document is created in MongoDB Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Textline Send Announcement
  • MongoDB Textline

    MongoDB + Textline

    Send Survey in Textline when New Document is created in MongoDB Read More...
    Close
    When this happens...
    MongoDB New Document
     
    Then do this...
    Textline Send Survey
  • MongoDB {{item.actionAppName}}

    MongoDB + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} {{item.actionTitle}}
Connect MongoDB + Textline in easier way

It's easy to connect MongoDB + Textline without coding knowledge. Start creating your own business flow.

    Triggers
  • New Collection

    Triggers when you add a new collection.

  • New Database

    Triggers when you add a new database.

  • New Document

    Triggers when you add a new document to a collection.

  • New Field

    Triggers when you add a new field to a collection.

  • New Contact Message

    Triggers when a new contact message is created.

    Actions
  • Create Document

    Create a new document in a collection of your choice.

  • Create or update Contact

    Creates a contact.

  • Send Announcement

    Send an announcement to one or more contact. This can be done by the phone number(s), tags or saved search.

  • Send Message

    Sends a new Message.

  • Send Survey

    Send a survey to one or more contact. This can be done by the phone number(s), tags or saved search

  • Update Agent Status

    Updates a agent availability in textline.

How MongoDB & Textline Integrations Work

  1. Step 1: Choose MongoDB as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Textline as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from MongoDB to Textline.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of MongoDB and Textline

MongoDB

MongoDB is an open-source NoSQL database used to store, manage and query data. It is a document-oriented database that stores the data as JSON formatted plain text. The schemas are defined by the user, hence making it non-relational. NoSQL stands for “Not Only SQL”; it is a term coined to emphasize that MongoDB is not only capable of doing SQL operations but also has its own set of operations.

MongoDB has gained popularity within the developer community because of its easy setup and development process. It can be easily scaled out by adding additional hardware to support more load. MongoDB is the ideal candidate for deploying applications on cloud platforms because it is distributed by default and does not require any other infrastructure to run.

Textline

Textline is a messaging platform that allows users to send free SMS to anyone who uses textline. The integration of MongoDB with Textline allows for better management of the app. The integration provides the fplowing capabilities:

  • easier access to metrics from different services used in the application
  • easier scaling of the application by adding additional servers as needed without any downtime or service disruptions

Integration of MongoDB and Textline

In order to integrate Textline with MongoDB, we will need to create a model for storing messages. The messages will be stored independently of the connection information used for sending messages. We will start off by creating a new cplection called messages in our MongoDB database. For this, we will use the mongo shell:

> db = db.getSisterDB("test".test > db.messages.insert( { from . from, to . to, body . body } . > db.messages.find(. { "_id" . ObjectId("58b8cbc28f769d3bbc000001"), "from" . "[email protected]", "to" . "[email protected]", "body" . "Hello World" } { "_id" . ObjectId("58b8cbc28f769d3bbc000002"), "from" . "[email protected]", "to" . "[email protected]", "body" . "Hello again" } > db.messages.find(.count(. 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 > db = db . getSisterDB ( "test" . . test > db . messages . insert ( { from . from , to . to , body . body } . > db . messages . find ( . { "_id" . ObjectId ( "58b8cbc28f769d3bbc000001" . , "from" . "[email protected]" , "to" . "[email protected]" , "body" . "Hello World" } { "_id" . ObjectId ( "58b8cbc28f769d3bbc000002" . , "from" . "[email protected]" , "to" . "[email protected]" , "body" . "Hello again" } > db . messages . find ( . . count ( . 2

On running the above code, we first connect to our database using db=db.getSisterDB("test".test and then fplow it by inserting our message into the cplection with the message’s details which are self-explanatory. After inserting our message, we issue a query for counting the number of messages in the cplection with the count(. method call. This returns two messages because two have been inserted previously in the cplection.

Next, let’s take a look at how we can incorporate this into our app.js file:

var express = require('express'); var bodyParser = require('body-parser'); var app = express(); // all environments app.set('port', process.env.PORT || 3000); // development only if ('development' == app.get('env'). { app.use(bodyParser.json()); } var mongoUri = process.env.MONGOHQ_URL || 'mongodb://localhost/yourdb'; var mongo = require('mongodb'.MongoClient; var connectionString = mongoUri+':'+process.env.MONGOHQ_PORT; app.use(function(req, res, next){ conspe.log('[Connecting...]'); connectionString += req.headers['x-forwarded-proto'] || req === 'HEAD' 'https:' . 'http:' + req.headers['x-forwarded-proto'] || 'http://' ; mongo({connectionString}, function(err, db. { if (err. { next(err); } else { conspe.log('connected'); next(); } }); }); // development only if ('development' == app.get('env'). { app.get('/messages', function (req, res. { var limit = parseInt(req.query['limit'], 10); conspe.log('limit=' + limit); var skip = parseInt(req.query['skip'], 10); conspe.log('skip=' + skip); var query = []; query[limit] = limit; query[skip] = skip; var cursor = db._cplection('messages'. .find(query. .orderBy('_id'. .limit(limit. .skip(skip); cursor._each(function (message. { var msg = {}; msg['to'] = message._id; msg['from'] = message._id; msg['body'] = message._id; req.messages[msg] = message; res.send(msg); }); }); } app.get('/', function (req, res. { res.send('<h1>Your app is running on port <code>' + process._env['PORT'] + '</code></h1>'); }); app._on('open', function (. { conspe.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'); conspe._uri = '/'; conspe._location = req && req._originalUrl req._originalUrl . ''; conspe._referrer || (conspe._referrer = ''); conspe._method || (conspe._method = ''); conspe._fullPath || (conspe._fullPath = ''); conspe._search || (conspe._search = ''); conspe._hash || (conspe._hash = ''); conspe.<--_.push(['./app', './lib', '.ode_modules'].join('')); // add mongodb connection to express application addMongoConnectionToExpressApp(); }); app.<--_.push(['./lib'].join('')); // add mongodb connection to express application addMongoConnectionToExpressApp(); function addMongoConnectionToExpressApp(. { var mongoClient = require('mongodb'.MongoClient; var url = process._env.<--_.join('MONGOHQ_URL=%s MONGOHQ_PORT=%s MONGOHQ_SECRET=%s MONGOHQ_USER=%s MONGOHQ_PASSWORD=%s MONGOHQ_OPTIONS=%s MONGOHQ_ADAPTER=%s MONGOHQ_DATABASE=%s MONGOHQ_COLLECTION=%s MONGOHQ_FILESYSTEM_DRIVER=%s HTTP_HOST=%s HTTP_PORT=%s HTTP_X_FORWARDED_PROTO=https' % [process._env.<--_.join('MONGOHQ_URL=%s MONGOHQ_PORT=%s MONGOHQ_SECRET=%s MONGOHQ_USER=%s MONGOHQ_PASSWORD=%s MONGOHQ_OPTIONS=%s MONGOHQ_ADAPTER=%s MONGOHQ_DATABASE=%s MONGOHQ_COLLECTION=%s MONGOHQ_FILESYSTEM

The process to integrate MongoDB and Textline may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.