Azure逻辑应用程序:如何将HTTP连接器的正文内容保存到OneDrive文件? [英] Azure Logic App: How to save HTTP Connector's body content to OneDrive file?

查看:84
本文介绍了Azure逻辑应用程序:如何将HTTP连接器的正文内容保存到OneDrive文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的Azure Logic应用,其中包含以下组件:

I have a simple Azure Logic App with the following components:

  • 重复发生
  • 从HTTPS网址获取HTTP

我尝试配置下一个组件,以将HTTP响应正文保存到OneDrive连接器,并按如下方式配置OneDrive连接器:

I've tried to configure the next component to save the HTTP response body to OneDrive with OneDrive Connector configured as follows:

  • 文件路径:ApiTest/test.json
  • 内容:@ {body('http')}
  • 内容传输编码:无

这会出现以下错误:

{代码":"InvalidTemplate",消息":在行'1'和列'11'的操作'microsoftonedriveconnector'输入中无法处理模板语言表达式:'无法评估模板语言表达式:其中之一字符串插值段值的类型不支持'对象'.请使用'string()'函数将其转换为字符串.'"

{"code":"InvalidTemplate","message":"Unable to process template language expressions in action 'microsoftonedriveconnector' inputs at line '1' and column '11': 'Template language expression cannot be evaluated: one of string interpolation segment value has unsupported type 'Object'. Please convert the value to string using the 'string()' function.'."}

如果我再使用@ {string(body('http'))},我会得到:

If I then use @{string(body('http'))} I get:

{"code":"InvalidTemplate","message":在行'1'和列'11'的操作'microsoftonedriveconnector'输入中无法处理模板语言表达式:'调用了模板语言功能'string'参数无效.该值无法转换为目标类型.'.}

{"code":"InvalidTemplate","message":"Unable to process template language expressions in action 'microsoftonedriveconnector' inputs at line '1' and column '11': 'The template language function 'string' was invoked with an invalid parameter. The value cannot be converted to the target type.'."}

如何使用HTTP连接器的正文并将其保存到一个驱动器?

How can I use the body of HTTP Connector and save it to One Drive?

推荐答案

您应尝试使用"@body('http')".我相信这会奏效. "@ {body('http')}"是字符串插值的一种形式:预期的输出值为字符串,而不是JSON.

You should try "@body('http')". I believe this will work. "@{body('http')}" is a form of string interpolation: expected output value is string and not a JSON.

这篇关于Azure逻辑应用程序:如何将HTTP连接器的正文内容保存到OneDrive文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆