I really need your help since my programming skills aren't that great and Chat-GPT isn't a great help either.
I have the input data, which is basically just a bunch of emails divided by a comma. The goal is to write each email in a separate line, so I can access them in a later step in the Zap.
The Split option in the formatter doesn’t work at all so I thought about programming it myself.
But I don't know how I have to write the code so python recognizes the email adresses. The adresses aren't static.
Can anybody help?
Page 1 / 1
Hi @ynnklo99
Good question.
Can you clarify about the desired output you want for the email addresses by providing an example of the input vs output?
Some options to try…
Formatter > Text > Split
Formatter > Text > Replace
Formatter > Utilities > Line Items to Text
hey @Troy Tessalone thank you for the fast reply!
the input is: loremipsum@loremipsum.de,loremipsum@loremipsum.de
I really need circular font your help since my programming skills aren't that great and Chat-GPT isn't a great help either.
I have the input data, which is basically just a bunch of emails divided by a comma. The goal is to write each email in a separate line, so I can access them in a later step in the Zap.
The Split option in the formatter doesn’t work at all so I thought about programming it myself.
But I don't know how I have to write the code so python recognizes the email adresses. The adresses aren't static.
Can anybody help?
You can achieve this by using the split() method and specifying the comma (",") as the delimiter. Here's an example code snippet:
input_data = "email1@example.com, email2@example.com, email3@example.com" # Split the input data into a list of email addresses emails = input_data.split(", ") # Print each email address on a separate line for email in emails: print(email)
In this code, input_data represents your input string containing the email addresses. The split(", ") method is used to split the string into a list of email addresses, assuming that the email addresses are separated by a comma followed by a space.
You can replace the print(email) statement with your desired action, such as storing the email addresses in a variable, writing them to a file, or passing them to the subsequent steps in your Zap.