Context
When building automations using files, file names could become an issue if it contains reserved characters such as "/" or spaces, or special chars such as "é" or "+",...
Slugify
The standard python environnement provides a function that will transform a dirty name into a safe name.
First of all, go to the start task of your wokrlow and select the Helpers tab
In the imports files type this line below
from django.utils.text import slugify
You can now use slugify in your workflow.
file_base, file_ext = os.path.splitext(file_name) file_base = slugify(file_base) file_name = file_base + file_ext
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article