Skip to content

Instantly share code, notes, and snippets.

@StefanRiedmann
Created January 26, 2018 17:56
Show Gist options
  • Save StefanRiedmann/6184ef25fc7838099aa807491b752426 to your computer and use it in GitHub Desktop.
Save StefanRiedmann/6184ef25fc7838099aa807491b752426 to your computer and use it in GitHub Desktop.
Slack webhook as Azure Function
public static class SlackWebhook
{
[FunctionName("SlackWebhook")]
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(WebHookType = "slack")] HttpRequestMessage req,
[Queue(Constants.TranslateRequestQueue, Connection = "AzureWebJobsStorage")]
ICollector<TranslateRequest> translateQueue,
[Queue(Constants.SearchRequestQueue, Connection = "AzureWebJobsStorage")]
ICollector<SearchRequest> searchQueue,
[Queue(Constants.SentimentRequestQueue, Connection = "AzureWebJobsStorage")]
ICollector<SentimentRequest> sentimentQueue,
[Queue(Constants.SlackmessageRequestQueue, Connection = "AzureWebJobsStorage")]
ICollector<SlackMessage> slackMessageQueue,
TraceWriter log)
{
//see git repository for full code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment