View as Markdown
Mailgun icon

Mailgun ACTION

Create Route

Create a new route. See the docs here
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Mailgun account once, then configure and run Create Route from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "mailgun-create-route",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mailgun: { authProvisionId: "apn_xxxxxxx" },
    priority: 10,
    description: "Description",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Route inputs
Property Type Description
priority Priority integer
Priority ranks low to high, and higher priority routes are handled first
Required
description Description string
Required
match Filter On string
For more information, see the route filters API documentation
Required
matchExpression Filter Expression string
For the recipient filter, specify a regex expression like .*@gmail.com. For the header filter, specify a header name followed by a colon followed by a regex, like subject:.*support. For the catch_all filters, leave this blank.
Required
action Action string
The route action to execute when the route expression evaluates to True. Formore information, see the [route actions API documentation][https://documentation.mailgun.com/en/latest/api-routes.html#actions]
Required
action_expression Action Expression string
For the forward action, specify a destination email address or URL. For the store action, (optionally) specify a webhook URL to notify. For the stop action, leave this blank.
Required
haltOnError Halt on error? boolean
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
mailgun-create-route
Version
0.0.4
App
Mailgun
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes