MongoDB

The global cloud database service for modern applications

Go to site

Integrate the MongoDB API with the Twilio SendGrid API

Setup the MongoDB API trigger to run a workflow which integrates with the Twilio SendGrid API. Pipedream's integration platform allows you to integrate MongoDB and Twilio SendGrid remarkably fast. Free for developers.

Send Email

Send an email to a recipient.

 
Try it
Insert a document into a collection
 
Try it
Add or Update Contacts

Adds and/or updates contacts

 
Try it
Get Email Stats

Gets all of your global email statistics between a given date range.

 
Try it
Search Contacts

Searches contacts with a SGQL query.

 
Try it

Connect MongoDB

const MongoClient = require('mongodb').MongoClient

const {
  database,
  hostname,
  username,
  password,
} = auths.mongodb

const url = `mongodb+srv://${username}:${password}@${hostname}/test?retryWrites=true&w=majority`
const client = await MongoClient.connect(url, { 
  useNewUrlParser: true, 
  useUnifiedTopology: true 
})

const db = client.db(database)
// Enter your target collection as a parameter to this step
this.res = await db.collection(params.collection).insertOne({ name: "Luke Skywalker" })

await client.close()

Connect Twilio SendGrid

return await require("@pipedreamhq/platform").axios(this, {
  url: `https://api.sendgrid.com/v3/user/account`,
  headers: {
    Authorization: `Bearer ${auths.sendgrid.api_key}`,
  },
})

Community Posts

How Our Family Uses SMS and Smart Picture Frames to Connect During Remote Holidays
How Our Family Uses SMS and Smart Picture Frames to Connect During Remote Holidays
Two days before Thanksgiving, I decided to put together a simple way for our family to share pictures, because we couldn’t be together in person. The idea: smart photo frames that everyone could text pictures to. Here’s how I got it working. tldr; A Pipedream workflow parses SMS messages sent to a Twilio phone number, extracting the pictures and then using SendGrid to email them to the dedicated email addresses used by our Pix-Star photo frames.