feat(webhooks): update EspoCRM webhook configurations to use VMH naming and endpoints
This commit is contained in:
@@ -10,13 +10,13 @@ from motia import FlowContext, http, ApiRequest, ApiResponse
|
||||
|
||||
|
||||
config = {
|
||||
"name": "EspoCRM Document Update Webhook",
|
||||
"name": "VMH Webhook Document Update",
|
||||
"description": "Empfängt Update-Webhooks von EspoCRM für Document Entities",
|
||||
"flows": ["espocrm-documents"],
|
||||
"flows": ["vmh-documents"],
|
||||
"triggers": [
|
||||
http("POST", "/api/espocrm/document/update")
|
||||
http("POST", "/vmh/webhook/document/update")
|
||||
],
|
||||
"enqueues": ["espocrm.document.update"],
|
||||
"enqueues": ["vmh.document.update"],
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ async def handler(request: ApiRequest, ctx: FlowContext[Any]) -> ApiResponse:
|
||||
# Emit events für Queue-Processing
|
||||
for entity_id in entity_ids:
|
||||
await ctx.enqueue({
|
||||
'topic': 'espocrm.document.update',
|
||||
'topic': 'vmh.document.update',
|
||||
'data': {
|
||||
'entity_id': entity_id,
|
||||
'action': 'update',
|
||||
@@ -160,7 +160,7 @@ async def handler(request: ApiRequest, ctx: FlowContext[Any]) -> ApiResponse:
|
||||
'timestamp': datetime.datetime.now().isoformat()
|
||||
}
|
||||
})
|
||||
ctx.logger.info(f"✅ Event emittiert: espocrm.document.update für ID {entity_id}")
|
||||
ctx.logger.info(f"✅ Event emittiert: vmh.document.update für ID {entity_id}")
|
||||
|
||||
ctx.logger.info("\n" + "=" * 80)
|
||||
ctx.logger.info(f"✅ WEBHOOK VERARBEITUNG ABGESCHLOSSEN")
|
||||
|
||||
Reference in New Issue
Block a user