destinations

Manage where form submissions are delivered: list, add, and remove destinations.

npx formdata-dev destinations <list|add|rm>

destinations list

List all destinations for a form.

npx formdata-dev destinations list [formId]

If formId is omitted, the CLI prompts you to select a form. If only one form exists, it is selected automatically.

Output

Destinations for "Contact Form" ─────────────────────────────── smtp (enabled) ID: d1e2f3a4-... Target: noreply@acme.com -> admin@acme.com webhook (enabled) ID: g5h6i7j8-... Target: https://hooks.slack.com/services/...
TIP

MCP equivalent: get_form (returns destinations alongside form details)


destinations add

Add a destination to a form interactively.

npx formdata-dev destinations add [formId]

If formId is omitted, the CLI prompts you to select a form.

Step 1: Choose Type

Destination type: 1. Webhook (HTTP POST to any URL) 2. Email (SMTP) 3. Google Sheets Webhook Select (1-3):

Webhook Configuration

Prompt Required Default Description
Webhook URL Yes -- Full URL to receive POST requests
HTTP method No POST HTTP method
Headers No -- One key: value per line, blank line to finish

SMTP Configuration

Prompt Required Default Description
SMTP host Yes -- Mail server hostname
Port No 587 SMTP port
Security No starttls starttls, on, or off
Username Yes -- SMTP auth username
Password Yes -- SMTP auth password
From email Yes -- Sender address
To emails Yes -- Comma-separated recipient addresses
Subject template No New submission: {{formName}} Email subject with template variables

Google Sheets Webhook Configuration

Prompt Required Default Description
Webhook URL Yes -- Google Apps Script or webhook URL
HTTP method No POST HTTP method
Authorization header No -- Auth header value (blank to skip)

Output

Done: Destination added ID: d1e2f3a4-... Type: webhook
TIP

MCP equivalent: add_destination


destinations rm

Remove a destination from a form.

npx formdata-dev destinations rm <formId> <destinationId>

Both arguments are required.

Confirmation

Warning: Remove destination d1e2f3a4-... from "Contact Form"? Continue? (y/n):

Errors

  • Missing arguments prints usage: formdata-dev destinations rm <formId> <destinationId>
  • Invalid form ID returns Not found
WARNING

Removing a destination stops delivery to that target immediately. Submissions in flight may still be delivered if already queued.

TIP

MCP equivalent: remove_destination