View as Markdown
Twilio SendGrid icon

Twilio SendGrid ACTION

Create Send

Create a single send. See the docs here
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Twilio SendGrid account once, then configure and run Create Send 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: "sendgrid-create-send",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sendgrid: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    categoryIds: ["Categories"],
  },
})

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 Send inputs
Property Type Description
name Name string
The name of the Single Send.
Required
categoryIds Categories string[]
The categories to associate with this Single Send.
Optional Dynamic
sendAt Send At string
Set this property to an ISO 8601 formatted date-time (YYYY-MM-DDTHH:MM:SSZ) when you would like to send the Single Send. Please note that any send_at property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the Schedule Single Send endpoint or SendGrid application UI. Setting this property to now with this endpoint will cause an error.
Optional
listIds List Ids string[]
The recipient List IDs that will receive the Single Send.
Optional Dynamic
segmentIds Segment Ids string[]
The recipient Segment IDs that will receive the Single Send.
Optional Dynamic
all All boolean
Set to true to send to All Contacts. If set to false, at least one List Ids or Segment Ids value must be provided before the Single Send is scheduled to be sent to recipients.
Required
subject Subject string
The subject line of the Single Send. Do not include this field when using a Design Id.
Optional
htmlContent HTML Content string
The HTML content of the Single Send. Do not include this field when using a Design Id.
Optional
plainContent Plain Content string
The plain text content of the Single Send. Do not include this field when using a Design Id.
Optional
generatePlainContent Generate Plain Content boolean
If set to true, Plain Content is always generated from HTML Content. If set to false, Plain Content is not altered.
Optional
designId Design Id string
A design id can be used in place of HTML Content, Plain Content, and/or Subject.
Optional Dynamic
editor Editor string
The editor is used to modify the Single Send's design in the Marketing Campaigns App.
Optional
suppressionGroupId ASM Group ID integer
Advanced Suppression Manager Group ID. The unsubscribe group to associate with this email. Will override the value set in the asm param if also set
Optional Dynamic
customUnsubscribeUrl Custom Unsubscribe URL string
The URL allowing recipients to unsubscribe — you must provide this or the Suppression Group Id.
Optional
senderId Sender Id string
The ID of the verified Sender.
Optional Dynamic
ipPool IP Pool string
The name of the IP Pool from which the Single Send emails are sent.
Optional

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
sendgrid-create-send
Version
0.0.3
App
Twilio SendGrid
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes