diff --git a/modules/interfaces/interfaceDbChatObjects.py b/modules/interfaces/interfaceDbChatObjects.py index 94cbe974..5498524d 100644 --- a/modules/interfaces/interfaceDbChatObjects.py +++ b/modules/interfaces/interfaceDbChatObjects.py @@ -1575,6 +1575,12 @@ class ChatObjects: executionLog["messages"].append(f"Workflow {workflow.id} started successfully") logger.info(f"Started workflow {workflow.id} with plan containing {len(plan.get('tasks', []))} tasks (plan embedded in userInput)") + # Set workflow name with "automated" prefix + automationLabel = automation.get("label", "Unknown Automation") + workflowName = f"automated: {automationLabel}" + workflow = self.updateWorkflow(workflow.id, {"name": workflowName}) + logger.info(f"Set workflow {workflow.id} name to: {workflowName}") + # Update automation with execution log executionLogs = automation.get("executionLogs", []) executionLogs.append(executionLog) diff --git a/modules/workflows/processing/shared/automationTemplates.json b/modules/workflows/processing/shared/automationTemplates.json deleted file mode 100644 index 783ac3d6..00000000 --- a/modules/workflows/processing/shared/automationTemplates.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "sets": [ - { - "template": - { - "overview": "Beispiel Web und Sharepoint", - "tasks": [ - { - "id": "Task01", - "title": "Main Task", - "description": "Execute automated workflow", - "objective": "Execute automated workflow", - "actionList": [ - { - "execMethod": "ai", - "execAction": "webResearch", - "execParameters": { - "prompt": "{{KEY:webResearchPrompt}}", - "list(url)": ["{{KEY:webResearchUrl}}"] - }, - "execResultLabel": "web_research_results" - }, - { - "execMethod": "sharepoint", - "execAction": "listDocuments", - "execParameters": { - "connectionReference": "{{KEY:connectionName}}", - "pathQuery": "{{KEY:sharepointFolderNameSource}}" - }, - "execResultLabel": "sharepoint_source_path" - }, - { - "execMethod": "sharepoint", - "execAction": "readDocuments", - "execParameters": { - "connectionReference": "{{KEY:connectionName}}", - "documentList": ["sharepoint_source_path"], - "pathQuery": "{{KEY:sharepointFolderNameSource}}" - }, - "execResultLabel": "sharepoint_source_documents" - }, - { - "execMethod": "ai", - "execAction": "process", - "execParameters": { - "aiPrompt": "{{KEY:PromptDeliverable}}", - "documentList": ["sharepoint_source_documents","web_research_results"] - }, - "execResultLabel": "sharepoint_report" - }, - { - "execMethod": "sharepoint", - "execAction": "uploadDocument", - "execParameters": { - "connectionReference": "{{KEY:connectionName}}", - "documentList": ["sharepoint_report"], - "pathQuery": "{{KEY:sharepointFolderNameDestination}}" - }, - "execResultLabel": "sharepoint_upload_documents" - } - ] - } - ] - }, - "parameters": - { - "connectionName": "connection:msft:p.motsch@valueon.ch", - "webResearchUrl": "https://www.valueon.ch", - "webResearchPrompt": "Wer arbeitet bei ValueOn AG in der Schweiz und was machen die?", - "PromptSharepointSource": "Fasse die Dokumente in einer Liste zusammen", - "sharepointFolderNameSource": "/site:Company Share/Freigegebene Dokumente/15. Persoenliche Ordner/Patrick Motsch/input", - "sharepointFolderNameDestination": "/site:Company Share/Freigegebene Dokumente/15. Persoenliche Ordner/Patrick Motsch/output", - "PromptDeliverable": "Erstelle mir einen Bericht der Webanalyse und der Dokumente im Sharepoint als Word Dokument" - } - }, - { - "template": - { - "overview": "Immobilienrecherche Zürich", - "tasks": [ - { - "id": "Task02", - "title": "Immobilienrecherche Zürich", - "description": "Webrecherche nach Immobilien im Kanton Zürich und Speicherung in Excel", - "objective": "Immobilienrecherche im Kanton Zürich zum Verkauf (5-20 Mio. CHF) und speichere Ergebnisse in Excel-Liste auf SharePoint", - "actionList": [ - { - "execMethod": "ai", - "execAction": "webResearch", - "execParameters": { - "prompt": "{{KEY:immobilienResearchPrompt}}", - "list(url)": ["{{KEY:immobilienResearchUrl}}"] - }, - "execResultLabel": "immobilien_research_results" - }, - { - "execMethod": "ai", - "execAction": "process", - "execParameters": { - "aiPrompt": "{{KEY:excelFormatPrompt}}", - "documentList": ["immobilien_research_results"], - "resultType": "xlsx" - }, - "execResultLabel": "immobilien_excel_list" - }, - { - "execMethod": "sharepoint", - "execAction": "uploadDocument", - "execParameters": { - "connectionReference": "{{KEY:connectionName}}", - "documentList": ["immobilien_excel_list"], - "pathQuery": "{{KEY:sharepointFolderNameDestination}}" - }, - "execResultLabel": "immobilien_upload_result" - } - ] - } - ] - }, - "parameters": - { - "connectionName": "connection:msft:p.motsch@valueon.ch", - "sharepointFolderNameDestination": "/site:Company Share/Freigegebene Dokumente/15. Persoenliche Ordner/Patrick Motsch/output", - "immobilienResearchUrl": ["https://www.homegate.ch", "https://www.immoscout24.ch", "https://www.immowelt.ch"], - "immobilienResearchPrompt": "Suche nach Immobilien zum Verkauf im Kanton Zürich, Schweiz, im Preisbereich von 5-20 Millionen CHF. Sammle Informationen zu: Ort, Preis, Beschreibung, URL zu Bildern, Verkäufer/Kontaktinformationen.", - "excelFormatPrompt": "Erstelle eine Excel-Datei mit den recherchierten Immobilien. Jede Immobilie soll eine Zeile sein mit den folgenden Spalten: Ort, Preis (in CHF), Beschreibung, URL zu Bild, Verkäufer. Verwende die Daten aus der Webrecherche." - } - } - ] -}