As a matter of fact I had just tried Format Map and yes it works better but what I didn't know about was the `.join("\n")` and that was the final missing piece.
One other question, when sending an email via Workato it seems like you can either send text or a formula but not both and what I was hoping to do was embed my batch listing within some free text so is it possible to have a mixture? thx
Chris Webb
Include CSV list in email
Hi,
I've created recipe that sends an email when a batch update happens on a Postgres table
What I'd like to do is list the updated rows in a CVS format in the email with each record on a separate row like
2520, I am, Cat, cat@company.com, false
2518, I am, Dog, dog@company.com, false
What I've done so far for the email body is using formula mode I have the formula
ROWS.pluck('id','first_name','last_name','email','has_free_campaign').to_csv
and in the email I get...
"[2520, ""I am"", ""Cat"", ""cat@company.com"", false]","[2518, ""I am"", ""Dog"", ""dog@company.com"", false]"
How do I get rid of all off the double double quotes and have each record on a separate row?
cheers,
Chris
Hi Chris,
Thanks for reaching out! You can try using the Format Map formula instead. You can see more information here: https://support.workato.com/solution/articles/1000250369-how-to-combine-array-elements-into-a-single-string-format-map
Patricia Guevarra
Hi Chris,
Thanks for reaching out! You can try using the Format Map formula instead. You can see more information here: https://support.workato.com/solution/articles/1000250369-how-to-combine-array-elements-into-a-single-string-format-map
1 person likes this
Chris Webb
Hi Patricia,
Thanks very much for getting back to me!
As a matter of fact I had just tried Format Map and yes it works better but what I didn't know about was the `.join("\n")` and that was the final missing piece.
One other question, when sending an email via Workato it seems like you can either send text or a formula but not both and what I was hoping to do was embed my batch listing within some free text so is it possible to have a mixture? thx
best,
Chris
Patricia Guevarra
Hi Chris,
Perhaps you can refer to this forum post on combining text, data pills, and formulas in a field: https://support.workato.com/discussions/topics/1000083878
Hope this helps!
1 person likes this
Chris Webb
Hi Patricia,
That's perfect, thx!