View as Markdown
Campaign Cleaner icon

Campaign Cleaner ACTION

Send Campaign

Send in a campaign to be processed and analyzed. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Campaign Cleaner account once, then configure and run Send Campaign 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: "campaign_cleaner-send-campaign",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    campaign_cleaner: { authProvisionId: "apn_xxxxxxx" },
    campaignHtml: "Campaign HTML",
    campaignName: "Campaign Name",
  },
})

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.

Send Campaign inputs
Property Type Description
campaignHtml Campaign HTML string
The full HTML of your campaign.
Required
campaignName Campaign Name string
The name of your campaign - campaign name must pass our sanitization checks.
Required
adjustFontColors Adjust Font Colors boolean
If true, certain bright colors are spam triggers, like red or #FF0000, will be adjusted to a slightly different color like #FF0101, it will look the same, but won't trigger some spam filters.
Optional
adjustFontSize Adjust Font Size boolean
If true, you will be able to define the min and max font size allowed in pixels. If your newsletter contains larger or small font's it will adjust them to the min/max you define.
Optional
convertHToPTags Convert H To P Tags boolean
If true, this will change all the H tags to P tags and set the correct font-size.
Optional
convertTablesToDivs Convert Tables To Divs boolean
This is an experimental feature to convert all the tables to divs, in certain instances with a complicated table structure you might need to edit the HTML. We recommend leaving this as false or not setting it.
Optional
customInfo Custom Info string
This field is for you to pass any additional data you want to send us, it will also be passed back to you when you call the get_campaign API. It's limited to 500 characters. - It must pass our sanitization checks.
Optional
imageMaxWidth Image Max Width integer
When this is specified, it will add an max-width style to all images. it is not desirable for the image width to exceed the default campaign width.
Optional
minFontSizeAllowed Min Font Size Allowed integer
The Min Font Size must be smaller or equal to the Max Font Size in pixels.
Optional
maxFontSizeAllowed Max Font Size Allowed integer
The Max Font Size must be smaller or equal to the Min Font Size in pixels.
Optional
minifyHtml Minify HTML boolean
If true, removes all whitespace, tabs, etc. Condensing the HTML.
Optional
removeClassesAndIds Remove Classes And Ids boolean
If true, removes all the class and ID attributes after CSS Inlining.
Optional
removeComments Remove Comments boolean
If true, comments are stripped from both CSS and HTML. Comments are invisible in html and can trigger spam filters.
Optional
removeCssInheritance Remove CSS Inheritance boolean
If true, removes all elements of CSS that are inherited. Once CSS is inlined, the inherited CSS will be removed, for example if font-size of a parent tag is 15 pixels, there is no need for the font-size of the child tag to be specified as 15 pixels because it's inherited or computed from the parent tag, this reduces the size of your HTML Campaign.
Optional
removeControlNonPrintable Remove Control Non Printable boolean
If true, all non-printable and control characters are removed.
Optional
removeImageHeight Remove Image Height boolean
if true, the height style is removed from all images, preventing any image distortions. Only the width property should be set on images sent in emails.
Optional
removeLargeWidthsOver Remove Large Widths Over integer
Experimental: If sets removes all defined widths over the value set on non images and table tags.
Optional
removeSuccessivePunctuation Remove Successive Punctuation boolean
if true, this will remove succession punctuation like ..., !!!!, $$$ to a single occurrence.
Optional
relativeLinksBaseUrl Relative Links Base URL string
If set this needs to be a full base URL like "https://campaigncleaner.com/", if your email campaign has any relative paths, it will be converted to an absolute URL. In most instances, you won't need to set this.
Optional
replaceDiacritics Replace Diacritics boolean
If true, replaces diacritic characters like á with normal characters equivalent, if you're sending emails in English emails, this is a must.
Optional
replaceNonAsciiCharacters Replace Non Ascii Characters boolean
If true, replaces all non-ascii characters with their ascii equivalent. For example, ❝ will be replaced with ". Non-ascii characters is of of the major spam trigger.
Optional
maxWitdh Surrounding Div Max Witdh string
The Max Width style applied to the surrounding "div" can be specified in pixels as an integer value. It is typically set to the desired maximum width of the campaign, which is commonly either 600 or 900 pixels.
Optional
textAlign Surrounding Div Text Align string
All content within the surrounding "div" will be aligned according to your specified style. However, you can use the "text-align" property on inner tags within the "div" to customize the appearance of your email.
Optional
fontSize Surrounding Div Font Size string
The pixel size that you want everything in the surrounding div to adhere to, setting this, will add an "!important" to the font-size in the surrounding "div". Font sizes that are set on any tag in the HTML will retain their original size. While all unspecified font sizes to the size you chose.
Optional
centerToParent Surrounding Div Center To Parent boolean
Using this feature will enable the surrounding "div" to be centered in any parent tags in which it is placed. This is particularly helpful when inserting an HTML snippet into a template.
Optional
treatAsFragment Treat As Fragment boolean
If true, all information before and after and including the body tag is removed.
Optional
webhookUrl Webhook URL string
An endpoint that you provide us and when your campaign is fully processed we will send the results back that is found in the Get Campaign API. You can utilize the webhook section under API Management to troubleshoot and test your endpoint.
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
campaign_cleaner-send-campaign
Version
0.0.3
App
Campaign Cleaner
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes