How to properly format CSV data within the body of a Send Email step

Hey Decisions,

I'm having some trouble with my CSV data being formatted properly when I send it into the send email step. Currently I'm using a fetch step to grab the CSV data, feeding that into a 'Get String from Bytes' step, and then into the send email step. When the email gets sent the information is all jumbled and not formatted.

Comments

  • Hey there, thanks for using the Decisions Community forum!


    This is an excellent question, and I've got a great solution for you! 


    I'll upload a screenshot below, as well as the example flow itself but this is essentially how this works:


    The subflow starts by creating a string builder to collect the text from the CSV. The append text steps add tags to the text, essentially formatting it to look the way that the data looks in the CSV file. The Get Row as array step, will perform this for each row, thus the need for the 'ForEach' step. Once every row has been appended and formatted, the string builder closes, the stringbuilderdata gets turned into text, and you can output the data from this subflow into the send email step.

    I hope this helps!



Sign In or Register to comment.