bind_connection
Resolve and bind an existing environment connection to a flow's definition, then start it, completing headless flow creation that leaves connection references empty.
Instructions
Bind an existing connection to a flow and start it. The missing step of create_flow.
This is the tool that makes headless connector-flow creation actually work.
create_flow returns 201 but leaves connectionReferences empty, and the flow
cannot be started ("CannotStartUnpublishedSolutionFlow"). Binding is a separate
PATCH that has to carry both the full definition AND the connection reference.
This tool does the whole three-step sequence in one call:
1. resolve the connection (which connectionName for this connector?)
2. PATCH definition + reference
3. start the flowconnector is the connector's logical name, e.g. "shared_office365",
"shared_teams", "shared_sharepointonline".
connection_name is the concrete connection id. In the environments measured it
is a bare 32-hex GUID ("4f9d05ecf89048a09f58d4f8f718785e"), not "shared-office365-...".
Leave it empty and the tool resolves it automatically from the environment's
connection list, so a connection created in the portal a minute ago is found even
though no flow uses it yet. Only Connected connections count. If several match, it
does NOT guess: it returns status "ambiguous" with display names and created times
so you can pass one explicitly (the newest is usually the one just created).
THE CONNECTION MUST ALREADY EXIST in the environment. No API reachable with a
Flow token can create and authenticate a brand new connection - that is a portal
action. If none is found this returns status "not_found" rather than failing, with
create_url pointing at the portal Connections page: give the user that link.
A flow with several connectors (say Dataverse + Outlook) is bound in ONE call: name any one of them, and the tool resolves the others by the same rule and saves them together, because the API rejects a save that leaves any connector action unbound. If one is missing it binds nothing and returns status "incomplete", listing each unresolved connector with a create_url. Existing bindings are merged, never dropped.
Does NOT work on solution flows: their connections are Dataverse connection references, which cannot be minted here. Bind those in the portal, or edit the stored definition with update_solution_flow_definition in extras.py.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flow_id": "<flow_id>",
"connector": "<connector>"
},
"name": "bind_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | No | ||
| flow_id | Yes | ||
| connector | Yes | ||
| connection_name | No |