Slack
JavaScript
Python
Documentationhttps://slack.dev/bolt-js/tutorial/getting-started
NodeJS packagehttps://www.npmjs.com/package/@slack/bolt
Version3.12.0
Source Codehttps://github.com/slackapi/bolt-js
🚧 Work in progress
We are releasing new Python features every week
Credential configuration​
To configure this credential you need the signingSecret
and the bot token of your Slack app.
You can see how to create an app and find the needed secrets here.
Optionally you can set any of the extra config params you can see here.
Here you have an example of a filled credential configuration form in YepCode:

Slack snippets available in editor​
note
The title is the triggering text for YepCode to autocomplete the script.
Excluding the Web Api, the rest of the slack bolt features have no place in yepcode due its nature.
JavaScript
Python
Integration​
New integration from credential
const app = await yepcode.integration.slack("credential-slug")
New integration from plain authentication data
const { App } = require("@slack/bolt")
const app = new App({
token: "my-token"
signingSecret: "my-signing-secret"
})
Using the Web API​
Lists channels
const listChannels = async () => {
try {
const { channels } = await app.client.conversations.list();
console.log(result);
} catch (error) {
console.error(error);
}
};
listChannels();
Retrieve messages
const retrieveChannelMessages = async () => {
try {
const result = await app.client.conversations.history({
channel: "channel",
});
const { messages } = result.messages;
console.log(messages);
} catch (error) {
console.error(error);
}
};
retrieveChannelMessages();
Post a message
const postMessage = async () => {
try {
const result = await app.client.chat.postMessage({
channel: "channel",
text: "He who controls the Spice, controls the universe!",
});
console.log(result);
} catch (error) {
console.error(error);
}
};
postMessage();
Upload a file
const { createReadStream } = require("fs");
const uploadAFile = async () => {
try {
const result = await app.client.files.upload({
channels: "channel",
initial_comment: "Here's my file :smile:",
file: createReadStream("fileName"),
});
console.log(result);
} catch (error) {
console.error(error);
}
};
uploadAFile();
🚧 Work in progress
We are releasing new Python features every week