问题标签 [power-automate]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
power-automate - 获取昨天的日期 (MS Power Automate)
在 Microsoft Power Automate 中,使用表达式utcNow()
可以获得当前日期(和时间)。我试图得到昨天的日期。我尝试dateadd(utcNow(), -1)
了类似的代码,但没有任何效果。有人知道如何在 Microsoft Power Automate 中使用日期吗?
sharepoint - Microsoft Flow - 阻止将视频文件上传到 Sharepoint 站点
我是 Sharepoint 网站的所有者,并希望确保该网站的所有成员都不会上传视频文件。由于 SP 无法按类型过滤文件 - 我想使用 Microsoft Flow 来完成此任务。
所以我创建了这个流程,它在我的 SP 站点的 Documents 文件夹中创建新文件时触发。然后它运行一个条件,它检查“文件内容类型”的属性——如果它以“视频/”开头——那么它应该删除上传的文件。它看起来像这样:
@startsWith(triggerOutputs()['headers']['Content-Type'], 'video/')
但是当我运行这个流程时,我会收到这个错误:
BadRequest。请求失败。错误代码:“无效请求内容”。错误消息:'请求内容无效,无法反序列化:'解析值时遇到意外字符:{。路径“详细信息”,第 1 行,位置 455.'.'。
我究竟做错了什么?
power-automate - How do I Create a Custom Connector in Microsoft Flow with the correct request URL?
I am attempting to create a custom connector for the Clio API (https://app.clio.com/api/v4/documentation). I was able to successfully authenticate and access the API in Postman, testing out quite a few different types of requests with good results.
Then I exported the collection to a Postman file and imported it into a new custom connector in my MS Flow account as instructed at https://docs.microsoft.com/en-us/connectors/custom-connectors/define-postman-collection. As part of that process, I entered the following settings:
Scheme: HTTPS
host: app.clio.com
Base URL: /
Within the custom connector requests, all the definitions looked acceptable, except that instead of having the fully qualified request URL, they did not include https://app.clio.com
.
For example, one request should use the following address:
https://app.clio.com/api/v4/contacts.json
The field in MS Flow, where URL should be entered, is grayed out and only includes /api/v4/contacts.json
and looks like this:
The grayed out field cannot be typed in. Instead, I have clicked "Import from sample," which leads to a window where I can type in the fully qualified URL. After I do that and click the "import" button, the window still lists the partial URL as shown above.
At first I thought that was intentional, since I had entered the host elsewhere for the connector, and I thought that Flow would put them together to send the request to the right URL. But it did not: when I tested the operation, I got a 404 error:
When I looked at the request, this is the URL:
So obviously Flow is not using the correct request URL, and I cannot figure out how to enter the fully qualified request URL. Can anybody tell me what I am doing wrong?
I found another comment where someone else is having the same problem: https://stackoverflow.com/a/48813209/7191369 so I'm not the only one. Thanks in advance for your help.
Edit:
After some additional searching, the address in the request (with https://msmanaged-na.azure-apim.net
) is the required redirect URL for the proxy per this post: https://powerapps.microsoft.com/en-us/blog/custom-api-with-authentication/, and is used when processing OAuth. But the crappy part of this is that I can't see the request URL so I can't troubleshoot. Is there any way to see what request the proxy server is sending out to the Clio API?
power-automate - 仅在某些日期和时间范围内运行 Microsoft Flow 的条件?
我想在 Office 365 中设置 Microsoft Flow 触发器,这样如果我在下班后或周末收到来自特定人群的电子邮件,我会收到来自应用程序的通知。我已经弄清楚了人员部分,我看到他们在接收时间上有一个“等于”条件,但是我如何按天/时间范围过滤?
json - Microsoft Flow SharePoint 到团队 HTTP 413
我有一个 Microsoft Flow,它提取一个 SharePoint 列表项及其附件,创建一条消息,然后通过 Webhook 连接器将该消息发送到 Teams。
为了发送附件,我需要发送Base64
代表。我相信这会使消息太大,因为我正在收到HTTP 413
回复。
我发送的消息是正确的(我在 Actionable Message Playground 中对其进行了测试),但它是失败的连接(到 Teams 的 HTTP POST)。请帮助我了解我可以做些什么来让大消息通过。
错误信息:
HTTP Post 返回200
,但正文说:
Webhook 消息传递失败并出现错误:Microsoft Teams 端点
HTTP error 413
返回ContextId tcid=2621360276746394848, server=EAP010230119133,cv=NwLUXyVdN0uhKCant2X4fw.0
azure-logic-apps - 逻辑应用 - 无法评估,因为属性不存在
在逻辑应用程序中,我有一个表达式:
我基本上想获得第一个不为空的,但是其中一个在 json 有效负载中不存在。我收到一个错误:
'模板语言表达式'coalesce(triggerbody().data.job_id,triggerbody().resource_id,'error')'不能被评估,因为属性'data'不存在,可用属性是'transaction_id, event_type, event_time,资源,resource_id,account_id,resource_third_party_id,request_user_type,request_user_id'。请参阅https://aka.ms/logicexpressions了解使用详情。'。
如果数据不存在,则该值应为“null”并使用 resource_id。任何想法表达会是什么样子有这种行为?
power-automate - MS Flow:如何实现类似 `_.find()` (lodash/JS)
如何使用 MS Flow 从数组中按指定属性的值选择单个对象?
示例数组:
在上面的示例中,我可能只想使用第一个对象及其其余可用属性。
乐于使用工作流定义语言和/或任何数据操作操作。
azure - 集成逻辑应用
抱歉,如果这不是问的正确地方,但我有一个迫切的问题。我公司目前有以下集成:
云应用程序 1 <-SOAP Web 服务-> Biztalk 服务器 IaaS <-Azure 服务总线或 SFTP(取决于消息大小)-> 云应用程序 2
我们可以用逻辑应用程序甚至 Microsoft Flow 替换当前托管在 Biztalk Server 中的 Biztalk Server 和 SOAP Web 服务吗?
谢谢
arrays - 生成 JSON 模式
我正在尝试设置 Microsoft 流程。简而言之,我需要获取从设备检索到的 JSON 数据,并对其进行解析,以便我可以在下面的流程中引用它。为了解析,我需要向 Flow 提供 JSON Schema。Microsoft Flow 可以选择从示例有效负载(从 API 调用返回的结果)生成它,但它没有正确生成它。我希望有人能帮助我。我需要正确的 JSON 架构。
API 返回的数据:
通过上述示例有效载荷在 Flow 中生成的方案:
然后我尝试仅从数据生成模式。这似乎可行,但是当 Flow 运行时,我收到 Json 验证错误。
尝试从这样的数据生成:
这产生了这样的方案:
sql - 子字符串长度失败(需要的时间超过设置的时间)
我有一个失败的 Microsoft Flow,并显示以下消息:
我知道这意味着什么,在这种情况下,它是关于一个将 nvarchar(2000) 设置为限制的 SQL 列。在使用“SQL 插入操作”插入它之前,我会在我的流程中处理这个问题。我将 HTML(来自电子邮件)转换为文本(源为 5024 长),
在此之后,我检查(条件)长度是否大于 1999(它更大,所以它进入 Yes 部分),在那里我取这个 5024 长字符串的子字符串,像这样“ substring(body('converetedHTML'),0,1999)
”(请注意,这适用于所有以前的运行) 但由于某种原因,对于这个 1 Flow,它需要 2023 而不是 1999,因此会出现错误消息。
在每一步它都有它应该有的东西,除了 SQL 插入操作,这个有 1999 的变量的值变成了 2023。不知道这是怎么回事。
谁能建议我要寻找的东西,或帮助我,因为在我看来这是一个“故障”而不是逻辑错误,但我可能是错的,无论如何我想弄清楚这一点?
谢谢大家!