MongoDB

MongoDB is an open source NoSQL database management program.

Integrate the MongoDB API with the HTTP / Webhook API

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

Create New Document with MongoDB API on New Requests from HTTP / Webhook API
HTTP / Webhook + MongoDB
 
Try it
Delete a Document with MongoDB API on New Requests from HTTP / Webhook API
HTTP / Webhook + MongoDB
 
Try it
Find Document by Id with MongoDB API on New Requests from HTTP / Webhook API
HTTP / Webhook + MongoDB
 
Try it
Search Documents with MongoDB API on New Requests from HTTP / Webhook API
HTTP / Webhook + MongoDB
 
Try it
Update a Document with MongoDB API on New Requests from HTTP / Webhook API
HTTP / Webhook + MongoDB
 
Try it
New Requests from the HTTP / Webhook API

Get a URL and emit the full HTTP event on every request (including headers and query parameters). You can also configure the HTTP response code, body, and more.

 
Try it
New Requests (Payload Only) from the HTTP / Webhook API

Get a URL and emit the HTTP body as an event on every request

 
Try it
New Collection from the MongoDB API

Emit new an event when a new collection is added to a database

 
Try it
New Database from the MongoDB API

Emit new an event when a new database is added

 
Try it
New Document from the MongoDB API

Emit new an event when a new document is added to a collection

 
Try it
Create New Document with the MongoDB API

Create a new document in a collection of your choice. See the docs here

 
Try it
Delete a Document with the MongoDB API

Delete a single document by ID. See the docs here

 
Try it
Find Document by Id with the MongoDB API

Retrieves a single document by ID. See the docs here

 
Try it
Send any HTTP Request with the HTTP / Webhook API

Send an HTTP request using any method and URL. Optionally configure query string parameters, headers, and basic auth.

 
Try it
Send GET Request with the HTTP / Webhook API

Send an HTTP GET request to any URL. Optionally configure query string parameters, headers and basic auth.

 
Try it

Overview of MongoDB

Assuming you want a few paragraph about the MongoDB API:

MongoDB offers a powerful API that allows developers to interact with their
databases in a variety of ways. The API provides methods for performing
standard CRUD (create, read, update, delete) operations, as well as more
specialized methods like bulk write operations and aggregate queries. MongoDB
also offers a rich set of indexing options that allow developers to optimize
their queries for maximum performance. With the MongoDB API, developers can
build a wide variety of applications, from simple data-driven apps to complex
event-driven systems.

Connect MongoDB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import mongodb from 'mongodb'

export default defineComponent({
  props: {
    mongodb: {
      type: "app",
      app: "mongodb",
    },
    collection: {
      type: "string"
    },
    filter: {
      type: "object"
    }
  },
  async run({steps, $}) {
    const MongoClient = mongodb.MongoClient
    
    const {
      database,
      hostname,
      username,
      password,
    } = this.mongodb.$auth
    
    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)

    const results = await db.collection(this.collection).find(this.filter).toArray();
    $.export('results', results);
    
    await client.close()
  },
})

Connect HTTP / Webhook

1
2
3
4
5
6
7
8
9
10
11
12
13
// To use any npm package on Pipedream, just import it
import axios from "axios"

export default defineComponent({
  async run({ steps, $ }) {
    const { data } = await axios({
      method: "GET",
      url: "https://pokeapi.co/api/v2/pokemon/charizard",
    })
    return data.species
  },
})

Community Posts

A Look at Pipedream
A Look at Pipedream
I'm going to build a workflow that will search Twitter every hour for a keyword. It will take the results, format them nicely, and then email it.
Building a Traffic-Based Workflow in Pipedream
Building a Traffic-Based Workflow in Pipedream
Normally I don't like to blog about stuff that isn't generally available to all, but as it will be available sometime soon, I decided to go ahead anyway. And I built something really cool I want to share so that's another reason to talk about this now!