1. Create a draft
Open Automations in your workspace, create an automation, and give it a name such as Record an event. Add a webhook section. You can also create the draft withcreate_automation and set its definition with update_automation through MCP.
2. Configure the section
Use this complete definition in an MCP update, or create the equivalent blocks in the editor:steps:prepare. The second maps that whole object into input.value. namespace is fixed; key is rendered from the prepared event ID.
3. Test before activation
Selectrecord_event and use this sample payload:
prepare returns the expected object, and save reports a simulated write. The test does not persist this KV value. Also test a missing ID: the transform should fail and the write should not execute.
4. Activate and send one controlled event
After reviewing the definition, activate it and copy its webhook URL from the Portal. Keep this URL private: its token grants access to that entry point.202 for an accepted request. That means the request was admitted, not that all steps have finished. Open the run history, inspect both steps, and verify the KV record through the workspace’s data tools.
Reusing an idempotency key refers to the same logical request during its deduplication window. Generate a new key for a genuinely new operation, not merely because a response timed out.
5. Extend the flow
- Add an If block to branch on a record’s attributes.
- Add Connector or HTTP to update another system.
- Add Send message when the destination, connection, template, and messaging eligibility have been validated.
- Bind an existing trigger if callers must keep their URL. Start with a narrow event condition; see routing.