在 Zapier 中,如何获取 Python“运行代码"的输入?动作作为列表传递而不是连接字符串? [英] In Zapier, how do I get the inputs to my Python "Run Code" action to be passed in as lists and not joined strings?

查看:27
本文介绍了在 Zapier 中,如何获取 Python“运行代码"的输入?动作作为列表传递而不是连接字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Zapier 中,我有一个由Twitter"事件触发的运行 Python"操作.Twitter 事件传递给我的字段之一称为实体 URL 显示 URL".它是正在处理的推文中所有链接的锚文本列表.

In Zapier, I have a "Run Python" action triggered by a "Twitter" event. One of the fields passed to me by the Twitter event is called "Entities URLs Display URL". It's the list of anchor texts of all of the links in the tweet being processed.

Zapier 将此值作为单个逗号分隔字符串传递到我的 Python 代码中.我知道我可以使用 .split(',') 来获取列表,但是如果原始字符串包含逗号,这会导致歧义.

Zapier is passing this value into my Python code as a single comma-separated string. I know I can use .split(',') to get a list, but this results in ambiguity if the original strings contained commas.

有什么方法可以让 Zapier 将此字符串序列作为字符串序列而不是单个连接在一起的字符串传递到我的代码中吗?

Is there some way to get Zapier to pass this sequence of strings into my code as a sequence of strings rather than as a single joined-together string?

推荐答案

这里是 David,来自 Zapier 平台团队.

David here, from the Zapier Platform team.

此时,由于数据在 zap 步骤之间传递的方式,代码步骤的所有输入都被强制转换为字符串.不过,这是一个很好的要求,我会在内部记录下来.

At this time, all inputs to a code step are coerced into strings due to the way data is passed between zap steps. This is a great request though and I'll make a note of it internally.

这篇关于在 Zapier 中,如何获取 Python“运行代码"的输入?动作作为列表传递而不是连接字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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