fixed outlook

This commit is contained in:
ValueOn AG 2025-10-05 03:03:48 +02:00
parent 7ba687ad65
commit 1a8cecc50a
43 changed files with 491 additions and 9 deletions

View file

@ -1290,9 +1290,9 @@ Make sure the email is:
# Call AI service to generate email content
try:
ai_request = AiCallRequest(
ai_response = await self.services.ai.callAi(
prompt=ai_prompt,
chatDocuments=chatDocuments,
documents=chatDocuments,
options=AiCallOptions(
operationType="email_composition",
priority="normal",
@ -1306,14 +1306,9 @@ Make sure the email is:
)
)
ai_response = await self.services.ai.call(ai_request)
if not ai_response.success:
return ActionResult.isFailure(error=f"AI service failed: {ai_response.error}")
# Parse AI response
try:
ai_content = ai_response.content
ai_content = ai_response
# Extract JSON from AI response
if "```json" in ai_content:
json_start = ai_content.find("```json") + 7
@ -1335,7 +1330,7 @@ Make sure the email is:
except json.JSONDecodeError as e:
logger.error(f"Failed to parse AI response as JSON: {str(e)}")
logger.error(f"AI response content: {ai_response.content}")
logger.error(f"AI response content: {ai_response}")
return ActionResult.isFailure(error="AI response was not valid JSON format")
except Exception as e:

View file

@ -39,6 +39,9 @@ ACTION_SIGNATURE:
AVAILABLE_DOCUMENTS:
{{KEY:AVAILABLE_DOCUMENTS}}
AVAILABLE_CONNECTIONS:
{{KEY:AVAILABLE_CONNECTIONS}}
USER_REQUEST:
{{KEY:USER_PROMPT}}
@ -52,6 +55,8 @@ REPLY: Return only a JSON object with the parameters according to the ACTION_SIG
RULES:
1. Use ONLY parameter names from ACTION_SIGNATURE
2. Use exact connection references from AVAILABLE_CONNECTIONS for connectionReference parameters
3. Use exact document references from AVAILABLE_DOCUMENTS for documentList parameters
4. Return ONLY JSON - no other text
5. Do NOT use markdown code blocks
6. Do NOT add explanations

View file

@ -0,0 +1,19 @@
{
"id": "msg_f37b998f-2523-4c6a-81b5-1b2f91bdbf7a",
"workflowId": "783b6cb7-838a-440e-8f8e-cf5e4f678f82",
"parentMessageId": null,
"message": "**Action 2/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary\n\nNo valid Microsoft connection found\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 5,
"publishedAt": 1759625341.6090837,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 2,
"documentsLabel": "round1_task1_action2_results",
"actionId": "action_78dcd807-5e37-4e6e-a011-98432a9ebaf6",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 2/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary
No valid Microsoft connection found

View file

@ -0,0 +1,19 @@
{
"id": "msg_13ce6a34-ee71-4152-a453-5b714470eed5",
"workflowId": "783b6cb7-838a-440e-8f8e-cf5e4f678f82",
"parentMessageId": null,
"message": "**Action 3/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary\n\nNo valid Microsoft connection found\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 6,
"publishedAt": 1759625351.761903,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 3,
"documentsLabel": "round1_task1_action3_results",
"actionId": "action_28b3fc09-ed1a-42fa-884e-fbeaa2a73a51",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 3/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary
No valid Microsoft connection found

View file

@ -0,0 +1,19 @@
{
"id": "msg_30d89cfa-57f9-4189-a752-162553feda7a",
"workflowId": "783b6cb7-838a-440e-8f8e-cf5e4f678f82",
"parentMessageId": null,
"message": "**Action 4/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary\n\nNo valid Microsoft connection found\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 7,
"publishedAt": 1759625362.0207365,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 4,
"documentsLabel": "round1_task1_action4_results",
"actionId": "action_a66f7cc5-bc11-44b1-affe-6dd0828697da",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 4/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary
No valid Microsoft connection found

View file

@ -0,0 +1,19 @@
{
"id": "msg_f29a21b8-df69-496c-bf49-87ae2c18d838",
"workflowId": "783b6cb7-838a-440e-8f8e-cf5e4f678f82",
"parentMessageId": null,
"message": "**Action 5/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary\n\nNo valid Microsoft connection found\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 8,
"publishedAt": 1759625370.9954636,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 5,
"documentsLabel": "round1_task1_action5_results",
"actionId": "action_d2369810-3891-4d8e-8088-ebd26122d8c6",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 5/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10:00 appointment to Friday, including file attachment and appointment summary
No valid Microsoft connection found

View file

@ -0,0 +1,19 @@
{
"id": "msg_6751bda4-db72-4547-b17a-e0e433a3dc14",
"workflowId": "783b6cb7-838a-440e-8f8e-cf5e4f678f82",
"parentMessageId": null,
"message": "Workflow completed.\n\nProcessed 1 user inputs and generated 8 responses.\nWorkflow status: running",
"role": "assistant",
"status": "last",
"sequenceNr": 10,
"publishedAt": 1759625372.6871872,
"roundNumber": 1,
"taskNumber": 0,
"actionNumber": 0,
"documentsLabel": "workflow_feedback",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
Workflow completed.
Processed 1 user inputs and generated 8 responses.
Workflow status: running

View file

@ -0,0 +1,19 @@
{
"id": "msg_40ae66a3-f958-410c-9169-a461e16eca1e",
"workflowId": "783b6cb7-838a-440e-8f8e-cf5e4f678f82",
"parentMessageId": null,
"message": "🎯 **Task 1/1**\n\n✅ Email task not started yet - need to compose formal email to reschedule appointment and attach file\n📊 Score 8/10",
"role": "assistant",
"status": "step",
"sequenceNr": 9,
"publishedAt": 1759625372.4761305,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 0,
"documentsLabel": "task_1_completion",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
🎯 **Task 1/1**
✅ Email task not started yet - need to compose formal email to reschedule appointment and attach file
📊 Score 8/10

View file

@ -0,0 +1,19 @@
{
"id": "msg_8390b10a-db16-4828-a229-56f6ae3fd955",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "Sende eine formelle E-Mail an peter.muster@domain.com von meinem valueon account aus, um meinen Termin von 10 Uhr auf Freitag zu scheiben. lege diese datei im mail als anhang bei und erfasse eine zusammenfasung im mail.",
"role": "user",
"status": "first",
"sequenceNr": 1,
"publishedAt": 1759625900.422609,
"roundNumber": 1,
"taskNumber": 0,
"actionNumber": 0,
"documentsLabel": "round1_task0_action0_context",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1 @@
Sende eine formelle E-Mail an peter.muster@domain.com von meinem valueon account aus, um meinen Termin von 10 Uhr auf Freitag zu scheiben. lege diese datei im mail als anhang bei und erfasse eine zusammenfasung im mail.

View file

@ -0,0 +1,19 @@
{
"id": "msg_5e373582-c98d-453f-91bb-e04fd8961c01",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "🚀 **Task 1/1**\n\n💬 I will compose and send a formal email to reschedule your appointment, ensuring all requirements are met including the attachment and summary.",
"role": "assistant",
"status": "step",
"sequenceNr": 3,
"publishedAt": 1759625905.706615,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 0,
"documentsLabel": "task_1_start",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,3 @@
🚀 **Task 1/1**
💬 I will compose and send a formal email to reschedule your appointment, ensuring all requirements are met including the attachment and summary.

View file

@ -0,0 +1,19 @@
{
"id": "msg_271d3569-f5b7-4814-8cc1-bc627b35aa69",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "**Action 1/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary\n\nFailed to generate email content: 'AiService' object has no attribute 'call'\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 4,
"publishedAt": 1759625915.3166378,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 1,
"documentsLabel": "round1_task1_action1_results",
"actionId": "action_9c110b45-8946-4393-bd44-11912f60819e",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 1/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary
Failed to generate email content: 'AiService' object has no attribute 'call'

View file

@ -0,0 +1,19 @@
{
"id": "msg_f5bebc04-c3c0-455b-b25e-2c89d9166e9e",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "**Action 2/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary\n\nFailed to generate email content: 'AiService' object has no attribute 'call'\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 5,
"publishedAt": 1759625925.1263194,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 2,
"documentsLabel": "round1_task1_action2_results",
"actionId": "action_28c9b3fe-8921-48c6-b7fd-727b1068fc90",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 2/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary
Failed to generate email content: 'AiService' object has no attribute 'call'

View file

@ -0,0 +1,19 @@
{
"id": "msg_40bdcef9-9acc-403b-b299-a256a9f6418c",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "**Action 3/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary\n\nFailed to generate email content: 'AiService' object has no attribute 'call'\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 6,
"publishedAt": 1759625935.6303482,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 3,
"documentsLabel": "round1_task1_action3_results",
"actionId": "action_7c1b76d2-6ccd-4dd8-88ea-cc88a744bcc4",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 3/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary
Failed to generate email content: 'AiService' object has no attribute 'call'

View file

@ -0,0 +1,19 @@
{
"id": "msg_a0eb97bf-f7f0-4576-bb61-44b82d1618c2",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "**Action 4/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary\n\nFailed to generate email content: 'AiService' object has no attribute 'call'\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 7,
"publishedAt": 1759625944.8980558,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 4,
"documentsLabel": "round1_task1_action4_results",
"actionId": "action_ce99116e-6079-41fe-bc13-7224f4fd6ab6",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 4/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary
Failed to generate email content: 'AiService' object has no attribute 'call'

View file

@ -0,0 +1,19 @@
{
"id": "msg_f7cc8500-b5e1-4609-b396-1f006e7150ad",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "**Action 5/1 (outlook.composeAndSendEmailWithContext)**\n\n❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary\n\nFailed to generate email content: 'AiService' object has no attribute 'call'\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 8,
"publishedAt": 1759625955.5136523,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 5,
"documentsLabel": "round1_task1_action5_results",
"actionId": "action_9974342c-7650-4ca7-8536-f2ce4c94f76d",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,6 @@
**Action 5/1 (outlook.composeAndSendEmailWithContext)**
❌ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule appointment to Friday 10am, including file attachment and appointment summary
Failed to generate email content: 'AiService' object has no attribute 'call'

View file

@ -0,0 +1,19 @@
{
"id": "msg_cb853311-706d-41d3-ab7b-b8533984baad",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "Workflow completed.\n\nProcessed 1 user inputs and generated 8 responses.\nWorkflow status: running",
"role": "assistant",
"status": "last",
"sequenceNr": 10,
"publishedAt": 1759625957.2240045,
"roundNumber": 1,
"taskNumber": 0,
"actionNumber": 0,
"documentsLabel": "workflow_feedback",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
Workflow completed.
Processed 1 user inputs and generated 8 responses.
Workflow status: running

View file

@ -0,0 +1,19 @@
{
"id": "msg_c1cd986c-8e7b-466a-8e3c-3df3078d02aa",
"workflowId": "5ed54bda-b8a8-44d2-b66b-95c75f1dd0f3",
"parentMessageId": null,
"message": "🎯 **Task 1/1**\n\n✅ Email task not started yet - need to compose formal email to reschedule appointment and attach file\n📊 Score 8/10",
"role": "assistant",
"status": "step",
"sequenceNr": 9,
"publishedAt": 1759625956.9970348,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 0,
"documentsLabel": "task_1_completion",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
🎯 **Task 1/1**
✅ Email task not started yet - need to compose formal email to reschedule appointment and attach file
📊 Score 8/10

View file

@ -0,0 +1,19 @@
{
"id": "msg_1a4cb71d-7f38-4fef-b0dd-4af194767e37",
"workflowId": "8630c862-d9f3-4332-9d6c-6664a39edd73",
"parentMessageId": null,
"message": "Sende eine formelle E-Mail an peter.muster@domain.com von meinem valueon account aus, um meinen Termin von 10 Uhr auf Freitag zu scheiben. lege diese datei im mail als anhang bei und erfasse eine zusammenfasung im mail.",
"role": "user",
"status": "first",
"sequenceNr": 1,
"publishedAt": 1759626153.5349214,
"roundNumber": 1,
"taskNumber": 0,
"actionNumber": 0,
"documentsLabel": "round1_task0_action0_context",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1 @@
Sende eine formelle E-Mail an peter.muster@domain.com von meinem valueon account aus, um meinen Termin von 10 Uhr auf Freitag zu scheiben. lege diese datei im mail als anhang bei und erfasse eine zusammenfasung im mail.

View file

@ -0,0 +1,19 @@
{
"id": "msg_ee2438ed-dccd-4c15-891f-f15c956249ee",
"workflowId": "8630c862-d9f3-4332-9d6c-6664a39edd73",
"parentMessageId": null,
"message": "🚀 **Task 1/1**\n\n💬 I will compose and send a formal email to reschedule your appointment, ensuring all requirements are met including the attachment and summary.",
"role": "assistant",
"status": "step",
"sequenceNr": 3,
"publishedAt": 1759626158.5725098,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 0,
"documentsLabel": "task_1_start",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,3 @@
🚀 **Task 1/1**
💬 I will compose and send a formal email to reschedule your appointment, ensuring all requirements are met including the attachment and summary.

View file

@ -0,0 +1,19 @@
{
"id": "msg_91b786b8-a1a2-4279-9b62-071cb89c7567",
"workflowId": "8630c862-d9f3-4332-9d6c-6664a39edd73",
"parentMessageId": null,
"message": "**Action 1/1 (outlook.composeAndSendEmailWithContext)**\n\n✅ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10am appointment to Friday, including file attachment and appointment summary\n\n",
"role": "assistant",
"status": "step",
"sequenceNr": 4,
"publishedAt": 1759626169.0591342,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 1,
"documentsLabel": "round1_task1_action1_results",
"actionId": "action_9709d805-e563-47fd-a7f3-47a24fd705cd",
"actionMethod": "outlook",
"actionName": "composeAndSendEmailWithContext",
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
**Action 1/1 (outlook.composeAndSendEmailWithContext)**
✅ Compose and send formal email from valueon account to peter.muster@domain.com to reschedule 10am appointment to Friday, including file attachment and appointment summary

View file

@ -0,0 +1,12 @@
{
"id": "3959d714-0479-432e-a9b9-7c6c515f99ae",
"messageId": "msg_91b786b8-a1a2-4279-9b62-071cb89c7567",
"fileId": "a3e25a01-c223-4091-ab17-c0aa31ac5565",
"fileName": "ai_generated_email_draft_20251005-010248.json",
"fileSize": 865,
"mimeType": "application/json",
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 1,
"actionId": "action_9709d805-e563-47fd-a7f3-47a24fd705cd"
}

View file

@ -0,0 +1,19 @@
{
"id": "msg_d79127f3-46b3-4816-aea9-52219311889e",
"workflowId": "8630c862-d9f3-4332-9d6c-6664a39edd73",
"parentMessageId": null,
"message": "Workflow completed.\n\nProcessed 1 user inputs and generated 4 responses.\nWorkflow status: running",
"role": "assistant",
"status": "last",
"sequenceNr": 6,
"publishedAt": 1759626170.6508567,
"roundNumber": 1,
"taskNumber": 0,
"actionNumber": 0,
"documentsLabel": "workflow_feedback",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
Workflow completed.
Processed 1 user inputs and generated 4 responses.
Workflow status: running

View file

@ -0,0 +1,19 @@
{
"id": "msg_b475769e-625b-49ef-a192-949d82d5fff5",
"workflowId": "8630c862-d9f3-4332-9d6c-6664a39edd73",
"parentMessageId": null,
"message": "🎯 **Task 1/1**\n\n✅ Email draft successfully created with attachment and summary for rescheduling appointment to Friday 10am\n📊 Score 8/10",
"role": "assistant",
"status": "step",
"sequenceNr": 5,
"publishedAt": 1759626170.4503472,
"roundNumber": 1,
"taskNumber": 1,
"actionNumber": 0,
"documentsLabel": "task_1_completion",
"actionId": null,
"actionMethod": null,
"actionName": null,
"success": null,
"documents": []
}

View file

@ -0,0 +1,4 @@
🎯 **Task 1/1**
✅ Email draft successfully created with attachment and summary for rescheduling appointment to Friday 10am
📊 Score 8/10