简体   繁体   English

Zapier 有没有办法将 python 输出转换为单独的行?

[英]Is there a way in Zapier to convert a python output to separate lines?

I have a Python output in a Zapier output that looks like this:我在 Zapier 输出中有一个 Python 输出,如下所示:

在此处输入图片说明

I want to be able to use this in the body of gmail as separate lines.我希望能够在 gmail 正文中使用它作为单独的行。 However, presently, it looks like this when I use that python output as the step.但是,目前,当我使用该 python 输出作为步骤时,它看起来像这样。 The screenshot below is the email returned after I test.下面的截图是我测试后返回的邮件。

在此处输入图片说明 Is there a filter or a pythonic way to do this within Zapier?在 Zapier 中是否有过滤器或 pythonic 方法来执行此操作?

The output would ideally look like this:理想情况下,输出如下所示:

https://hectv.sharefile.com/dxxxxxxxfcebd247d09
https://hectv.sharefile.com/dxxxxxxx729cd9494
https://hectv.sharefile.com/d-xxxxxx84622a

Thank you.谢谢你。

William from Zapier answered this for me.来自 Zapier 的威廉为我回答了这个问题。

If we're generating a line item array with the code step and we need individual items, you'll want to add a Formatter - Utility - Line Item to Text action.如果我们使用代码步骤生成一个行项目数组并且我们需要单独的项目,您将需要添加一个 Formatter - Utility - Line Item to Text 操作。

This action will go just after the Run Python step and should take the Sharefile Output as the input for the formatter.此操作将在 Run Python 步骤之后执行,并且应将 Sharefile 输出作为格式化程序的输入。 From there, the formatter can break the line item array down into individual text strings that you can assign in the zaps remaining steps.从那里,格式化程序可以将行项数组分解为单独的文本字符串,您可以在 zaps 的剩余步骤中分配这些字符串。 :) :)

For more information on Formatter check out our article here: https://zapier.com/help/create/format/get-started-with-formatter有关格式化程序的更多信息,请查看我们的文章: https : //zapier.com/help/create/format/get-started-with-formatter

For more info on Line Item to Text, check out this article: https://zapier.com/help/create/format/convert-line-items-into-text-strings有关 Line Item to Text 的更多信息,请查看这篇文章: https : //zapier.com/help/create/format/convert-line-items-into-text-strings

Using Line Item to Text, the zap won't care if there are 10 items or a single item, it should still return the same individual items.使用 Line Item to Text,zap 不会关心是否有 10 个项目或单个项目,它仍然应该返回相同的单个项目。 The main concern there is that the test that is done with Line Item to Text should be a test that include the MAX number of items.主要关注的是,使用 Line Item to Text 完成的测试应该是包含 MAX 数量的项目的测试。 This way those items can be assigned in the following steps and used when they're present or ignored when they are not.这样,这些项目可以在以下步骤中分配,并在它们存在时使用或在它们不存在时被忽略。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM