Skip to content

Commit

Permalink
docs(Readme): guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
fishme committed Dec 21, 2023
1 parent b5c5ccd commit 295641f
Showing 1 changed file with 27 additions and 33 deletions.
60 changes: 27 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

Control your Slack App via Node-Red! Slack Bolt integration.

What you can do with this node?
What you can do with this node-red plugin?

- send simple text messages
- send complex block messages
- events: You can listen to any [Slack Events](https://api.slack.com/events)
- actions: You can listen to user action and respond via Node-Red
- commands: Create your own commands with your Slack App and listen via Node-Red
- shortcuts: Create your own global or message based shortcuts and develop it with Node-Red
- events: listen to any [Slack Events](https://api.slack.com/events)
- actions: listen to user action and respond via Node-Red
- commands: create your own commands with your Slack App and listen via Node-Red
- shortcuts: create your own global or message based shortcuts and develop it with Node-Red
- views: Slack views
- messages: Listing for messages in a channel
- messages: listing for messages in a channel

Develop your [Slack app using Bolt](https://slack.dev/bolt-js/tutorial/getting-started) for JavaScript with Node-Red.

``This is an alpha version, no grarranty for productive mode!``
> [!IMPORTANT]
> This is an alpha version, no grarranty for productive mode!
## Usage

Expand All @@ -31,13 +32,9 @@ Develop your [Slack app using Bolt](https://slack.dev/bolt-js/tutorial/getting-s

> [!TIP]
> Don't forget to install the app also into a channel.
> [!NOTE]
> Could be that the installation of your slack app takes longer than 60min.

Follow the Node-RED Slack App Configuration.

<details><summary>Slack Manifest</summary>

```yaml
Expand Down Expand Up @@ -94,7 +91,6 @@ open your folder via favourite shell<br />

### Node-Red Configuration


After the installation of `@headless-architecture/node-red-contrib-slack-bolt` search in your Node-RED toolbar for `slack`

![Slack Bolt Nodes](https://raw.githubusercontent.com/fishme/node-red-contrib-slack-bolt/main/docs/img/node-red-slackbolt-nodes.png)
Expand Down Expand Up @@ -154,12 +150,13 @@ Simple Block for choosing a date
}
]
```

</details>

- [Block Kit Builder](https://app.slack.com/block-kit-builder)
- [Formating Blocks](https://api.slack.com/reference/surfaces/formatting#rich-layouts)
- [Block Kit Builder](https://app.slack.com/block-kit-builder)
- [Formating Blocks](https://api.slack.com/reference/surfaces/formatting#rich-layouts)

**Registry**
#### Registry

This node enalbe the following Slack functions.

Expand All @@ -180,23 +177,20 @@ All listener needs to add once. Therefor create a Infection with:
<br />
Connect a function node with the following code.


Magic Slack Code.
This will listen for App mention in your channel. <br />
e.g. Your App name @Node-Red-demo-app
e.g. Your App name @Node-Red-demo-app.

```
// write in your slack channel
@Node-Red-demo-app What's up?
```
Slack will answer you with a button and if your press on the button the action will be exected with a short answer back.
Write in your Slack channel:
`@Node-Red-demo-app What's up?`

Slack will answer you with a button and if your press on the button the action will send an answer back.

![Active Communication](https://raw.githubusercontent.com/fishme/node-red-contrib-slack-bolt/main/docs/img/node-registry-example1.png)

```javascript
// use the object to initialize your handlers.
// if you don't need all, clean it.
// initialize your handlers.
msg.SlackBolt = {
actions: [],
commands: [],
Expand Down Expand Up @@ -258,12 +252,20 @@ msg.SlackBolt.events.push(
## Node-Red Example

copy paste into your
see `/examples/example.json`
see [Examples](https://github.com/fishme/node-red-contrib-slack-bolt/blob/main/examples/example.json)

https://flows.nodered.org/flow/368f36cbacfeba00b253086438f9a74d

<br /><br />

## Common Errors

`Error: An API error occurred: channel_not_found`<br />
**Solution:** Your Slack App is not installed in the channel.

`Error: An API error occurred: invalid_auth`<br />
**Solution:** Token are wrong.

## Development

### Installation
Expand Down Expand Up @@ -296,14 +298,6 @@ yarn build

[Read Node-RED docs](https://nodered.org/docs/creating-nodes/first-node#testing-your-node-in-node-red) on how to install the node set into your Node-RED runtime.

### Common Errors

`Error: An API error occurred: channel_not_found`<br />
**Solution:** Your Slack App is not installed in the channel.

`Error: An API error occurred: invalid_auth`<br />
**Solution:** Token are wrong.

### Contact

**Issues:** [https://github.com/fishme/node-red-contrib-slack-bolt/issues](https://github.com/fishme/node-red-contrib-slack-bolt/issues)<br />
Expand Down

0 comments on commit 295641f

Please sign in to comment.