$npx -y skills add microsoft/power-platform-skills --skill add-connectorAdds any Power Platform connector to a Power Apps code app. Generic fallback for connectors not covered by a specific skill.
| 1 | **📋 Shared Instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** - Cross-cutting concerns. |
| 2 | |
| 3 | # Add Connector (Generic) |
| 4 | |
| 5 | Fallback skill for any connector not covered by a specific `/add-*` skill. For common connectors, prefer the dedicated skills: |
| 6 | |
| 7 | - `/add-dataverse` -- Dataverse tables |
| 8 | - `/add-azuredevops` -- Azure DevOps |
| 9 | - `/add-teams` -- Microsoft Teams |
| 10 | - `/add-excel` -- Excel Online (Business) |
| 11 | - `/add-onedrive` -- OneDrive for Business |
| 12 | - `/add-sharepoint` -- SharePoint Online |
| 13 | - `/add-office365` -- Office 365 Outlook (calendar, email, contacts) |
| 14 | |
| 15 | ## Workflow |
| 16 | |
| 17 | 1. Check Memory Bank → 2. Identify Connector → 3. Add Connector → 4. Inspect & Configure → 5. Build → 6. Update Memory Bank |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | ### Step 1: Check Memory Bank |
| 22 | |
| 23 | Check for `memory-bank.md` per [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md). |
| 24 | |
| 25 | ### Step 2: Identify Connector |
| 26 | |
| 27 | **If `$ARGUMENTS` is provided or the caller already specified the connector**, use it directly and skip the question below. |
| 28 | |
| 29 | Otherwise, ask the user which connector they want to add. Browse available connectors: [Connector Reference](https://learn.microsoft.com/en-us/connectors/connector-reference/) |
| 30 | |
| 31 | **Before proceeding, check if the connector has a dedicated skill. If it does, delegate immediately and STOP:** |
| 32 | |
| 33 | | Connector API name | Delegate to | |
| 34 | | ----------------------- | ------------------ | |
| 35 | | `sharepointonline` | `/add-sharepoint` | |
| 36 | | `teams` | `/add-teams` | |
| 37 | | `excelonlinebusiness` | `/add-excel` | |
| 38 | | `onedriveforbusiness` | `/add-onedrive` | |
| 39 | | `azuredevops` | `/add-azuredevops` | |
| 40 | | `office365` | `/add-office365` | |
| 41 | | `commondataservice` | `/add-dataverse` | |
| 42 | |
| 43 | Invoke the appropriate skill with the same `$ARGUMENTS` and **do not continue this skill's workflow**. |
| 44 | |
| 45 | Common connector API names: |
| 46 | |
| 47 | - `sharepointonline`, `teams`, `excelonlinebusiness`, `onedriveforbusiness` |
| 48 | - `azuredevops`, `azureblob`, `azurequeues` |
| 49 | - `office365`, `office365users`, `office365groups` |
| 50 | - `sql`, `commondataservice` |
| 51 | |
| 52 | ### Step 3: Add Connector |
| 53 | |
| 54 | **First, find the connection ID** (see [connector-reference.md](${PLUGIN_ROOT}/shared/connector-reference.md)): |
| 55 | |
| 56 | Run the `/list-connections` skill. Find the connector in the output. If none exists, direct the user to create one using the environment-specific Connections URL — construct it from the active environment ID in context (from `power.config.json` or a prior step): `https://make.powerapps.com/environments/<environment-id>/connections` → **+ New connection** → search for the connector → Create. |
| 57 | |
| 58 | ```bash |
| 59 | # Non-tabular connectors (Teams, Azure DevOps, etc.) |
| 60 | npx power-apps add-data-source -a <connector-api-name> -c <connection-id> |
| 61 | |
| 62 | # Tabular connectors (SharePoint, Excel, SQL, etc.) -- also need dataset and table |
| 63 | npx power-apps add-data-source -a <connector-api-name> -c <connection-id> -d '<dataset>' -t '<table>' |
| 64 | ``` |
| 65 | |
| 66 | **Parameter reference:** |
| 67 | |
| 68 | - `-a` (apiId) -- connector name (e.g., `sharepointonline`, `teams`) |
| 69 | - `-c` (connectionId) -- **required** for all non-Dataverse connectors. Get from `/list-connections`. |
| 70 | - `-d` (dataset) -- required for tabular datasources (e.g., SharePoint site URL, SQL database). Not needed for Dataverse. |
| 71 | - `-t` (table) -- table/list name for tabular datasources (e.g., SharePoint list, Dataverse table logical name) |
| 72 | |
| 73 | ### Step 4: Inspect & Configure |
| 74 | |
| 75 | After adding, inspect the generated files. **Generated service files can be very large** -- use `Grep` to find specific methods instead of reading the entire file: |
| 76 | |
| 77 | ``` |
| 78 | Grep pattern="async \w+" path="src/generated/services/<Connector>Service.ts" |
| 79 | ``` |
| 80 | |
| 81 | Files to check: |
| 82 | |
| 83 | - `src/generated/services/<Connector>Service.ts` -- available operations and their parameters |
| 84 | - `src/generated/models/<Connector>Model.ts` -- TypeScript interfaces (if generated) |
| 85 | - `.power/schemas/<connector>/` -- connector schema and configuration |
| 86 | |
| 87 | For each method the user needs: |
| 88 | |
| 89 | 1. Grep for the method name to find its signature |
| 90 | 2. Read just that method's section (use `offset` and `limit` parameters on Read) |
| 91 | 3. Identify required vs optional parameters and response type |
| 92 | |
| 93 | Help the user write code using the generated service methods. |
| 94 | |
| 95 | ### Step 5: Build |
| 96 | |
| 97 | ```bash |
| 98 | npm run build |
| 99 | ``` |
| 100 | |
| 101 | Fix TypeScript errors before proceeding. Do NOT deploy yet. |
| 102 | |
| 103 | ### Step 6: Update Memory Bank |
| 104 | |
| 105 | Update `memory-bank.md` with: connector added, configured operations, build status. |