Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Make email attachments' names simpler (#208)
Kerem Yilmazd059619e5e33
diff --git a/skyvern/forge/sdk/workflow/models/block.py b/skyvern/forge/sdk/workflow/models/block.pyindex f25220e30..91886fac5 100644--- a/skyvern/forge/sdk/workflow/models/block.py+++ b/skyvern/forge/sdk/workflow/models/block.py@@ -9,7 +9,6 @@ from enum import StrEnumfrom pathlib import Pathfrom tempfile import NamedTemporaryFilefrom typing import Annotated, Any, Literal, Union-from urllib.parse import urlparseimport filetypeimport structlog@@ -822,10 +821,11 @@ class SendEmailBlock(Block):extension = Nonemaintype, subtype = ctype.split("/", 1)- attachment_filename = urlparse(filename).path.replace("/", "_")+ attachment_path = Path(path)+ attachment_filename = attachment_path.name# Check if the filename has an extension- if not Path(attachment_filename).suffix:+ if not attachment_path.suffix:# If no extension, guess it based on the MIME typeif extension:attachment_filename += f".{extension}"