cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlazerus
Level: Powered On

Convert CSV string into Array fields for Slack message

Hi,

 

I have an HTTP request where I'm receiving CSV data and I'd like to format that data so that it fits into the json body of a message I'd like to send with Slack. 

 

Response body set as string variable:

Screen Shot 2019-02-09 at 5.24.40 PM.png

 

I'm trying to fit each row of the response into this portion of the json for a formatted message.

 

"fields": [
{
"title": "Public IP Space - Daily",
"value": "2019-02-09 10:00:04",
"short": false
},
{
"title": "DMZ Servers - Daily",
"value": "2019-02-09 11:30:10",
"short": false
},
{
"title": "Cisco Network Devices - Daily",
"value": "2019-02-09 11:30:10",
"short": false
}
],

 

I will not know the number of lines this response will have. It can be 0-7ish at any given time. I've tried the method on this post but its not working the way I need it too where each line gets its own hash table. Any thoughts on how to do this in flow?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
jlazerus
Level: Powered On

Re: Convert CSV string into Array fields for Slack message

I actually just figured this out. 

2 REPLIES 2
Highlighted
jlazerus
Level: Powered On

Re: Convert CSV string into Array fields for Slack message

I actually just figured this out. 

Super User
Super User

Re: Convert CSV string into Array fields for Slack message

Hi!

 

You can use Parse CSV action from Plumsail Documents connector. It allows you to convert CSV into an array and variables for each column. Please read this article demonstrating how it works.

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 186 members 5,380 guests
Please welcome our newest community members: