Skip to content

feat: add Slack action (#46) - #88

Closed
raphael-goetz wants to merge 2 commits into
mainfrom
feat/#46-slack-action
Closed

raphael-goetz wants to merge 2 commits into
mainfrom
feat/#46-slack-action

Conversation

@raphael-goetz

Copy link
Copy Markdown
Member

What

Adds a Slack action so Hercules flows can post/update/delete messages, reply in threads, react, DM users, upload files, and drive channel/user operations via the Slack Web API — plus five Rest-based Events API triggers (SlackMessagePosted, SlackAppMentioned, SlackReactionAdded, SlackChannelCreated, SlackSlashCommand) with their payload data types and request-signature verification.

Why

Closes #46.

Slack is the canonical "notify a human / capture a human decision" step and one of the most-used integrations on n8n/Zapier, pairing naturally with the e-commerce and comms actions already in the repo.

How

  • Continued from the existing origin/feat/slack-action work and rebased it onto current main so the CI/README changes only add slack-action instead of dropping smtp-action/github-action (the old base predated them).
  • 12 Web API functions + 2 Block Kit builder utils (slackCreateTextSection, slackCreateBlock), following the shopify event pattern and GLS function/data-type pattern.
  • 6 data types (SLACK_MESSAGE, SLACK_CHANNEL, SLACK_USER, SLACK_FILE, SLACK_REACTION, SLACK_BLOCK) + 5 event payload schemas sharing an event_callback envelope.
  • bot_token / signing_secret / app_token config via ConfigurationDefinition; signature verification rejects replays older than five minutes.
  • Declared the rest-action dependency in manifest.json, matching every other action with Rest-based events.
  • Registered slack-action in .gitlab-ci.yml and the repo README.

The action README honestly documents a known limitation: the Rest adapter hands flows a parsed payload, so slackVerifyRequestSignature needs the raw body which isn't yet exposed.

Testing

  • npm run typecheck — clean
  • npm run test — 15/15 passing
  • npm run build — OK

🤖 Generated with Claude Code

mvriu5 and others added 2 commits November 1, 2026 18:38
Add a Slack action with Web API functions (post/reply/update/delete
messages, reactions, DMs, file upload, channel/user operations), Block Kit
builder utils, and five Rest-based Events API triggers with their payload
data types and signature verification.

Declare the rest-action dependency in the manifest, as every other action
with Rest-based events does.

Refs #46
The branch was authored before the repo-wide bump to ^1.6.0, so it still
pinned ^1.1.1 (resolving to 1.4.5). Match the other node actions; the
lockfile now resolves to the latest 1.7.2.

Refs #46
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/centaurus/-/pipelines/3015116166

Status: Canceling
Duration: 0

Job summaries

docs:preview

Documentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/17646658287/artifacts/out/index.html

@nicosammito nicosammito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Date pls use the datatype DATE (Date), for files FILE (File) and the icon you are using doesn't exist. We are using simple icons with simple:

* same instance. The official `@slack/web-api` SDK handles authentication,
* retries and rate limit backoff for us.
*/
let cached: { token: string; client: WebClient } | null = null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't cache clients. You have infinite amount of possible clients.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SimpleIcons doesnt contain an Slack Icon.

@CLAassistant

CLAassistant commented Nov 22, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ raphael-goetz
❌ mvriu5
You have signed the CLA already but the status is still pending? Let us recheck it.

@mvriu5
mvriu5 requested a balanced review from Copilot November 23, 2026 21:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Slack action

5 participants