Skip to main content

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

 

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


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 ?


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.


@VictorSOAR 

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


single as of now 


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


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. 


single as of now 


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


yes i have worked with multiple json recently


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 


Reply