cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
jlazerus
Level: Powered On

Re: Convert CSV string into Array fields for Slack message

I actually just figured this out. 

View solution in original post

2 REPLIES 2
jlazerus
Level: Powered On

Re: Convert CSV string into Array fields for Slack message

I actually just figured this out. 

View solution in original post

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,964)