temporalio / temporalio/ui

Add Custom Headers Support to "Start Workflow" Form in Web UI

Open
#3,111 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
431
Forks
179
Avg merge
2d 9h
Merged PRs (30d)
71

Description

Is your feature request related to a problem? Please describe.

I'm always frustrated when I need to manually start a workflow from the Temporal Web UI that depends on custom headers for context propagation (e.g., x-tenant-id in multi-tenant applications).

Currently, the Web UI allows me to specify Workflow ID, Task Queue, Input, Memo, and Search Attributes, but there's no way to add custom headers. This means I cannot test or manually trigger workflows that rely on header-based context without writing separate scripts or using the CLI, which defeats the purpose of having a user-friendly Web UI.

Describe the solution you'd like

I would like to see a "Headers" section added to the "Start Workflow" form in the Web UI, similar to the existing "Memo" and "Search Attributes" sections.

The interface could accept a JSON object where keys are header names and values are header values (strings):

{
  "x-tenant-id": "tenant-123",
  "x-user-id": "user-456"
}

This would allow users to specify custom headers when starting workflows, just like they can do programmatically via the SDK:

await client.workflow.start(myWorkflow, {
  taskQueue: 'default',
  workflowId: 'my-workflow-id',
  args: [{ data: 'value' }],
  headers: {
    'x-tenant-id': 'tenant-123'
  }
});

Describe alternatives you've considered

  1. Using Memo: This doesn't work because workflow interceptors and middleware typically read from headers via workflowInfo().headers, not from memo
  2. Using Search Attributes: Same limitation as memo, plus search attributes have type constraints and are meant for querying, not context propagation
  3. Using Temporal CLI: This works (temporal workflow start --header "x-tenant-id=tenant-123"), but requires CLI access and is less convenient than the Web UI
  4. Creating wrapper API endpoints: This adds unnecessary infrastructure complexity just to work around a UI limitation

Additional context

Many modern applications use header-based context propagation for cross-cutting concerns like tenant identification, tracing, authentication, etc. This pattern is common in multi-tenant SaaS applications and is inspired by standards like OpenTelemetry's baggage propagation.

Supporting custom headers in the Web UI would:

  • Align the Web UI capabilities with what's possible via the SDK
  • Improve developer and operations team productivity
  • Make the Web UI a complete tool for workflow management, not just workflow monitoring

This feature would be particularly valuable for testing, debugging, and operational scenarios where manual workflow triggering is needed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Web UI's "Start Workflow" form and inspect how the existing Memo and Search Attributes sections build their request values. Add a Headers section accepting the described JSON object, then verify that starting a workflow sends those headers and that invalid JSON is handled consistently with the other form inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.