Repository navigation
feat: add Slack action (#46) - #88
raphael-goetz wants to merge 2 commits into
Conversation
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
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/centaurus/-/pipelines/3015116166 Status: Canceling Job summariesdocs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/17646658287/artifacts/out/index.html |
nicosammito
left a comment
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
You can't cache clients. You have infinite amount of possible clients.
There was a problem hiding this comment.
SimpleIcons doesnt contain an Slack Icon.
|
|
There was a problem hiding this comment.
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.
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
origin/feat/slack-actionwork and rebased it onto currentmainso the CI/README changes only addslack-actioninstead of droppingsmtp-action/github-action(the old base predated them).slackCreateTextSection,slackCreateBlock), following the shopify event pattern and GLS function/data-type pattern.SLACK_MESSAGE,SLACK_CHANNEL,SLACK_USER,SLACK_FILE,SLACK_REACTION,SLACK_BLOCK) + 5 event payload schemas sharing anevent_callbackenvelope.bot_token/signing_secret/app_tokenconfig viaConfigurationDefinition; signature verification rejects replays older than five minutes.rest-actiondependency inmanifest.json, matching every other action withRest-based events.slack-actionin.gitlab-ci.ymland the repo README.The action README honestly documents a known limitation: the
Restadapter hands flows a parsed payload, soslackVerifyRequestSignatureneeds the raw body which isn't yet exposed.Testing
npm run typecheck— cleannpm run test— 15/15 passingnpm run build— OK🤖 Generated with Claude Code