Skip to main content
Use the Kadoa CLI in GitHub Actions and other CI systems to automate workflow runs and data exports.

GitHub Actions

Set KADOA_API_KEY as a repository secret, then call the CLI in your workflow:
name: Extract Data
on:
  schedule:
    - cron: "0 8 * * 1" # Every Monday at 8am
  workflow_dispatch:

env:
  KADOA_API_KEY: ${{ secrets.KADOA_API_KEY }}

jobs:
  extract:
    runs-on: ubuntu-latest
    steps:
      - run: npx -y @kadoa/cli run ${{ vars.WORKFLOW_ID }} --json
      - run: npx -y @kadoa/cli data ${{ vars.WORKFLOW_ID }} --format csv > output.csv
      - uses: actions/upload-artifact@v4
        with:
          name: extracted-data
          path: output.csv

Other CI Systems

Set KADOA_API_KEY as an environment variable, then run the CLI:
export KADOA_API_KEY=tk-your_api_key

npx -y @kadoa/cli run $WORKFLOW_ID --json
npx -y @kadoa/cli data $WORKFLOW_ID --format csv > output.csv
Use --json to get machine-readable output. The CLI automatically outputs JSON when piped or redirected.