Class SlackExecutor
java.lang.Object
ai.nervemind.app.executor.SlackExecutor
- All Implemented Interfaces:
NodeExecutor
Node executor for Slack messaging via the Slack Web API.
Sends messages to Slack channels and retrieves channel history using the official Slack Web API over HTTP. No SDK dependency required. Requires a Slack Bot Token (xoxb-*) stored as a credential.
Node Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | String | Yes | SEND or HISTORY |
| channel | String | Yes | Channel ID (e.g. C01234567) |
| message | String | SEND | Message text (supports Slack mrkdwn) |
| limit | Integer | No | Max messages for HISTORY (default: 10) |
Authentication
Assign an API_KEY credential containing the Slack Bot Token (xoxb-...).
The token needs chat:write scope for SEND and
channels:history for HISTORY.
Output Data
- success - Boolean indicating API success
- ok - Slack API ok field
- ts - Message timestamp (SEND)
- channel - Channel ID
- messages - List of messages (HISTORY)
- response - Full API response as JSON string
- Since:
- 1.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ai.nervemind.common.domain.Node node, Map<String, Object> input, ExecutionService.ExecutionContext context) Executes the business logic for this node type.Unique identifier for the node type this executor handles.
-
Constructor Details
-
SlackExecutor
public SlackExecutor()Default constructor.
-
-
Method Details
-
execute
public Map<String,Object> execute(ai.nervemind.common.domain.Node node, Map<String, Object> input, ExecutionService.ExecutionContext context) Description copied from interface:NodeExecutorExecutes the business logic for this node type.- Specified by:
executein interfaceNodeExecutor- Parameters:
node- The node definition containing parameters and configuration. UseNode.parameters()to access user settings.input- Combined output from all upstream nodes that connected to this node. For simple flows, this contains the direct predecessor's output. For merge nodes, it contains combined data.context- Verification context providing access to workflow-scoped services, logger, and execution metadata.- Returns:
- A Map containing the results of this node's execution.
Keys in this map become available variables for downstream nodes.
Note: Returningnullis treated as an empty map.
-
getNodeType
Description copied from interface:NodeExecutorUnique identifier for the node type this executor handles. This must match the 'type' field in the JSON definition of the node.- Specified by:
getNodeTypein interfaceNodeExecutor- Returns:
- The unique type string (e.g., "httpRequest", "llmChat").
-