{"id":21067326,"url":"https://github.com/zefhemel/mattermost-functions","last_synced_at":"2025-06-28T17:04:32.763Z","repository":{"id":65253485,"uuid":"539623408","full_name":"zefhemel/mattermost-functions","owner":"zefhemel","description":"Run functions in respond to eventbus events","archived":false,"fork":false,"pushed_at":"2022-10-11T13:35:24.000Z","size":560,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T21:17:04.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zefhemel.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}},"created_at":"2022-09-21T18:07:41.000Z","updated_at":"2023-02-03T16:26:52.000Z","dependencies_parsed_at":"2023-01-15T23:00:59.891Z","dependency_job_id":null,"html_url":"https://github.com/zefhemel/mattermost-functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"mattermost/mattermost-plugin-starter-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefhemel%2Fmattermost-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefhemel%2Fmattermost-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefhemel%2Fmattermost-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefhemel%2Fmattermost-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zefhemel","download_url":"https://codeload.github.com/zefhemel/mattermost-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510126,"owners_count":20302294,"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","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":[],"created_at":"2024-11-19T18:06:31.697Z","updated_at":"2025-03-14T02:10:15.391Z","avatar_url":"https://github.com/zefhemel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MatterMost Functions\n\nFor now, you need to manually install [Deno](https://deno.land), on Mac: `brew install deno` to make this work.\n\nTo deploy, make sure `PluginSettings` -\u003e `EnableUploads` is set to `true` in your `config.json` file, then run:\n\n```bash\nmake deploy\n```\n\n## Usage\n\nThe UI is in the Admin Console under \"Plugins\" -\u003e \"Mattermost Functions\".\n\nHere you can configure the personal access token that will be passed to a function (via the `init` call, see below). And then one or more events and functions to trigger.\n\nExample function:\n\n```javascript\nimport {Client4} from \"https://esm.sh/@mattermost/client\";\n\nlet client;\n\nfunction init(cfg) {\n   client = new Client4();\n   client.url = cfg.api_url;\n   client.token = cfg.api_token;\n}\n\nasync function handle(event) {\n   console.log(\"Got this event\", event);\n   await client.createPost({\n     channel_id: \"xgjbhz6btj8b7b31fgpn5ge38h\", // replace with your channel id\n     message: `Message: ${event.message}`\n   });\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzefhemel%2Fmattermost-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzefhemel%2Fmattermost-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzefhemel%2Fmattermost-functions/lists"}