Hello,
I am using “new emails” as a trigger when receiving emails with a .csv attachment. I would like to know how to use a Python step to access and work with that .csv. (I see there is an outdated way to do this with node.js V1, but I do not know this language and would like to work with Python)
So far I have,
import pandas
import requests
def handler(pd: “pipedream”):
data = pandas.read_csv(pd.steps[“trigger”][“event”][“attachments”])
print(data)
But there does not seem to be a .csv file anywhere to give a correct file path to…
In pd.steps[“trigger”][“event”][“attachments”][0][“content”]) I am able to find the content of the .csv file. But it is in a format that has lost a lot of the important formatting of the csv.
In worst case, I’m hoping someone can show me how to use node.js to read this .csv into the /tmp folder in one step that I can then pull from using Python, because I do not understand how to pass data through multiple steps of node.js as seen in the outdated V1 version of “Upload email attachments to S3”.
Thanks!
Donny