{"id":15814676,"url":"https://github.com/lucasroesler/openfaas-slack-bot","last_synced_at":"2026-07-02T14:05:43.134Z","repository":{"id":143143125,"uuid":"237831601","full_name":"LucasRoesler/openfaas-slack-bot","owner":"LucasRoesler","description":"Creating OpenFaaS Slack bot templates","archived":false,"fork":false,"pushed_at":"2020-06-14T07:48:36.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T22:52:58.771Z","etag":null,"topics":["openfaas","openfaas-template","slack","slack-commands"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucasRoesler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-02T20:25:36.000Z","updated_at":"2022-03-07T05:52:46.000Z","dependencies_parsed_at":"2023-04-05T10:32:31.276Z","dependency_job_id":null,"html_url":"https://github.com/LucasRoesler/openfaas-slack-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LucasRoesler/openfaas-slack-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasRoesler%2Fopenfaas-slack-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasRoesler%2Fopenfaas-slack-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasRoesler%2Fopenfaas-slack-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasRoesler%2Fopenfaas-slack-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucasRoesler","download_url":"https://codeload.github.com/LucasRoesler/openfaas-slack-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucasRoesler%2Fopenfaas-slack-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270061289,"owners_count":24520277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openfaas","openfaas-template","slack","slack-commands"],"created_at":"2024-10-05T04:41:39.855Z","updated_at":"2026-07-02T14:05:43.091Z","avatar_url":"https://github.com/LucasRoesler.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyslash OpenFaaS Slack Slash Command Template\n\n## Usage\n\n1. `faas-cli template pull faas-cli template pull https://github.com/LucasRoesler/openfaas-slack-bot`\n2. `faas-cli new bot --lang=pyslash`\n3. Update the stack file to include the template configuration\n```yaml\nconfiguration:\n  templates:\n    - name: pyslash\n      source: https://github.com/LucasRoesler/openfaas-slack-bot\n```\n3. Wite your command logic in `./bot/handler.py`\n\n\n## Writing slash commands\nThe abosolute smallest example slash command looks like this\n\n```py\nimport sanic\nfrom sanic.response import json\n\nfrom . import secrets\nfrom .slacker import Slacker\n\n# To create a new app go to https://api.slack.com/apps?new_app=1\n# Manager your apps:\n#     https://api.slack.com/apps\n# Manage slash commands in an app:\n#     https://api.slack.com/apps/:id/slash-commands\nbot = Slacker(\n    token=secrets.slack_api_token,\n    signing_secret=secrets.slack_signing_secret,\n)\n\n# this would be called by the `/hello` slash command.\n#\n# the url will be \u003copenfaas_gateway\u003e/function/\u003cfunction_name\u003e/hello\n@bot.slash_cmd(\"hello\")\nasync def hello(request: sanic.request.Request):\n    return json({\n            \"response_type\": \"in_channel\",\n            \"text\": \"*hi there*\",\n        })\n```\n\nYou must also set the secrets for your Slack API token an dsigning secret in your stack file:\n\n```yaml\nfunctions:\n  bot:\n    lang: pyslash\n    handler: ./bot\n    image: theaxer/test-bot:latest\n    secrets:\n      - slack-api-token\n      - slack-signing-secret\n```\n\n## Deployment\nConfigure your Slack bot.  Create or manage your app at https://api.slack.com/apps\n\nGet your bot's API token from the`https://api.slack.com/apps/\u003capp_id\u003e/install-on-team` and your\nsigning key from `https://api.slack.com/apps/\u003capp_id\u003e/general`\n```sh\nfaas-cli secret create slack-api-token --from-literal=xoxb-921547957923-933041549141-J0i1Nt9ZLBoL6BCEpXoGEQrK\nfaas-cli secret create slack-signing-secret --from-literal=7bd05b1bca10d191f69de20866c4c890\nfaas-cli up\n```\n\nEach Slash command that you register in your handler must also be registered in the Slack UI,\n`https://api.slack.com/apps/\u003capp_id\u003e/slash-commands`\n\nThe URL for each slash command will be `http://\u003copenfaas_gateway\u003e/function/\u003cfunction_name\u003e/\u003chandler_method\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasroesler%2Fopenfaas-slack-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasroesler%2Fopenfaas-slack-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasroesler%2Fopenfaas-slack-bot/lists"}