← Back to documentation

Transformations and Payload Shaping

Practical strategies for adapting payloads with current endpoint/output capabilities.

7 min read

PayloadRelay focuses on routing, validation, and destination-specific formatting instead of full schema-to-schema transformation.

Purpose

Use this guide to shape behavior with currently available controls:

  • Method/payload constraints.
  • Field validation.
  • Per-output formatting (email/slack/discord).

Prerequisites and permissions

  • Endpoint edit access.
  • At least one attached relay target.

Step-by-step workflow

1. Gate inbound payload shape

In endpoint Details and Field validation:

  • Restrict accepted method and payload format.
  • Enforce required fields/types/patterns.
  • Reject malformed requests before delivery.

2. Configure per-output rendering

In Target destinations:

  • Email: subject, RAW_PAYLOAD/TEXT/HTML, optional body template ({{payload}}).
  • Slack: markdown toggle.
  • Discord: TTS toggle.

3. Keep downstream contracts stable

For shared events:

  1. Keep endpoint method/payload explicit.
  2. Use field validation for key contract guarantees.
  3. Configure output formatting per destination audience.

4. Handle advanced transformation needs

If you need deep payload mapping or enrichment:

  • Transform upstream before sending to PayloadRelay, or
  • Transform at the receiving destination.

Expected result and verification checks

  • Invalid payloads are blocked early.
  • Delivered content is readable and destination-appropriate.
  • Contract expectations are explicit in endpoint config.

Common issues and fixes

  • Unexpected validation errors: recheck field names/types/regex.
  • Email body looks wrong: adjust body format and template.
  • Slack rendering issues: toggle markdown mode per output.

Related guides