Pizzly

The simplest, fastest way to integrate your app with an OAuth API

Go to site

Integrate the Pizzly API with the MongoDB API

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

Insert a document into a collection
 
Try it
Get Authentication

Retrieve authentication details for a specific (integration, authId). See the docs: https://github.com/Bearer/Pizzly/wiki/Reference-:-API#retrieve-an-authentication

 
Try it
Get Integration Details

Retrieve an integration's details

 
Try it

Connect Pizzly

const fetch = require('node-fetch')

const { host, secretKey } = auths.pizzly
const authentication = 'Basic ' + Buffer.from(secretKey + ':').toString('base64')

// Make a test API request to Pizzly. Should return a success message
return await (await fetch(`https://${host}/api/`, { headers: { "Authorization": authentication } })).json()

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()