• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Recipe Building Questions
C

Chris Webb

started a topic over 5 years ago
Answered

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


Best Answer
P
Patricia Guevarra said over 5 years ago

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

Answer

Patricia Guevarra

said over 5 years ago

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
C

Chris Webb

said over 5 years ago

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

Screenshot 2017-12-06 09.58.53.png
Screenshot 2...
(64.4 KB)

Patricia Guevarra

said over 5 years ago

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
C

Chris Webb

said over 5 years ago

Hi Patricia,


That's perfect, thx!

Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count