Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
14k stars 16.1k forks source link

Google's URL shortener is out of service #5956

Open yohanb opened 5 years ago

yohanb commented 5 years ago

201-alert-to-slack-with-logic-app

Issue Details

Google API used to shorten URL is officially out of service. It returns a 403. https://blog.rebrandly.com/google-url-shortener/

unnaturalshah commented 5 years ago

Seems like the link works

magosb commented 5 years ago

I am having the same issue. Does anyone have a solution?

skibleried commented 4 years ago

TL;DR - There is no way around this error using the quick start template as-is. The only solution is to modify the template flow/logic. The easiest path around this is to simply gut the URL shortener portion which is useful but certainly optional to functionality.

Here's a sample of the template code you can reference that is working for me. Note this also contains fixes for #3319

        "actions": {
            "Post_Message": {
                "inputs": {
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['slack_1']['connectionId']"
                        }
                    },
                    "method": "post",
                    "path": "/chat.postMessage",
                    "queries": {
                        "channel": "#myslackchannel",
                        "text": "Azure Alert - '@{triggerBody()['data']['context']['name']}' @{triggerBody()['data']['status']} on '@{triggerBody()['data']['context']['resourceName']}'. Details: @{triggerBody()['data']['context']['portalLink']}"
                    }
                },
                "runAfter": {},
                "type": "ApiConnection"
            }
        },

The Google URL shortener service has in fact been discontinued or rather replaced Firebase Dynamic Links but the API isn't directly compatible as noted in the article referenced by OP.

Other replacement services such as Bit.ly and Ow.ly could be used but will require users of this to have an account and alter this application to leverage them.

estensen commented 4 years ago

@jeffhollan you updated the template recently. Are there any plans on fixing the template? It's been broken for a long time.