Azure / Azure/azure-quickstart-templates
Alert to Slack with Logic App instructions outdated, doesn't work with new flow
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
[alert-to-slack-with-logic-app](https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app)
### Issue Details
1. The instructions for this template are outdated. When associating the webhook URL with the alert, there's no option to provide a webhook URL in the exact format that is output from the Logic App deploy. Instead, it's possible to directly link the Logic App to be triggered when the Alert fires. This would be great, except for the fact that the Logic App itself doesn't work.
2. When the Logic App fires, there is an error that gets encountered, stopping the Slack message from being sent.
3.
```
InvalidTemplate. Unable to process template language expressions in action 'Http' inputs at line '1' and column '1773': 'The template language expression 'triggerBody()['context']['portalLink']' cannot be evaluated because property 'context' doesn't exist, available properties are 'schemaId, data'. Please see https://aka.ms/logicexpressions for usage details.'.
```
The error likely comes from here: https://github.com/Azure/azure-quickstart-templates/blob/86acf7c320c5df72ee97784be4a4a9c8315a5016/demos/alert-to-slack-with-logic-app/azuredeploy.json#L110
### Repro steps
1. Deploy the Logic App using the existing instructions (these are fine)
2. Get the Output of the Logic App Deploy and copy the part of the URL with the `listCallbackURL` (which is what I assume is the intention here, but the instructions are not clear)
3. Edit the Action Group and attempt to set up a Webhook using the URL from step 2. **Observe how the provided URL does not work here.**
4. Rather than setting up a Webhook, we can specify a Logic App as a side effect of the Action Group. Configure that then fire the alert.
5. Navigate to the logic app run history, and click into the failed run. Observe the error that is visible here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the alert-to-slack-with-logic-app demo and the linked azuredeploy.json location around line 110. Deploy it using the documented steps, test both the webhook and direct Logic App Action Group paths, and inspect the Logic App run history for the reported InvalidTemplate error. Done means the instructions match the current flow and a fired alert successfully sends the Slack message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100