A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/lindydonna/SlackOutputBinding below:

GitHub - lindydonna/SlackOutputBinding

Slack output binding sample

This sample is a Azure Functions binding extension that allows you to write a Slack message by just adding an output binding.

To use the binding, register a new WebHook with Slack. Put the url in local.settings.json with the key SlackWebHook.

Just reference the Slack binding assembly and use the [Slack] attribute in your code:

    [FunctionName("HttpTriggerSlack")]
    public static string Run(
        [HttpTrigger] SlackMessage message, 
        [Slack(WebHookUrl = "SlackWebHook")] out SlackMessage slackMessage,
        TraceWriter log)

For JavaScript, the process is currently manual. Do the following:

  1. Copy the extension to an output folder such as "extensions". This can be done in a post-build step in the .csproj
  2. Add the app setting AzureWebJobs_ExtensionsPath to local.settings.json (or in Azure, in App Settings). Set the value to the parent of your "extension" folder from the previous step.

The project SampleFunction app already has a post-build step that copies the assembly to the folder Extensions.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4