slack-api-4-modals-and-views

Sub-skill of slack-api: 4. Modals and Views.

5 stars

Best use case

slack-api-4-modals-and-views is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Sub-skill of slack-api: 4. Modals and Views.

Teams using slack-api-4-modals-and-views should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/4-modals-and-views/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/_archive/business/communication/slack-api/4-modals-and-views/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/4-modals-and-views/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How slack-api-4-modals-and-views Compares

Feature / Agentslack-api-4-modals-and-viewsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Sub-skill of slack-api: 4. Modals and Views.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 4. Modals and Views

## 4. Modals and Views


```python
# modals.py
# ABOUTME: Modal dialogs for complex user input
# ABOUTME: Multi-step workflows with view updates

from slack_bolt import App
import json
import os

app = App(token=os.environ.get("SLACK_BOT_TOKEN"))

@app.command("/create-ticket")
def open_ticket_modal(ack, body, client):
    """Open a modal for ticket creation"""
    ack()

    client.views_open(
        trigger_id=body['trigger_id'],
        view={
            "type": "modal",
            "callback_id": "create_ticket_modal",
            "title": {
                "type": "plain_text",
                "text": "Create Ticket"
            },
            "submit": {
                "type": "plain_text",
                "text": "Create"
            },
            "close": {
                "type": "plain_text",
                "text": "Cancel"
            },
            "blocks": [
                {
                    "type": "input",
                    "block_id": "title_block",
                    "element": {
                        "type": "plain_text_input",
                        "action_id": "title_input",
                        "placeholder": {
                            "type": "plain_text",
                            "text": "Brief description of the issue"
                        }
                    },
                    "label": {
                        "type": "plain_text",
                        "text": "Title"
                    }
                },
                {
                    "type": "input",
                    "block_id": "description_block",
                    "element": {
                        "type": "plain_text_input",
                        "action_id": "description_input",
                        "multiline": True,
                        "placeholder": {
                            "type": "plain_text",
                            "text": "Detailed description..."
                        }
                    },
                    "label": {
                        "type": "plain_text",
                        "text": "Description"
                    }
                },
                {
                    "type": "input",
                    "block_id": "priority_block",
                    "element": {
                        "type": "static_select",
                        "action_id": "priority_select",
                        "placeholder": {
                            "type": "plain_text",
                            "text": "Select priority"
                        },
                        "options": [
                            {
                                "text": {"type": "plain_text", "text": "Low"},
                                "value": "low"
                            },
                            {
                                "text": {"type": "plain_text", "text": "Medium"},
                                "value": "medium"
                            },
                            {
                                "text": {"type": "plain_text", "text": "High"},
                                "value": "high"
                            },
                            {
                                "text": {"type": "plain_text", "text": "Critical"},
                                "value": "critical"
                            }
                        ]
                    },
                    "label": {
                        "type": "plain_text",
                        "text": "Priority"
                    }
                },
                {
                    "type": "input",
                    "block_id": "assignee_block",
                    "element": {
                        "type": "users_select",
                        "action_id": "assignee_select",
                        "placeholder": {
                            "type": "plain_text",
                            "text": "Select assignee"
                        }
                    },
                    "label": {
                        "type": "plain_text",
                        "text": "Assignee"
                    },
                    "optional": True
                },
                {
                    "type": "input",
                    "block_id": "due_date_block",
                    "element": {
                        "type": "datepicker",
                        "action_id": "due_date_picker",
                        "placeholder": {
                            "type": "plain_text",
                            "text": "Select a date"
                        }
                    },
                    "label": {
                        "type": "plain_text",
                        "text": "Due Date"
                    },
                    "optional": True
                }
            ]
        }
    )

@app.view("create_ticket_modal")
def handle_ticket_submission(ack, body, client, view, logger):
    """Handle ticket modal submission"""

    # Extract values
    values = view['state']['values']
    title = values['title_block']['title_input']['value']
    description = values['description_block']['description_input']['value']
    priority = values['priority_block']['priority_select']['selected_option']['value']
    assignee = values['assignee_block']['assignee_select'].get('selected_user')
    due_date = values['due_date_block']['due_date_picker'].get('selected_date')

    user = body['user']['id']

    # Validate input
    errors = {}
    if len(title) < 5:
        errors['title_block'] = "Title must be at least 5 characters"
    if len(description) < 10:
        errors['description_block'] = "Description must be at least 10 characters"

    if errors:
        ack(response_action="errors", errors=errors)
        return

    ack()

    # Create ticket (in real app, save to database/API)
    ticket_id = f"TICKET-{hash(title) % 10000:04d}"

    # Notify in channel
    blocks = [
        {
            "type": "header",
            "text": {
                "type": "plain_text",
                "text": f":ticket: New Ticket Created",
                "emoji": True
            }
        },
        {
            "type": "section",
            "fields": [
                {"type": "mrkdwn", "text": f"*ID:*\n`{ticket_id}`"},
                {"type": "mrkdwn", "text": f"*Priority:*\n{priority.title()}"},

*Content truncated — see parent skill for full reference.*

Related Skills

slack-gif-creator

5
from vamseeachanta/workspace-hub

Create custom animated GIFs for Slack reactions and celebrations. Use for team milestones, custom emoji reactions, inside jokes, and workplace fun.

windmill-integration-with-database-and-slack

5
from vamseeachanta/workspace-hub

Sub-skill of windmill: Integration with Database and Slack.

n8n-integration-with-slack-google-sheets-and-email

5
from vamseeachanta/workspace-hub

Sub-skill of n8n: Integration with Slack, Google Sheets, and Email.

github-actions-integration-with-slack-notifications

5
from vamseeachanta/workspace-hub

Sub-skill of github-actions: Integration with Slack Notifications (+1).

activepieces-integration-with-notion-and-slack

5
from vamseeachanta/workspace-hub

Sub-skill of activepieces: Integration with Notion and Slack.

orcaflex-visualization-model-views

5
from vamseeachanta/workspace-hub

Sub-skill of orcaflex-visualization: Model Views (+1).

paraview-interface-python-script-structure-paraviewsimple

5
from vamseeachanta/workspace-hub

Sub-skill of paraview-interface: Python Script Structure (paraview.simple) (+5).

notion-api-integration-with-slack

5
from vamseeachanta/workspace-hub

Sub-skill of notion-api: Integration with Slack (+1).

slack-gif-creator-design-guidelines

5
from vamseeachanta/workspace-hub

Sub-skill of slack-gif-creator: Design Guidelines (+2).

slack-gif-creator-dependencies

5
from vamseeachanta/workspace-hub

Sub-skill of slack-gif-creator: Dependencies.

slack-api-6-webhooks-and-incoming-messages

5
from vamseeachanta/workspace-hub

Sub-skill of slack-api: 6. Webhooks and Incoming Messages.

slack-api-5-slash-commands

5
from vamseeachanta/workspace-hub

Sub-skill of slack-api: 5. Slash Commands.