Trigger Workflow and Inspect Message Content
A 4-step recipe with Knock. We can help you get access.
Recipe · 4 steps
Trigger Workflow and Inspect Message Content
with Knock
Works with AI assistants
Trigger a workflow then read the resulting message and its content.
- Trigger the workflow for the recipient to produce one or more messages.
- List the most recent message for the recipient and tenant so the generated message can be inspected.
- Retrieve the message resource to read its delivery status and metadata.
- Fetch the fully rendered contents of the message for the channel it was delivered through.
What you'll need to have ready
- apiKey: Knock secret API key (sk_...) used as a Bearer token.
- workflowKey: The key of the workflow to trigger.
- recipientId: The user id to trigger the workflow for and filter messages by.
- tenant: Optional tenant id used to scope the message lookup.
- data: Optional data payload passed into the workflow run.
For your developer
Arazzo workflow knock-app:trigger-workflow-inspect-message-content, 4 operations: {$sourceDescriptions.workflowsApi.url}#/paths/~1v1~1workflows~1{key}~1trigger/post → listMessages → getMessage → getMessageContents. Specs on APIs.io.