Converts OpenAPI 3.1 specifications to Swagger 2.0 format compatible with Microsoft Power Automate custom connectors.
Note: This tool is pre-configured to convert the Fulcrum API by default, but can be used for any OpenAPI 3.1 specification by providing your own spec file and skipping the download step. See Convert Your Own API for details.
- Python 3.x - Used in the conversion process for YAML processing and transformations
- paconn (Power Platform Connectors CLI) - Used to validate and upload the connector to Power Automate
# Install paconn via pip
pip install paconn
# Verify installation
paconn --versionFor more information about paconn, see the Power Platform Connector CLI documentation.
The default pipeline downloads and converts the Fulcrum API. Simply use the GitHub Copilot prompt:
@workspace /convert
Or run the pipeline directly:
./scripts/run_pipeline.shDefault: Uses the
v2branch (repository HEAD). Override withBRANCH=branch-nameor use@workspace /convert branch BRANCH_NAME.
To convert from a different branch (e.g., testing a PR):
@workspace /convert branch spike/power-automate-testing
Or set the branch manually:
BRANCH="spike/power-automate-testing" ./scripts/run_pipeline.shFor Pull Requests:
-
Find the PR's branch name on GitHub (look for "wants to merge from branch-name")
-
Use that branch name:
@workspace /convert branch feature/new-endpoints
For detailed instructions and troubleshooting, see .github/prompts/convert.prompt.md
The pipeline automatically validates:
- ✓ File structure and sizes
- ✓ JSON/YAML syntax
- ✓ Swagger 2.0 specification compliance
- ✓ Power Automate compatibility (no unsupported features)
- ✓ Power Automate trigger extensions present
- ✓ Microsoft certification package completeness
- ✓ Zero OpenAPI Generator warnings
All generated artifacts are written to build/ by default (configurable via the WORK_DIR environment variable).
The conversion process performs these steps:
- OpenAPI 3.1 → 3.0 - Downgrades using
@apiture/openapi-down-convert - OpenAPI 3.0 → Swagger 2.0 - Converts using
api-spec-converter - Swagger Cleanup - Filters endpoints, removes unsupported features, and adds Power Automate metadata (
swagger_cleaner.py) - Trigger Augmentation - Adds Power Automate trigger extensions for webhooks (
trigger_augmenter.py) - Certification Packaging - Generates Microsoft certification artifacts (
certification_packager.py)
You can convert any OpenAPI 3.1 specification in two ways:
Option A: Download from a GitHub repository
Set environment variables to download from any GitHub repository:
REPO_OWNER="your-org" REPO_NAME="your-repo" BRANCH="main" ./scripts/run_pipeline.sh| Variable | Default | Description |
|---|---|---|
REPO_OWNER |
fulcrumapp |
GitHub repository owner |
REPO_NAME |
api |
GitHub repository name |
BRANCH |
v2 |
Git branch name |
Option B: Use a local spec file
# 1. Place your OpenAPI 3.1 specification in build/
cp /path/to/your/api.json build/api-3.1.json
# 2. Run the converter (skip download since you have the spec)
./scripts/run_pipeline.sh --skip-downloadCustomizing the Conversion:
For non-Fulcrum APIs, you may need to customize:
connector-config.yaml- Update publisher name, branding, and connector metadata
By default, the pipeline uses ./build/ for all generated files. Override with:
WORK_DIR=/custom/path ./scripts/run_pipeline.shThe easiest way to use this tool is with GitHub Copilot:
@workspace /convert
This will:
- Download the Fulcrum API from the v2 branch (default)
- Convert it to Power Automate compatible format
- Validate the output
- Report any issues
To convert from a specific branch:
@workspace /convert branch YOUR_BRANCH_NAME
-
Build the Docker image:
docker build -t openapi-powerautomate-compat . -
Run the full pipeline:
docker run -v "$(pwd)/build:/app/build" openapi-powerautomate-compatThis downloads the Fulcrum API and converts it to Power Automate compatible format. The results are written to
build/.Note: Validation is skipped when running in Docker because
paconn validaterequires interactive authentication which is not supported in containerized environments. Run./scripts/validate.shlocally after the Docker conversion completes to validate the output.To convert from a specific branch:
docker run -v "$(pwd)/build:/app/build" -e BRANCH=feature-branch openapi-powerautomate-compatTo download from a different repository:
docker run -v "$(pwd)/build:/app/build" \ -e REPO_OWNER=your-org \ -e REPO_NAME=your-repo \ -e BRANCH=main \ openapi-powerautomate-compatTo skip download (use existing spec):
docker run -v "$(pwd)/build:/app/build" openapi-powerautomate-compat --skip-download
# Run the complete pipeline
./scripts/run_pipeline.sh
# Or run individual steps
./scripts/download_fulcrum_api.sh
./scripts/convert_openapi.sh
./scripts/validate.shThe conversion pipeline produces the following files in build/:
api-3.1.json- Input OpenAPI 3.1 specificationcomponents/schemas/*.json- External schema files (if applicable)api-3.0.json- Downgraded to OpenAPI 3.0swagger-2.0.yaml- Converted to Swagger 2.0 (before cleanup)fulcrum-power-automate-connector.yaml- Cleaned Swagger 2.0 with Power Automate trigger extensions
certified-connectors/Fulcrum/- Microsoft certification package ready for Power Automate import:apiDefinition.swagger.json- Connector definition in JSON formatapiProperties.json- Connection parameters and brandingREADME.md- Connector documentation
All generated files are gitignored and can be safely deleted after import.
The tool automatically generates a complete Microsoft Power Platform certification package ready for submission to the PowerPlatformConnectors repository.
The icon used for the connector can be found in the assets directory.
Edit connector-config.yaml at the repository root to customize:
- Publisher name and support contact
- Branding (icon color)
- Authentication configuration
- Connector version (required - see below)
- README documentation sections
- Prerequisites and limitations
Example:
publisher: Fulcrum
displayName: Fulcrum
version: "1.0.0" # Required - set connector version
iconBrandColor: "#F4F4F4"
category: Field Productivity
supportEmail: support@fulcrumapp.com
connectionParameters:
api_key:
type: securestring
uiDefinition:
displayName: API Token
description: Your Fulcrum API token for authentication
prerequisites:
- Active Fulcrum subscription with API access enabled
knownLimitations:
- Rate limiting applies based on your Fulcrum planAfter editing, run ./scripts/convert_openapi.sh to regenerate the certification package.
Note: Keep prerequisites and limitations concise. Avoid mentioning specific plan types or redundant setup instructions.
The version field in connector-config.yaml is required and controls the version number displayed in Power Automate. This allows you to manage the connector version independently from the underlying API specification version.
Use cases:
- Connector iteration: Improving the connector (better descriptions, metadata fixes) with independent version tracking
- Semantic versioning: Using semantic versioning (e.g., "1.0.0") for the connector
Example:
# Required: Set the connector version
version: "1.0.0"The version appears in the info.version field of the packaged apiDefinition.swagger.json file.
You can deploy the generated connector directly to your Microsoft tenant as a custom connector using the Power Platform Connectors CLI (paconn).
- paconn installed (see Installation)
- Power Automate license with custom connector permissions
- Completed conversion (run
./scripts/run_pipeline.shfirst)
-
Login to Power Platform:
paconn login
This opens a browser for Microsoft authentication. Sign in with your Power Platform account.
-
Create the connector:
paconn create --api-def build/certified-connectors/Fulcrum/apiDefinition.swagger.json \ --api-prop build/certified-connectors/Fulcrum/apiProperties.json -
Save the settings file:
After successful creation, paconn generates a
settings.jsonfile. Keep this file in the repository root for future updates.
If you have a settings.json file from a previous deployment:
paconn update --settings settings.jsonThis updates the connector in your tenant with the latest build.
For guided assistance with paconn commands, use the paconn Copilot agent by selecting it from the Copilot mode selector:
The agent can help you:
- Login and authenticate
- Create new connectors
- Update existing connectors
- Troubleshoot deployment issues
Reference the following on how to submit a connector for certification:
- https://learn.microsoft.com/en-us/connectors/custom-connectors/submit-for-certification
- https://learn.microsoft.com/en-us/connectors/custom-connectors/certification-submission
See .github/prompts/convert.prompt.md for:
- Detailed step-by-step instructions
- Troubleshooting guide
- Configuration options
- Converting different API specifications