I use list worksheet rows to load a email column from excel and some column has multiple emails separate by comma and when I use it in outlook email recipient by using {{split(1.row.c.text; “,”)}}, it still has errors. It seems someone mentioned to toggle on Map but I tried still failed, please help, thank you.
Result of loading excel :
recipient formula :
Hey there,
That field accepts a singular email. Toggle the Map button to input an array of emails.
Hi Stoyan, thanks for your reply. I use the same split function and toggle on Map but it still returns error - Array of objects expected in parameter ‘toRecipients’. May I know how to make it an array ? thank you
The split() function makes it an array, you just need to make sure it has the same format as the module expects.
I tried to use a set variable to split the email text and the output is an array as below but still returns errors when I put it in toRecipients in outlook
As far as I know, Outlook expects it in key-value pairs. The entire call looks something like this:
“toRecipients”:[
{
“emailAddress”:{
“address":"test@test.com”,
“address”:”test2@test.com”
}
}
]
You can use a JSON module to build an array that follows this structure.
Finally figured out how to solve this issue. Make a record here to remind myself and also hope it can benefit others as well.
- In order to make it easier, I use the following json format in my excel cell :
| [
{“address":"pabrother@example.com”},
{“address":"pabrother2@example.com”},
{“address":"pabrothe3@example.com”}
- use excel low worksheet rows to get execl data, the column name is called email
- use a Parse JSON module and select email.text, the output looks like below
- use array aggregator and select the output of Parse JSON module and toggled “address” inside array aggregator. The output will look like below then just use the output in outlook email recipient (need to toggle on Map there)