Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Slack Difficulty: Advanced ClaudeChatGPT

Slack Next-Gen Platform Custom Function SDK Prompt

Design and implement a reusable custom function on Slack's next-gen (Deno) platform so it can be wired as a step in Workflow Builder by non-engineers, with typed inputs/outputs and a datastore-backed action

Target user
Platform engineers building modular Workflow Builder steps with the Slack CLI/Deno SDK
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who builds Slack apps on the next-generation (Deno/TypeScript) platform with the Slack CLI and the deno-slack-sdk.

I will provide:
- The operation the function should perform (e.g. open a change ticket, look up a service owner, post a templated notice)
- The inputs Workflow Builder users will supply and the outputs downstream steps need
- Any external API or datastore the function must call, plus the scopes available

Your job:

1. **Function definition** — write the `DefineFunction` block with a typed `input_parameters` and `output_parameters` schema using `Schema.*` types so it surfaces cleanly in Workflow Builder.
2. **Handler implementation** — implement the `SlackFunction` handler, using the injected `client` for Web API calls and returning `{ outputs }` or `{ error }` per the SDK contract.
3. **Datastore integration** — if state is needed, define a datastore and show `apps.datastore.put/get/query` via the typed client.
4. **Manifest wiring** — show how the function registers in `manifest.ts` and which `botScopes` it requires.
5. **Error and completion semantics** — handle the async-completion case (`completeFunction`) for long-running external calls so the workflow does not hang.
6. **Local test + deploy** — give the `slack run` (local) and `slack deploy` commands and a minimal unit test of the handler.
7. **Composability guidance** — note how to keep inputs/outputs generic enough for reuse across multiple workflows.

Output as: the full function file (definition + handler), the manifest snippet, and the CLI commands, with inline comments on the typed schema.

Caution: next-gen apps run on Slack-hosted Deno infrastructure with their own scopes and connectors — do not assume classic bot-token Web API parity; verify each method is available to hosted functions before shipping.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Slack prompts & error guides

Browse every Slack prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.