FortiSOAR Discussions
punitd31
New Contributor II

Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------
[FirstName]
[FirstName]
7 REPLIES 7
Christopher_Carsey

Hi Punit,

You can use the CSV Data Management connector to load data from a CSV: https://docs.fortinet.com/document/fortisoar/1.0.0/csv-data-management/270/csv-data-management-v1-0-...
You can use a step for loop with a Create Record step to create records using the output from the CSV.

Here is an older playbook that does something similar (though it doesn't use the CSV connector). It accepts a CSV file as input, parses it, and creates indicators/assets based on the output: https://community.fortinet.com/t5/FortiSOAR/FortiSOAR-Import-Assets-Indicators-from-a-CSV/ta-p/22002... 

Thank you,

------------------------------
Chris
Principal Software Development Engineer - FortiSOAR
------------------------------
-------------------------------------------
Original Message:
Sent: Jun 02, 2022 08:35 PM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------
punitd31

He Chris,

Thanks for your response. I did try to use the CSV connector but when running the step, I was getting below error:
No module named 'pandas'  Connector :: csv-data-managementV1.0.0 URL : https://localhost:9595/integration/execute/?format=json 

Also, I do not seem to have access to the link to the older playbook. Do you mind attaching the older playbook to this thread.

Thanks 
Punit D



------------------------------
Punit
------------------------------
-------------------------------------------
Original Message:
Sent: Jun 03, 2022 09:23 AM
From: Christopher Carsey
Subject: Upload CSV and update FortiSOAR Records

Hi Punit,

You can use the CSV Data Management connector to load data from a CSV: https://docs.fortinet.com/document/fortisoar/1.0.0/csv-data-management/270/csv-data-management-v1-0-...
You can use a step for loop with a Create Record step to create records using the output from the CSV.

Attached is an older playbook that does something similar (though it doesn't use the CSV connector). It accepts a CSV file as input, parses it, and creates indicators/assets based on the output.

Thank you,

------------------------------
Chris
Principal Software Development Engineer - FortiSOAR
------------------------------

Original Message:
Sent: Jun 02, 2022 08:35 PM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------
[FirstName]
[FirstName]
Christopher_Carsey

Hi Punit,

It looks like your environment did not install the Python dependencies. Please run this command to install them separately:
>=7.2.0
sudo -u fsr-integrations /opt/cyops-integrations/.env/bin/pip install -r /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0/requirements.txt

<=7.0.2

sudo -u nginx /opt/cyops-integrations/.env/bin/pip install -r /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0/requirements.txt

I have also updated the link in my original message. Please try the new link to see the other playbook.

Thank you,



------------------------------
Chris
Principal Software Development Engineer - FortiSOAR
------------------------------
-------------------------------------------
Original Message:
Sent: Jun 03, 2022 09:46 AM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

He Chris,

Thanks for your response. I did try to use the CSV connector but when running the step, I was getting below error:
No module named 'pandas'  Connector :: csv-data-managementV1.0.0 URL : https://localhost:9595/integration/execute/?format=json 

Also, I do not seem to have access to the link to the older playbook. Do you mind attaching the older playbook to this thread.

Thanks 
Punit D



------------------------------
Punit
------------------------------

Original Message:
Sent: Jun 03, 2022 09:23 AM
From: Christopher Carsey
Subject: Upload CSV and update FortiSOAR Records

Hi Punit,

You can use the CSV Data Management connector to load data from a CSV: https://docs.fortinet.com/document/fortisoar/1.0.0/csv-data-management/270/csv-data-management-v1-0-...
You can use a step for loop with a Create Record step to create records using the output from the CSV.

Attached is an older playbook that does something similar (though it doesn't use the CSV connector). It accepts a CSV file as input, parses it, and creates indicators/assets based on the output.

Thank you,

------------------------------
Chris
Principal Software Development Engineer - FortiSOAR

Original Message:
Sent: Jun 02, 2022 08:35 PM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------
punitd31

Hey Chris,

I am getting error as below while updating python dependencies:

ERROR: Could not find a version that satisfies the requirement json (from -r /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0/requirements.txt (line 4)) (from versions: none)
ERROR: No matching distribution found for json (from -r /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0/requirements.txt (line 4))

------------------------------
Punit
------------------------------
-------------------------------------------
Original Message:
Sent: Jun 03, 2022 09:23 AM
From: Christopher Carsey
Subject: Upload CSV and update FortiSOAR Records

Hi Punit,

You can use the CSV Data Management connector to load data from a CSV: https://docs.fortinet.com/document/fortisoar/1.0.0/csv-data-management/270/csv-data-management-v1-0-...
You can use a step for loop with a Create Record step to create records using the output from the CSV.

Here is an older playbook that does something similar (though it doesn't use the CSV connector). It accepts a CSV file as input, parses it, and creates indicators/assets based on the output: https://community.fortinet.com/t5/FortiSOAR/FortiSOAR-Import-Assets-Indicators-from-a-CSV/ta-p/22002... 

Thank you,

------------------------------
Chris
Principal Software Development Engineer - FortiSOAR
------------------------------

Original Message:
Sent: Jun 02, 2022 08:35 PM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------
[FirstName]
[FirstName]
Christopher_Carsey

Hi Punit,

Please try running this direct command to install:
sudo -u nginx /opt/cyops-integrations/.env/bin/pip install numpy pandas

Thank you,

------------------------------
Chris
Principal Software Development Engineer - FortiSOAR
------------------------------
-------------------------------------------
Original Message:
Sent: Jun 03, 2022 10:39 AM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hey Chris,

I am getting error as below while updating python dependencies:

ERROR: Could not find a version that satisfies the requirement json (from -r /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0/requirements.txt (line 4)) (from versions: none)
ERROR: No matching distribution found for json (from -r /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0/requirements.txt (line 4))

------------------------------
Punit
------------------------------

Original Message:
Sent: Jun 03, 2022 09:23 AM
From: Christopher Carsey
Subject: Upload CSV and update FortiSOAR Records

Hi Punit,

You can use the CSV Data Management connector to load data from a CSV: https://docs.fortinet.com/document/fortisoar/1.0.0/csv-data-management/270/csv-data-management-v1-0-...
You can use a step for loop with a Create Record step to create records using the output from the CSV.

Here is an older playbook that does something similar (though it doesn't use the CSV connector). It accepts a CSV file as input, parses it, and creates indicators/assets based on the output: https://community.fortinet.com/t5/FortiSOAR/FortiSOAR-Import-Assets-Indicators-from-a-CSV/ta-p/22002... 

Thank you,

------------------------------
Chris
Principal Software Development Engineer - FortiSOAR

Original Message:
Sent: Jun 02, 2022 08:35 PM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------
Parag
Staff
Staff

Hi Punit,

Please check the link below
https://community.fortinet.com/t5/FortiSOAR/Ingest-Advisories-from-PDF-Excel-CSV-files/ta-p/220045
Use the playbooks from the link. Instead of email, just change the start point to be "Manual Input".-------------------------------------------
Original Message:
Sent: Jun 02, 2022 08:35 PM
From: Punit Dwivedi
Subject: Upload CSV and update FortiSOAR Records

Hello,

I am looking to formulate a solution. I want to upload a csv file using user prompt to FortiSOAR and update records in Module of FortiSOAR. Of course, the headers in field will be similar to fields created in module. 

Looking for inputs from community members.

------------------------------
Punit
------------------------------

benstoke
New Contributor

Punit, how are you?

Your environment did not install Python dependencies. If you would like to install them separately, please run this command:

7.2.0 or greater

CSV-Data-Management_1_0_0/requirements.txt /opt/cyops-integrations/integrations/connectors/csv-data-management_1_0_0

This is 7.0.2.

CSV-Data-Management_1_0_0/requirements.txt in: sudo -u nginx /opt/cyops-integrations/.env/bin/pip install r

In my original message, I have also updated the link. You can view the other playbook by clicking the new link.

Thanks a lot,