Skip to content

Commit 23a0d84

Browse files
Tony363claude
andcommitted
fix: use connectedAccountId for Composio Slack API
Composio v2 execute endpoint requires connectedAccountId (not entityId) to identify the Slack connection. Falls back to entityId: default when SLACK_CONNECTED_ACCOUNT_ID is not set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5f39a5f commit 23a0d84

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/scripts/notify_slack.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,18 @@ def send_slack_notification(message: str) -> bool:
197197
"Content-Type": "application/json",
198198
}
199199

200+
connected_account_id = os.environ.get("SLACK_CONNECTED_ACCOUNT_ID")
200201
payload = {
201-
"entityId": os.environ.get(
202-
"SLACK_CONNECTED_ACCOUNT_ID",
203-
"default",
204-
),
205202
"appName": "slack",
206203
"input": {
207204
"channel": SLACK_CHANNEL_ID,
208205
"markdown_text": message,
209206
},
210207
}
208+
if connected_account_id:
209+
payload["connectedAccountId"] = connected_account_id
210+
else:
211+
payload["entityId"] = "default"
211212

212213
response = requests.post(api_url, headers=headers, json=payload, timeout=30)
213214
response.raise_for_status()

0 commit comments

Comments
 (0)