# How to run workflow from .csv file as trigger parameter?

**URL:** <https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422>\
**Category:** InsightConnect\
**Tags:** InsightConnect, workflow-building, workflows\
**Created:** [March 11, 2024, 8:37am UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422 "2024-03-11T08:37:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![baksoy](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@baksoy](https://discuss.rapid7.com/u/baksoy)\
**Post date:** [March 11, 2024, 8:37am UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/1 "2024-03-11T08:37:18Z")

</div>

Hey,

I currently have a workflow called “Enrich File Hash with Microsoft Teams” which I further expanded to add looping so I can add more hashes instead of just 1.

What this workflow does is: It scans the given hash on VirusTotal using the API and generates a summary based on the output.

So I would write" !enrich-hash xyz zyx" on MS-Teams and it would try to scan “xyz” and “zyx” on virustotal.

Now my question is I have a .csv file on excel that has around 200 hashes and I want to be able to somehow append this .csv file as the trigger parameter like this “!enrich-hash hashes.csv”. What would I need to add to my workflow to make this work? I have been searching for a while but unfortunately no succes.

I would really appreciate some guidance.

---

<div class="post-metadata">

**Author:** ![Sean](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/sean/32/2224_2.png) [@Sean](https://discuss.rapid7.com/u/Sean)\
**Post date:** [May 20, 2025, 8:07pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/2 "2025-05-20T20:07:15Z")

</div>

I know this has been over a year since posted, I was wondering if you found anything. I am literally writing something to do the same thing.

The trigger will list the URL for the CSV, so now i am just working on the next step of actually getting the CSV file.

---

<div class="post-metadata">

**Author:** ![Darrick\_Hall](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/darrick_hall/32/2530_2.png) [@Darrick\_Hall](https://discuss.rapid7.com/u/Darrick_Hall)\
**Post date:** [May 20, 2025, 8:32pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/3 "2025-05-20T20:32:50Z")

</div>

I don’t know how you can use the URL to fetch the CSV natively from the teams plugin.  
You could script it to grab the URL using python. So your trigger sends the message and the URL.. The URL is pathed to a python step which fetches your CSV, then you can do whatever you like once you have it in ICON.

You can manually drag a CSV into ICON to kick it off if it isn’t something you do often. I have a few snippets that I do this with for internal data processing.

---

<div class="post-metadata">

**Author:** ![Sean](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/sean/32/2224_2.png) [@Sean](https://discuss.rapid7.com/u/Sean)\
**Post date:** [May 20, 2025, 8:47pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/4 "2025-05-20T20:47:13Z")

</div>

Teams has a property that lists the URL of the attached file:

> {{[“trigger-teams”].[message].[attachments].[0].[contentUrl]}}

---

<div class="post-metadata">

**Author:** ![Darrick\_Hall](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/darrick_hall/32/2530_2.png) [@Darrick\_Hall](https://discuss.rapid7.com/u/Darrick_Hall)\
**Post date:** [May 20, 2025, 8:55pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/5 "2025-05-20T20:55:14Z")

</div>

What will you do with the URL though?

---

<div class="post-metadata">

**Author:** ![Darrick\_Hall](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/darrick_hall/32/2530_2.png) [@Darrick\_Hall](https://discuss.rapid7.com/u/Darrick_Hall)\
**Post date:** [May 20, 2025, 9:00pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/6 "2025-05-20T21:00:48Z")

</div>

I just did a quick search of the plugins on the extension library.

We have this plugin: [Rapid7 Extensions](https://extensions.rapid7.com/extension/get-url)

It says it leverages a URL to download a file. You can try this rather than scripting it.

It returns the payload as base64 encoded string.

You can use the CSV to JSON to make use of the encoded string.

---

<div class="post-metadata">

**Author:** ![Sean](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/sean/32/2224_2.png) [@Sean](https://discuss.rapid7.com/u/Sean)\
**Post date:** [May 27, 2025, 2:21pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/7 "2025-05-27T14:21:50Z")

</div>

The CSV file would be a list of hashes that we have been provided or have obtained by other means. We would then add the hashes to Defender’s block list, search to see if the hash has been seen, etc.

---

<div class="post-metadata">

**Author:** ![Sean](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/sean/32/2224_2.png) [@Sean](https://discuss.rapid7.com/u/Sean)\
**Post date:** [May 27, 2025, 2:28pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/8 "2025-05-27T14:28:38Z")

</div>

I tried using that plugin but it seems to only grab part of the file. The rest looks like it is SharePoint scripting garbage. Having used the plugin to grab other items successfully and digging through the code that is returned, I am seeing issues with authentication mentioned so at this point, SharePoint is preventing me from being able to do this.

Time to figure out another solution. I will look into what you mentioned in another reply, the only problem is that I do not have enough licenses for everyone in my team to log in. That is a me problem though. 🙂

---

<div class="post-metadata">

**Author:** ![Darrick\_Hall](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/darrick_hall/32/2530_2.png) [@Darrick\_Hall](https://discuss.rapid7.com/u/Darrick_Hall)\
**Post date:** [May 27, 2025, 2:32pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/9 "2025-05-27T14:32:32Z")

</div>

If it is hosted in Sharepoint you can just use the Sharepoint API to return it. It would need to be scripted of course.

---

<div class="post-metadata">

**Author:** ![Sean](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/sean/32/2224_2.png) [@Sean](https://discuss.rapid7.com/u/Sean)\
**Post date:** [May 27, 2025, 5:14pm UTC](https://discuss.rapid7.com/t/how-to-run-workflow-from-csv-file-as-trigger-parameter/34422/10 "2025-05-27T17:14:24Z")

</div>

The PnP module could be used, but I have not figured out how to get modules other than the default Powershell modules to load for workflows. I have not found any information on Discuss or help in the documentation. I figure it can be done, just not sure how.
