Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
04d8ad2
changing approach to match n8n architecture
rishikunnath2747 Sep 9, 2026
a770ec3
updated docs
rishikunnath2747 Sep 9, 2026
9479dac
fix uts
rishikunnath2747 Sep 9, 2026
791d45f
Removing legacy method call_hook
rishikunnath2747 Sep 9, 2026
d3ad0cf
ruff check fix
rishikunnath2747 Sep 9, 2026
bc0b410
Revert "Removing legacy method call_hook"
rishikunnath2747 Sep 10, 2026
9152a0a
fixing dependencies + update sdk version
rishikunnath2747 Sep 11, 2026
dead7b6
Merge branch 'main' into n8n_change
rishikunnath2747 Sep 11, 2026
90ba3c3
Update version
rishikunnath2747 Sep 11, 2026
b91cded
adding ty ignore
rishikunnath2747 Sep 11, 2026
38ea3d7
adding gsid to summary span
rishikunnath2747 Sep 15, 2026
23734d9
Merge remote-tracking branch 'upstream/main' into n8n_change
rishikunnath2747 Sep 18, 2026
9c37e55
fix message extraction
rishikunnath2747 Sep 18, 2026
1e4ae80
temp:add span info
rishikunnath2747 Sep 18, 2026
2bc2f41
Merge remote-tracking branch 'upstream/main' into n8n_change
rishikunnath2747 Oct 6, 2026
058ed75
removing duplicate definition in model
rishikunnath2747 Oct 6, 2026
36147e1
fixing n8n input/output
rishikunnath2747 Oct 15, 2026
f413bb7
update version
rishikunnath2747 Oct 15, 2026
d45276f
Merge branch 'main' into n8n_change
rishikunnath2747 Oct 15, 2026
6c2e6de
fix uts
rishikunnath2747 Oct 15, 2026
647096f
Merge branch 'n8n_change' of https://github.com/rishikunnath2747/clou…
rishikunnath2747 Oct 15, 2026
7036b00
discarding pyproject and uv changes
rishikunnath2747 Oct 15, 2026
f5b6cd5
downgrade a2a-sdk version
rishikunnath2747 Oct 15, 2026
8706ddc
fix check
rishikunnath2747 Oct 15, 2026
d1b329e
Merge remote-tracking branch 'upstream/main' into n8n_change
rishikunnath2747 Oct 15, 2026
bb16696
removing implementation for old call_hook method
rishikunnath2747 Oct 15, 2026
3a9de35
fix: replace dead call_hook() body with NotImplementedError
rishikunnath2747 Oct 15, 2026
17e7da8
Revert "fix: replace dead call_hook() body with NotImplementedError"
rishikunnath2747 Oct 15, 2026
4d875ad
Revert "removing implementation for old call_hook method"
rishikunnath2747 Oct 15, 2026
66eb1d1
marking call_hook as deprecated
rishikunnath2747 Oct 15, 2026
860c1ee
Merge branch 'main' into n8n_change
rishikunnath2747 Oct 15, 2026
70122b4
removing unused function
rishikunnath2747 Oct 15, 2026
5911d6c
Merge branch 'n8n_change' of https://github.com/rishikunnath2747/clou…
rishikunnath2747 Oct 15, 2026
fd686cc
Update user-guide.md
rishikunnath2747 Oct 15, 2026
f01f3dc
Merge branch 'main' into n8n_change
rishikunnath2747 Oct 15, 2026
bed681c
adding workflowId to avoid breaking change
rishikunnath2747 Oct 15, 2026
c191aa7
fix ty errors
rishikunnath2747 Oct 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies = [
]

[project.optional-dependencies]
extensibility = ["a2a-sdk>=0.2.0,<2"]
extensibility = ["a2a-sdk>=0.2.0,<1.0"]
starlette = ["starlette>=0.40.0,<1"]
fastapi = ["fastapi>=0.100.0,<1"]
aiohttp = ["aiohttp>=3.9.0,<4"]
Expand Down Expand Up @@ -76,7 +76,7 @@ dev = [
"sqlalchemy>=2.0.0",
"django>=4.0",
"flask>=3.0",
"a2a-sdk>=0.2.0",
"a2a-sdk>=0.2.0,<1.0",
"langchain-core>=1.2.7",
"langgraph>=0.2.0",
"langchain-community>=0.3.0",
Expand Down
34 changes: 28 additions & 6 deletions src/sap_cloud_sdk/extensibility/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,21 @@ class N8nWorkflowConfig:
"""n8n workflow configuration embedded in a hook.

Attributes:
workflow_id: n8n workflow ID.
ord_id: ORD ID of the API resource for this workflow.
card_ord_id: MCP translation card ORD ID (per ADR-021).
tool_name: MCP tool name (apiName segment of ordId, per ADR-021).
global_tenant_id: Global tenant ID of the n8n workflow tenant (per ADR-022).
method: HTTP method for the n8n webhook call.
workflow_id: n8n workflow ID. Retained for backward compatibility; not
populated by the current backend (defaults to "").
"""

workflow_id: str
ord_id: str
card_ord_id: str
tool_name: str
global_tenant_id: str
method: HTTPMethod
workflow_id: str = ""

@classmethod
def from_dict(cls, obj: Dict[str, Any]) -> N8nWorkflowConfig:
Expand All @@ -250,7 +259,10 @@ def from_dict(cls, obj: Dict[str, Any]) -> N8nWorkflowConfig:
Expected JSON shape::

{
"workflowId": "unique_n8n_workflow_id",
"ordId": "sap.n8nwfrt:apiResource:invoice-po-solution_my-workflow.postInvoice:v1",
"cardOrdId": "sap.n8nwfrt:apiResource:invoice-po-solution_my-workflow.postInvoice_mcp:v1",
"toolName": "postInvoice",
"globalTenantId": "tenant-abc",
"method": "POST"
}

Expand All @@ -262,8 +274,12 @@ def from_dict(cls, obj: Dict[str, Any]) -> N8nWorkflowConfig:
"""
method = _parse_http_method(obj.get("method", "POST")) or HTTPMethod.POST
return cls(
workflow_id=obj.get("workflowId", ""),
ord_id=obj.get("ordId", ""),
card_ord_id=obj.get("cardOrdId", ""),
tool_name=obj.get("toolName", ""),
global_tenant_id=obj.get("globalTenantId", ""),
method=method,
workflow_id=obj.get("workflowId", ""),
)


Expand Down Expand Up @@ -338,7 +354,10 @@ def from_dict(cls, obj: Dict[str, Any]) -> Hook:
"order": 1,
"canShortCircuit": true,
"n8nWorkflowConfig": {
"workflowId": "unique_n8n_workflow_id",
"ordId": "sap.n8nwfrt:apiResource:invoice-po-solution_my-workflow.postInvoice:v1",
"cardOrdId": "sap.n8nwfrt:apiResource:invoice-po-solution_my-workflow.postInvoice_mcp:v1",
"toolName": "postInvoice",
"globalTenantId": "tenant-abc",
"method": "POST"
}
}
Expand Down Expand Up @@ -698,7 +717,10 @@ def from_dict(cls, obj: Dict[str, Any]) -> ExtensionCapabilityImplementation:
"order": 1,
"canShortCircuit": true,
"n8nWorkflowConfig": {
"workflowId": "unique_n8n_workflow_id",
"ordId": "sap.n8nwfrt:apiResource:invoice-po-solution_my-workflow.postInvoice:v1",
"cardOrdId": "sap.n8nwfrt:apiResource:invoice-po-solution_my-workflow.postInvoice_mcp:v1",
"toolName": "postInvoice",
"globalTenantId": "tenant-abc",
"method": "POST"
}
}
Expand Down
17 changes: 12 additions & 5 deletions src/sap_cloud_sdk/extensibility/_ums_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
additions { type mcpConfig { globalTenantId ordId toolNames } }
}
hooks { id hookId type name onFailure timeout deploymentType canShortCircuit
n8nWorkflowConfig { workflowId method }
n8nWorkflowConfig { ordId cardOrdId toolName globalTenantId method }
}
}
}
Expand Down Expand Up @@ -280,10 +280,11 @@ def _build_hook(raw: Dict[str, Any]) -> Optional[Hook]:
return None

n8n_config = raw.get("n8nWorkflowConfig") or {}
workflow_id = n8n_config.get("workflowId", "")
if not workflow_id:
tool_name = n8n_config.get("toolName", "")
card_ord_id = n8n_config.get("cardOrdId", "")
if not tool_name or not card_ord_id:
logger.warning(
"Skipping hook with missing workflowId (hookId=%s)",
"Skipping hook with missing toolName or cardOrdId (hookId=%s)",
raw.get("hookId"),
)
return None
Expand All @@ -295,7 +296,13 @@ def _build_hook(raw: Dict[str, Any]) -> Optional[Hook]:
return Hook(
id=raw.get("id", ""),
hook_id=raw.get("hookId", ""),
n8n_workflow_config=N8nWorkflowConfig(workflow_id=workflow_id, method=method),
n8n_workflow_config=N8nWorkflowConfig(
ord_id=n8n_config.get("ordId", ""),
card_ord_id=n8n_config.get("cardOrdId", ""),
tool_name=tool_name,
global_tenant_id=n8n_config.get("globalTenantId", ""),
method=method,
),
name=raw.get("name", ""),
type=hook_type,
deployment_type=deployment_type,
Expand Down
Loading
Loading