🏅

List of items via Zapier

To import a list of items from Zapier you can use the Code by Zapier Action (Run Python event):

image
image

Parameters

You will need to setup the Input Data to pass the parameters into this Action, they should contain the lists of item you want to convert for FinDaily. The input data name can be whatever you want to call it, you will just need to know that reference to make some updates to the Zapier code.

image

Example

image

Python Code

In the code you will need to alter the first few lines to reflect the input data you configured. (see the code example below

itemNames = input_data["itemNameList"].split(",")
itemIds = input_data["itemIdList"].split(",")

itemListStr = "<ul>"
for i in range(len(itemIds)):
    itemListStr += "<li>" + itemIds[i] + " " + itemNames[i] + "</li>"
itemListStr += "</ul>"
    
output = {"string": itemListStr}

You will need to copy the first line for each input data you want to use, changing the name inside the quotes to match the name you gave it in the previous step.

The following line will then need to be changed to reflect how you want each item to be displayed in the email template

    itemListStr += "<li>" + itemIds[i] + " " + itemNames[i] + "</li>"

(this can be completely customized, however if you still want it to be output like a bullet list, you will need to keep the opening <li> and closing </li> tags.)

Pushing to FinDaily

Create a Custom Variable of type Text in FinDaily, then add another action to your Zap to set that value using the Findaily Action.

image

When setting up the action, use the output "string" from the previous Code action.

image

Showing in your template

In the email template page in your FinDaily Dashboard, add your custom variable from the variables button. For the format, select HTML.

image

That's it! You should now see a bullet list of your items in the email. If you need any help with the above script please drop us a message using the chat button in the bottom right.