cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlazerus
Frequent Visitor

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
Frequent Visitor

I actually just figured this out. 

View solution in original post

2 REPLIES 2
jlazerus
Frequent Visitor

I actually just figured this out. 

anton-khrit
Helper V
Helper V

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
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,243)