Skip to content

feat: Integration API — proxy endpoint for external workflow triggers#284

Closed
morgan-wowk wants to merge 0 commit into
masterfrom
integration-slack-workflow-trigger
Closed

feat: Integration API — proxy endpoint for external workflow triggers#284
morgan-wowk wants to merge 0 commit into
masterfrom
integration-slack-workflow-trigger

Conversation

@morgan-wowk

@morgan-wowk morgan-wowk commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds POST /api/integration/slack_workflow_trigger — a server-side proxy that accepts a logical workflow identifier + arbitrary payload, resolves the target webhook URL from server configuration, and forwards the payload.
  • Keeps sensitive webhook URLs out of frontend config entirely; only a logical workflowId is needed in the client.
  • Route is only registered when at least one workflow URL is configured (TANGLE_SLACK_WORKFLOW_URLS env var, a JSON object mapping workflow IDs to URLs). The endpoint is absent (404) in unconfigured OSS deployments.
  • api_server_main.py reads TANGLE_SLACK_WORKFLOW_URLS from the environment (JSON string), parses it, and passes the mapping to setup_routes().

New files

  • cloud_pipelines_backend/integration_api.pyIntegrationApiService + register_routes()

Modified files

  • cloud_pipelines_backend/api_router.py — threads slack_workflow_urls through setup_routes()_setup_routes_internal(), calls integration_api.register_routes() before app.include_router()
  • api_server_main.py — reads + parses TANGLE_SLACK_WORKFLOW_URLS env var, passes to setup_routes()

Test plan

  • Start server with TANGLE_SLACK_WORKFLOW_URLS={} — confirm /api/integration/slack_workflow_trigger returns 404
  • Start server with TANGLE_SLACK_WORKFLOW_URLS={"test_wf": "https://example.com/hook"} — confirm POST with {"workflow_internal_id": "test_wf", "webhook_payload": {}} routes to the URL
  • Confirm unknown workflow_internal_id returns 404 with descriptive message
  • Confirm unreachable URL returns 502

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@morgan-wowk morgan-wowk changed the title fix: Launchers - Kubernetes - Fix getting logs when logs arte not valid UTF-8 (#277) feat: Integration API — proxy endpoint for external workflow triggers Jun 23, 2026
Comment thread api_server_main.py Outdated
if _slack_workflow_urls_raw:
try:
_slack_workflow_urls = json.loads(_slack_workflow_urls_raw)
except json.JSONDecodeError:
@morgan-wowk

Copy link
Copy Markdown
Collaborator Author

Moving this implementation to Shopify/oasis-backend instead — the Slack proxy endpoint will be Shopify-internal only for now.

@morgan-wowk morgan-wowk force-pushed the integration-slack-workflow-trigger branch from 376c071 to a57e9e7 Compare June 23, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant