0

我正在尝试使用此 Azure Serverless IOT 按钮项目来发送 SMS 警报:https ://azure.microsoft.com/en-in/resources/samples/azure-serverless-iot-button/

当我单击该按钮一次时,我看到 Logic App 开始运行多次,并且在不到一分钟的时间里,我收到了数百条 SMS 消息。每次点击按钮我只需要一个短信提醒。我错过了什么?

    "$connections": {
        "value": {
            "plivo": {
                "connectionId": "/subscriptions/---0-fb3c-406e-98--2-7fa0e00ef0d0/resourceGroups/--/providers/Microsoft.Web/connections/plivo",
                "connectionName": "plivo",
                "id": "/subscriptions/f--0-fb3c-406e-9-72-7f--0/providers/Microsoft.Web/locations/westus/managedApis/plivo"
            }
        }
    },
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Send_SMS": {
                "inputs": {
                    "body": {
                        "dst": "1 801-999-9999",
                        "src": "1 801-999-9982",
                        "text": "Button Pressed - @{triggerBody()?['location']}"
                    },
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['plivo']['connectionId']"
                        }
                    },
                    "method": "post",
                    "path": "/v1/Account/auth_id_value/Message/"
                },
                "runAfter": {},
                "type": "ApiConnection"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "parameters": {
            "$connections": {
                "defaultValue": {},
                "type": "Object"
            }
        },
        "triggers": {
            "manual": {
                "inputs": {
                    "schema": {
                        "properties": {
                            "location": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    }
                },
                "kind": "Http",
                "type": "Request"
            }
        }
    }
}
4

2 回答 2

0

您已将此问题标记为azure-function-app,您确定 azure 函数只调用一次逻辑应用程序吗?您能否发布 azure 函数的代码

于 2019-06-25T21:46:29.557 回答
0

我显然没有过滤通过的消息,因此它触发了与按钮无关的其他遥测。

于 2019-06-26T01:07:18.473 回答