capabilities.work

Set Object, Add Subscriptions, and Notify

A 3-step recipe with Knock. We can help you get access.

Recipe · 3 steps

Set Object, Add Subscriptions, and Notify

with Knock
Works with AI assistants

Upsert an object, subscribe recipients, and trigger a workflow for it.

  1. Create or update the object in the collection with the supplied name and custom properties.
  2. Subscribe the supplied recipients to the object so they will receive notifications targeted at it.
  3. Trigger the workflow with the object as the recipient so all subscribers are notified.
What you'll need to have ready
  • apiKey: Knock secret API key (sk_...) used as a Bearer token.
  • collection: The collection the object belongs to.
  • objectId: The unique identifier for the object.
  • name: A display name to set on the object.
  • properties: Additional custom properties to set on the object.
  • recipients: The list of recipient ids to subscribe to the object.
  • workflowKey: The key of the workflow to trigger for the object.
  • data: Optional data payload passed into the workflow run.
For your developer

Arazzo workflow knock-app:object-subscriptions-notify, 3 operations: setObject → addSubscriptionsForObject → {$sourceDescriptions.workflowsApi.url}#/paths/~1v1~1workflows~1{key}~1trigger/post. Specs on APIs.io.