Merry Christmas to all
I have a local Python script that processes up to 1,000 leads from an Excel/CSV file—adding columns like gender (based on first name - using Gemini AI calls for that), company size classification (which is just a simple if/else), etc. It uses libraries like Pandas and also AI calls (e.g. for text completion). Now I’d like to replicate this logic in n8n, but I’m unsure if it’s feasible or the best approach. Especially, importing Python modules (dependencies) and handling inputs/outputs in n8n seems tricky.
Does anyone have experience or suggestions on how to run this kind of Python-based workflow directly in n8n without hitting dependency or I/O issues?
Hey @Kiremit , importing Python modules replicating the same behaviour is not feasable in my opinion. You would rather use n8n own tools to achieve the same (depending on what it is that you need).
It’s things like First Name + Last Name then the code creates a new column named “form of address” which would then be the input of an AI which decides if its Mr. or Mrs. and then enters that value in the new column. A bunch of stuff like that. All not really complex but taking columns from the sheet and using that as input to generate a new column of the lead table. Thats mostly it.
I see no reason why you cannot do it solely in n8n. I would imaging you can engage Basic LLM Chain node as your AI assitant to determine the “form of address”.