New PR: Environment-based Webhook URLs, ExternalId Support, and UI Enhancements (#9916)

Hey Activepieces community :wave:

I’ve opened a new Pull Request that enhances webhook management by introducing environment-based URLs and externalId support, along with several related UI improvements.
This update aims to make webhook URLs stable, environment-aware, and easier to manage across multiple deployments (DEV, QA, PROD).

:link: PR Link: feat(webhooks): environment-based URLs, externalId support, UI updates by Nagarajanactivepieces · Pull Request #9916 · activepieces/activepieces)


:brain: What This PR Does

  • Adds stable webhook URLs using environment names and externalId.
  • Keeps legacy /flowId routes working for backward compatibility.
  • Exposes ENVIRONMENT_NAME as a flag and system prop.
  • Adds UI support to view/update a flow’s Webhook ID.
  • Improves Git Sync and Worker URL generation for environment-specific setups.

:gear: How It Works

  • New route structure:
    /v1/webhooks/:environment/:identifier[/sync|/draft|/test]
    → where identifier resolves to externalId first, then falls back to flowId.
  • Frontend uses ENVIRONMENT_NAME to render URLs dynamically.
  • Users can now update the webhook externalId directly from the UI.

:bulb: Why It’s Important

  • Simplifies webhook management across multiple environments.
  • Enables consistent URLs for CI/CD and Git sync setups.
  • Reduces risk of broken integrations during import/export or deployment.

:test_tube: How You Can Help

  • Review the PR for architecture and code style consistency.
  • Test webhook creation/update behavior in different environments.
  • Share any feedback on naming, route design, or UI flow.

:paperclip: Notes

  • Legacy routes remain supported (/v1/webhooks/:flowId).
  • Requires AP_ENVIRONMENT_NAME to be set (defaults to default).
  • flow.externalId is now nullable with new DB indices.

Thanks in advance to everyone reviewing! :pray:
Your feedback will help ensure this feature is stable and ready for upcoming releases.

Nagarajan