Power Automate and Copilot Studio
Kadmo's connector lets Power Automate, Logic Apps and Copilot Studio work with your Kadmo account: a flow or an agent dispatches jobs, creates tasks, runs playbooks on them and reads the results, and a flow starts when a job finishes, when a job needs input or when a task is done. The connector calls the Kadmo API with an API token. This page covers getting the connector, the token, each action and trigger, using it in Copilot Studio, and the limits.
Get the connector
Microsoft has not listed Kadmo's connector yet. Until it does, add it to your environment as a custom connector from its three files:
- apiDefinition.swagger.json, the definition
- apiProperties.json, the connection and its policies
- icon.png, the icon
With the Power Platform CLI, signed in to the environment:
pac connector create \
--api-definition-file apiDefinition.swagger.json \
--api-properties-file apiProperties.json \
--icon-file icon.pngYou can also import the definition in the maker portal under Custom connectors, New custom connector, Import an OpenAPI file, then set the icon and the security as the properties file does. Share the connector with the makers who use it.
A connector to a service outside Microsoft is a premium connector: makers need a plan that includes premium connectors.
The token
The connection uses an API token of your Kadmo account.
- In Kadmo, open Settings › Assistant › API tokens and create a token (see API tokens). It starts with
kadmo_api_and is shown once. - In Power Automate, create a connection to Kadmo and paste the token into API token. The connector sends it as a Bearer token.
The connection acts as the member who created the token: it sees that member's account, and its triggers are that member's webhook subscriptions. Revoking the token cuts the connection off.
Actions
| Action | What it does | Fields |
|---|---|---|
| Dispatch job | Queues a workflow in a workspace for one of your agents. A job can spend the credit of your account | Workflow, Workspace (pickers), Ticket URL, Hint, the other Inputs of the workflow; advanced: Effort, Idempotency Key |
| Create task | Files a ticket in the workspace's tracker, or an internal Kadmo task, and adds it to Tasks as pending | Workspace, Title, Description; advanced: Type, Priority, Tracker, Idempotency Key |
| Run playbook on a task | Approves a task with a playbook. The run starts at once when nothing holds it, and later on its own when something does | Task Key, Playbook (picker), Hint; advanced: Workspace, Effort, Sync Status, Validate, Idempotency Key |
| Get job | A job with its status, its agent and, once it has finished, its result | Job ID |
| Get task | A task with its status, its playbook and its runs | Task Key |
| List workspaces, List workflows, List playbooks | The lists the pickers read. They are advanced actions | none |
The outputs are named as the reference answers them: a job's Status, Result Verdict, Result Summary, Pull Requests, Files and Job URL, a task's Task Status and Task Runs, and so on.
Triggers
| Trigger | When it fires | Output |
|---|---|---|
| When a job finishes | A job succeeded, failed or was cancelled. Sent once its files and report have arrived, 30 seconds to 10 minutes after the end | The job, with its result |
| When a job needs input | A job waits on a person: a question of its agent or a gate's approval. Sent two minutes after the ask, if it is still open | The job, with the Question, the Offered Answers and Where to Answer (URL) |
| When a task is done | The run of a task resolved it, or closed it with nothing to do | The task, with its runs |
Each trigger takes an optional Workspace: leave it empty for every workspace. Only what happens after the flow is turned on is told.
A trigger is a webhook subscription of the connection's member. Turning the flow on subscribes it; turning it off deletes the subscription through the address the subscription's answer gave (its Location). Each subscription counts toward the member's limit of 100.
Example: tell a Teams chat when a job finishes
- Create a flow that starts with When a job finishes. Pick a workspace, or leave it empty.
- Add Microsoft Teams' Post message in a chat or channel.
- In the message, use the job's Status, Workflow, Result Summary and Job URL.
- Save the flow and dispatch a job in Kadmo. The message arrives once the job has ended.
In Copilot Studio
Add the connector's actions to an agent as tools. Dispatch job with its workspace and workflow set lets the agent start work; Get job lets it read the result; the three lists let it learn which workspaces, workflows and playbooks exist. The agent acts as the member whose token the connection uses.
Limits
- Events arrive late, by design. When a job finishes is sent 30 seconds to 10 minutes after the end, When a job needs input two minutes after the ask.
- A subscription can stay behind. If the token was revoked, or the connection now uses another member's token, turning the flow off cannot delete its subscription. Deliveries to it fail, and after 24 hours Kadmo disables it and mails its owner. Delete it under Integrations › Outgoing webhooks in Kadmo.
- The signing secret is in the run history. The answer to a subscription carries its signing secret, which the flow's run history shows to the flow's owners. A flow cannot check a delivery's signature: the trigger's callback address is what keeps deliveries private.
- Retries. Power Automate retries an action that timed out. Dispatch job without a ticket has no duplicate guard, and Create task or Run playbook on a task can take up to a minute: give Idempotency Key a value of your own, for example the flow run's ID, so a retry returns the first result and does nothing twice.
- Rate limits. A token may make 120 calls a minute and an account 600; see Rate limits.
- An ended trial reads and cannot dispatch, create or run until the account has a plan; see An ended trial.
Troubleshooting
| What you see | Why, and what to do |
|---|---|
| The connection test fails with 401 | The token is wrong, revoked, or not an API token. Create a new one under Settings › Assistant › API tokens |
| An action fails with 402 | The account's trial has ended, or it has no credit left |
| An action fails with 404 | The workspace, workflow, playbook, task key or job ID is not one of the account's. Pick it from the list instead of typing it |
| A trigger's flow does not start | Events arrive with a delay (see Limits). Check that the job or task is in the trigger's workspace, and that the subscription is active under Integrations › Outgoing webhooks |
| Turning a flow on fails with 409 | The member already holds 100 subscriptions. Delete the ones no flow uses under Integrations › Outgoing webhooks |