Power Automate
Import the private Hoko connector and create links from a Power Automate flow.
Download the preview connector
The connector runs in Power Automate, Power Apps, or Copilot Studio and calls Hoko's existing API. No dedicated Hoko job runner is required. Local REST checks pass; Microsoft import and workflow execution still need verification in an authorized disposable environment. This is an actions-only private preview, without marketplace listing.
Microsoft currently requires OpenAPI 2.0 and a definition smaller than 1 MB. This export is generated from Hoko's canonical contract; it introduces no new API version. See Microsoft's connector FAQ.
Create a connection
- Create a custom connector from the definition in your Power Platform environment. 2. Import the connection properties if your tooling supports that file. 3. Create a connection with a Hoko API key that has
linksReadandlinksWrite.
The secure connection sends X-API-Key to https://api.hoko.to. The key selects the Hoko workspace and permitted collections. There is no workspace override, session cookie, or human token field. Keep the key in the connection, outside flow payloads and logs.
Use disposable local Hoko fixtures for tests. Staging, production, and Playground are not disposable databases. A cloud flow needs an explicitly authorized reachable fixture before it can run acceptance checks.
Create one link and find it
Use the create action with an array containing one item:
[
{
"url": "https://example.com/product",
"collectionId": "<HOKO_COLLECTION_ID>",
"externalId": "hoko:automation:power-automate:<account>:<record>"
}
]It calls POST https://api.hoko.to/links. The response is an array of links with id, shortUrl, and externalId. Use the lookup action with the exact same externalId; it calls GET https://api.hoko.to/links?externalId=.... Check that exactly one link matches and keep its Hoko ID in the flow's mapping store.
The automation guide defines the bounded external ID and mapping contract. Full request fields remain in Hoko's OpenAPI document.
Receive link-created events
The native connector remains actions-only. Microsoft's webhook trigger requires a registration response with a provider-managed Location cleanup value. Hoko's current POST /webhooks response returns the endpoint in JSON and does not return that header, so the OpenAPI export does not advertise an unverified native trigger.
Use the customer-owned receiver bridge in integrations/power-platform/src/power-platform-webhook.ts when a flow needs events. Create and verify a Hoko webhook through the existing API, deploy the bridge at the callback URL, and forward only verified events to a Power Automate HTTP flow. The bridge checks raw bytes, signature, timestamp, event ID, event type, and workspace ID, then deduplicates replays. Hoko runs no worker. Microsoft import and flow receipt remain provider acceptance gates.
Use integrations/power-platform/power-automate-http-flow.template.json for the flow shape. Require the 32-byte x-hoko-relay-auth secret and the per-event relay HMAC headers before mapping fields. The local loopback rehearsal accepts a verified event and rejects a forged body.
Prevent duplicate writes
Set the create action's retry policy to None. Use one serialized flow as the exclusive owner of each mapping. Persist a prepared intent, payload fingerprint, and request ID in a durable store before sending the create request. A connector definition alone does not supply that store or enforce serialization.
After a timeout or uncertain response, use the external ID lookup. Do not send another create request automatically. Missing or multiple matches, changed input, or an unresolved prior intent require operator reconciliation. Keep the intent when execution fails; deleting it permits duplicate writes.
Hoko still enforces scopes and rate limits through the shared engine. Preserve X-Request-Id, the X-RateLimit-* headers, and Retry-After for support and scheduling. Treat 401 and 403 as a connection or permission issue. Respect 429 and reconcile before any later write.
Remove the preview
Remove the test flow, connector, connection, and owned fixture records, then revoke its temporary Hoko key. Provider import, connection, create, lookup, denial cases, and cleanup must be recorded before this connector is called verified.