Skip to main content
Solved

Convert JSON result to CSV and ADD csv file as attachment on the case wall

  • September 24, 2024
  • 11 replies
  • 104 views

vanitharaj1208
Forum|alt.badge.img+14

Convert JSON result to CSV and ADD csv file as attachment on the case wall

 

Best answer by VictorSOAR

i had build custom action to convert json to csv then i encode csv to base64 and finally passed base64 blob as input to attachment action from fileutils


Hi @vanitharaj1208 ,

I had also created a playbook to convert json to csv and attaching csv file to case wall as below:

1. Used 'CSV - Save Json To CSV' to get the json object in csv file. This action is available in CSV integration from marketplace.

2. Used 'FileUtilities - Get Files as Base64' action to convert this csv file to base64 strings.

3. Used 'FileUtilities - Add Attachment' action and provided base64 blob of 'FileUtilities - Get Files as Base64 json results' and in Type provided .csv file type to attach csv file to case wall.

11 replies

cmorris
Staff
Forum|alt.badge.img+10
  • Staff
  • September 24, 2024

vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • September 25, 2024

i had build custom action to convert json to csv then i encode csv to base64 and finally passed base64 blob as input to attachment action from fileutils


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • September 25, 2024

Have you tried the Save JSON to CSV action (https://cloud.google.com/chronicle/docs/soar/marketplace-integrations/csv#save_json_to_csv) and the Add Attachment action (https://cloud.google.com/chronicle/docs/soar/marketplace/power-ups/file-utilities#add-attachment)?


i tired with same solution, how to i access that file location where does it store ..../tmp/filename 

 

did u try ?


VictorSOAR
Forum|alt.badge.img+6
  • Bronze 1
  • Answer
  • September 25, 2024

i had build custom action to convert json to csv then i encode csv to base64 and finally passed base64 blob as input to attachment action from fileutils


Hi @vanitharaj1208 ,

I had also created a playbook to convert json to csv and attaching csv file to case wall as below:

1. Used 'CSV - Save Json To CSV' to get the json object in csv file. This action is available in CSV integration from marketplace.

2. Used 'FileUtilities - Get Files as Base64' action to convert this csv file to base64 strings.

3. Used 'FileUtilities - Add Attachment' action and provided base64 blob of 'FileUtilities - Get Files as Base64 json results' and in Type provided .csv file type to attach csv file to case wall.


ORBR
Forum|alt.badge.img+6
  • Bronze 5
  • September 25, 2024

@VictorSOAR 

Can I add multiple JSON results into the same CSV file?


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • September 25, 2024

single as of now 


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • September 25, 2024

Hi @vanitharaj1208 ,

I had also created a playbook to convert json to csv and attaching csv file to case wall as below:

1. Used 'CSV - Save Json To CSV' to get the json object in csv file. This action is available in CSV integration from marketplace.

2. Used 'FileUtilities - Get Files as Base64' action to convert this csv file to base64 strings.

3. Used 'FileUtilities - Add Attachment' action and provided base64 blob of 'FileUtilities - Get Files as Base64 json results' and in Type provided .csv file type to attach csv file to case wall.


Ill Check and Reply ... Thank you


vanitharaj1208
Forum|alt.badge.img+14
  • Author
  • Silver 2
  • September 26, 2024

Hi @vanitharaj1208 ,

I had also created a playbook to convert json to csv and attaching csv file to case wall as below:

1. Used 'CSV - Save Json To CSV' to get the json object in csv file. This action is available in CSV integration from marketplace.

2. Used 'FileUtilities - Get Files as Base64' action to convert this csv file to base64 strings.

3. Used 'FileUtilities - Add Attachment' action and provided base64 blob of 'FileUtilities - Get Files as Base64 json results' and in Type provided .csv file type to attach csv file to case wall.


It working and i have tested. 


jasonsigman
Forum|alt.badge.img+2
  • Bronze 1
  • March 12, 2025

single as of now 


Has this ever been updated to work with multiple JSON results?


vanitharaj1208
Forum|alt.badge.img+14

yes i have worked with multiple json recently


Brian
  • New Member
  • July 23, 2025

Did you ever figure out where the file location is (/tmp/filename)? I want to use the CSV Search by String action but unsure what the CSV Path should be