MongoDB

The global cloud database service for modern applications

Go to site

Integrate the MongoDB API with the Slack API

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

Popular Ways to Connect MongoDB with Slack

1
-
3
of
3
integrations by popularity

Popular MongoDB and Slack Triggers

1
-
1
of
1
triggers by popularity

Popular MongoDB and Slack Actions

1
-
6
of
21
actions by popularity

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 Slack

return await require("@pipedreamhq/platform").axios(this, {
  url: `https://slack.com/api/users.profile.get`,
  headers: {
    Authorization: `Bearer ${auths.slack.oauth_access_token}`,
  },
})

Related Videos (2)

Save Zoom Cloud Recordings to Google Drive and Share on Slack
Save Zoom Cloud Recordings to Google Drive and Share on Slack
Save Zoom Cloud Recordings to Google Drive and Share on Slack.
Run a Pipedream workflow on PagerDuty on-call rotations
Run a Pipedream workflow on PagerDuty on-call rotations
Run common workflows, or any Node.js code you'd like, each time a new user rotates onto an on-call schedule.

Community Posts (1)

Airtable Webhooks with Slack + Pipedream
Airtable Webhooks with Slack + Pipedream
We love Airtable here at Pipedream. But Airtable lacks one killer feature — webhooks. We took advantage of Airtable’s Slack notifications and built a way to send webhooks to an HTTP endpoint every time a record is created or updated in a base. It takes 10 minutes to setup and it’s free.