← Discord + Campaign Cleaner integrations

Send Campaign with Campaign Cleaner API on New Message (Instant) from Discord API

Pipedream makes it easy to connect APIs for Campaign Cleaner, Discord and 2,000+ other apps remarkably fast.

Trigger workflow on
New Message (Instant) from the Discord API
Next, do this
Send Campaign with the Campaign Cleaner API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 800,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Discord trigger and Campaign Cleaner action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Message (Instant) trigger
    1. Connect your Discord account
    2. Configure Channels
    3. Configure discordApphook
  3. Configure the Send Campaign action
    1. Connect your Campaign Cleaner account
    2. Configure Campaign HTML
    3. Configure Campaign Name
    4. Optional- Configure Adjust Font Colors
    5. Optional- Configure Adjust Font Size
    6. Optional- Configure Convert H To P Tags
    7. Optional- Configure Convert Tables To Divs
    8. Optional- Configure Custom Info
    9. Optional- Configure Image Max Width
    10. Optional- Configure Min Font Size Allowed
    11. Optional- Configure Max Font Size Allowed
    12. Optional- Configure Minify HTML
    13. Optional- Configure Remove Classes And Ids
    14. Optional- Configure Remove Comments
    15. Optional- Configure Remove CSS Inheritance
    16. Optional- Configure Remove Control Non Printable
    17. Optional- Configure Remove Image Height
    18. Optional- Configure Remove Large Widths Over
    19. Optional- Configure Remove Successive Punctuation
    20. Optional- Configure Relative Links Base URL
    21. Optional- Configure Replace Diacritics
    22. Optional- Configure Replace Non Ascii Characters
    23. Optional- Configure Surrounding Div Max Witdh
    24. Optional- Select a Surrounding Div Text Align
    25. Optional- Configure Surrounding Div Font Size
    26. Optional- Configure Surrounding Div Center To Parent
    27. Optional- Configure Treat As Fragment
    28. Optional- Configure Webhook URL
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event for each message posted to one or more channels in a Discord server
Version:1.0.3
Key:discord-new-message

Discord Overview

The Discord API interacts seamlessly with Pipedream, empowering you to craft customized automations and workflows for your Discord server. With this powerful integration, you can automate tasks like message posting, user management, and notifications, based on a myriad of triggers and actions from different apps. These automations can enhance the Discord experience for community moderators and members, by synchronizing with external tools, organizing community engagement, and streamlining notifications.

Trigger Code

import discord from "../../discord.app.mjs";
import sampleEmit from "./test-event.mjs";

export default {
  type: "source",
  key: "discord-new-message",
  name: "New Message (Instant)",
  description: "Emit new event for each message posted to one or more channels in a Discord server",
  version: "1.0.3",

  dedupe: "unique",
  props: {
    discord,
    channels: {
      type: "$.discord.channel[]",
      appProp: "discord",
      label: "Channels",
      description: "Select the channel(s) you'd like to be notified for",
    },
    // eslint-disable-next-line pipedream/props-label,pipedream/props-description
    discordApphook: {
      type: "$.interface.apphook",
      appProp: "discord",
      async eventNames() {
        return this.channels || [];
      },
    },
  },
  async run(event) {
    if (event.guildID != this.discord.$auth.guild_id) {
      return;
    }
    this.$emit(event, {
      id: event.id,
    });
  },
  sampleEmit,
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
DiscorddiscordappThis component uses the Discord app.
Channelschannels$.discord.channel[]

Select the channel(s) you'd like to be notified for

discordApphook$.interface.apphook

Trigger Authentication

Discord uses OAuth authentication. When you connect your Discord account, Pipedream will open a popup window where you can sign into Discord and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Discord API.

Pipedream requests the following authorization scopes when you connect your account:

botemailidentifyguilds

About Discord

Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.

Action

Description:Send in a campaign to be processed and analyzed. [See the documentation](https://api-docs.campaigncleaner.com/#540a9e44-bd17-4bb4-ac8f-150ecbc8066a)
Version:0.0.1
Key:campaign_cleaner-send-campaign

Campaign Cleaner Overview

The Campaign Cleaner API offers tools to clean and verify email lists, improving email campaign performance and sender reputation. By integrating with Pipedream, you can automate workflows that enhance your email marketing efforts. Use the API to check the validity of email addresses, remove duplicates, and classify email types. Pipedream's serverless platform allows you to trigger these processes from various events, schedule them, or manually invoke them as needed.

Action Code

import campaignCleaner from "../../campaign_cleaner.app.mjs";
import { clearObj } from "../../common/utils.mjs";

export default {
  key: "campaign_cleaner-send-campaign",
  name: "Send Campaign",
  version: "0.0.1",
  description: "Send in a campaign to be processed and analyzed. [See the documentation](https://api-docs.campaigncleaner.com/#540a9e44-bd17-4bb4-ac8f-150ecbc8066a)",
  type: "action",
  props: {
    campaignCleaner,
    campaignHtml: {
      type: "string",
      label: "Campaign HTML",
      description: "The full HTML of your campaign.",
    },
    campaignName: {
      type: "string",
      label: "Campaign Name",
      description: "The name of your campaign - campaign name must pass our sanitization checks.",
    },
    adjustFontColors: {
      type: "boolean",
      label: "Adjust Font Colors",
      description: " 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: true,
    },
    adjustFontSize: {
      type: "boolean",
      label: "Adjust Font Size",
      description: "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: true,
    },
    convertHToPTags: {
      type: "boolean",
      label: "Convert H To P Tags",
      description: "If true, this will change all the H tags to P tags and set the correct font-size.",
      optional: true,
    },
    convertTablesToDivs: {
      type: "boolean",
      label: "Convert Tables To Divs",
      description: "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: true,
    },
    customInfo: {
      type: "string",
      label: "Custom Info",
      description: "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: true,
    },
    imageMaxWidth: {
      type: "integer",
      label: "Image Max Width",
      description: "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: true,
    },
    minFontSizeAllowed: {
      type: "integer",
      label: "Min Font Size Allowed",
      description: "The `Min Font Size` must be smaller or equal to the `Max Font Size` in pixels.",
      max: 100,
      optional: true,
    },
    maxFontSizeAllowed: {
      type: "integer",
      label: "Max Font Size Allowed",
      description: "The `Max Font Size` must be smaller or equal to the `Min Font Size` in pixels.",
      max: 100,
      optional: true,
    },
    minifyHtml: {
      type: "boolean",
      label: "Minify HTML",
      description: "If true, removes all whitespace, tabs, etc. Condensing the HTML.",
      optional: true,
    },
    removeClassesAndIds: {
      type: "boolean",
      label: "Remove Classes And Ids",
      description: "If true, removes all the class and ID attributes after CSS Inlining.",
      optional: true,
    },
    removeComments: {
      type: "boolean",
      label: "Remove Comments",
      description: "If true, comments are stripped from both CSS and HTML. Comments are invisible in html and can trigger spam filters.",
      optional: true,
    },
    removeCssInheritance: {
      type: "boolean",
      label: "Remove CSS Inheritance",
      description: "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: true,
    },
    removeControlNonPrintable: {
      type: "boolean",
      label: "Remove Control Non Printable",
      description: "If true, all non-printable and control characters are removed.",
      optional: true,
    },
    removeImageHeight: {
      type: "boolean",
      label: "Remove Image Height",
      description: "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: true,
    },
    removeLargeWidthsOver: {
      type: "integer",
      label: "Remove Large Widths Over",
      description: "Experimental: If sets removes all defined widths over the value set on non images and table tags.",
      optional: true,
    },
    removeSuccessivePunctuation: {
      type: "boolean",
      label: "Remove Successive Punctuation",
      description: "if true, this will remove succession punctuation like ..., !!!!, $$$ to a single occurrence.",
      optional: true,
    },
    relativeLinksBaseUrl: {
      type: "string",
      label: "Relative Links Base URL",
      description: "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: true,
    },
    replaceDiacritics: {
      type: "boolean",
      label: "Replace Diacritics",
      description: "If true, replaces diacritic characters like á with normal characters equivalent, if you're sending emails in English emails, this is a must.",
      optional: true,
    },
    replaceNonAsciiCharacters: {
      type: "boolean",
      label: "Replace Non Ascii Characters",
      description: "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: true,
    },
    maxWitdh: {
      type: "string",
      label: "Surrounding Div Max Witdh",
      description: "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: true,
    },
    textAlign: {
      type: "string",
      label: "Surrounding Div Text Align",
      description: "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.",
      options: [
        "left",
        "center",
        "right",
      ],
      optional: true,
    },
    fontSize: {
      type: "string",
      label: "Surrounding Div Font Size",
      description: "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: true,
    },
    centerToParent: {
      type: "boolean",
      label: "Surrounding Div Center To Parent",
      description: "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: true,
    },
    treatAsFragment: {
      type: "boolean",
      label: "Treat As Fragment",
      description: "If true, all information before and after and including the body tag is removed.",
      optional: true,
    },
    webhookUrl: {
      type: "string",
      label: "Webhook URL",
      description: "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: true,
    },
  },
  async run({ $ }) {
    const response = await this.campaignCleaner.sendCampaign({
      $,
      data: clearObj({
        send_campaign: {
          campaign_html: this.campaignHtml,
          campaign_name: this.campaignName,
          adjust_font_colors: this.adjustFontColors,
          adjust_font_size: this.adjustFontSize,
          convert_h_to_p_tags: this.convertHToPTags,
          convert_tables_to_divs: this.convertTablesToDivs,
          custom_info: this.customInfo,
          image_max_width: this.imageMaxWidth,
          min_font_size_allowed: this.minFontSizeAllowed,
          max_font_size_allowed: this.maxFontSizeAllowed,
          minify_html: this.minifyHtml,
          remove_classes_and_ids: this.removeClassesAndIds,
          remove_comments: this.removeComments,
          remove_css_inheritance: this.removeCssInheritance,
          remove_control_non_printable: this.removeControlNonPrintable,
          remove_image_height: this.removeImageHeight,
          remove_large_widths_over: this.removeLargeWidthsOver,
          remove_successive_punctuation: this.removeSuccessivePunctuation,
          relative_links_base_url: this.relativeLinksBaseUrl,
          replace_diacritics: this.replaceDiacritics,
          replace_non_ascii_characters: this.replaceNonAsciiCharacters,
          surrounding_div: {
            max_witdh: this.maxWitdh,
            text_align: this.textAlign,
            font_size: this.fontSize,
            center_to_parent: this.centerToParent,
          },
          treat_as_fragment: this.treatAsFragment,
          webhook_url: this.webhookUrl,
        },
      }),
    });

    if (response.error) throw new Error(response.error);

    $.export("$summary", `A new campaign with Id: ${response.campaign?.id} was successfully sent!`);
    return response;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
Campaign CleanercampaignCleanerappThis component uses the Campaign Cleaner app.
Campaign HTMLcampaignHtmlstring

The full HTML of your campaign.

Campaign NamecampaignNamestring

The name of your campaign - campaign name must pass our sanitization checks.

Adjust Font ColorsadjustFontColorsboolean

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.

Adjust Font SizeadjustFontSizeboolean

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.

Convert H To P TagsconvertHToPTagsboolean

If true, this will change all the H tags to P tags and set the correct font-size.

Convert Tables To DivsconvertTablesToDivsboolean

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.

Custom InfocustomInfostring

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.

Image Max WidthimageMaxWidthinteger

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.

Min Font Size AllowedminFontSizeAllowedinteger

The Min Font Size must be smaller or equal to the Max Font Size in pixels.

Max Font Size AllowedmaxFontSizeAllowedinteger

The Max Font Size must be smaller or equal to the Min Font Size in pixels.

Minify HTMLminifyHtmlboolean

If true, removes all whitespace, tabs, etc. Condensing the HTML.

Remove Classes And IdsremoveClassesAndIdsboolean

If true, removes all the class and ID attributes after CSS Inlining.

Remove CommentsremoveCommentsboolean

If true, comments are stripped from both CSS and HTML. Comments are invisible in html and can trigger spam filters.

Remove CSS InheritanceremoveCssInheritanceboolean

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.

Remove Control Non PrintableremoveControlNonPrintableboolean

If true, all non-printable and control characters are removed.

Remove Image HeightremoveImageHeightboolean

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.

Remove Large Widths OverremoveLargeWidthsOverinteger

Experimental: If sets removes all defined widths over the value set on non images and table tags.

Remove Successive PunctuationremoveSuccessivePunctuationboolean

if true, this will remove succession punctuation like ..., !!!!, $$$ to a single occurrence.

Relative Links Base URLrelativeLinksBaseUrlstring

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.

Replace DiacriticsreplaceDiacriticsboolean

If true, replaces diacritic characters like á with normal characters equivalent, if you're sending emails in English emails, this is a must.

Replace Non Ascii CharactersreplaceNonAsciiCharactersboolean

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.

Surrounding Div Max WitdhmaxWitdhstring

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.

Surrounding Div Text AligntextAlignstringSelect a value from the drop down menu:leftcenterright
Surrounding Div Font SizefontSizestring

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.

Surrounding Div Center To ParentcenterToParentboolean

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.

Treat As FragmenttreatAsFragmentboolean

If true, all information before and after and including the body tag is removed.

Webhook URLwebhookUrlstring

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.

Action Authentication

Campaign Cleaner uses API keys for authentication. When you connect your Campaign Cleaner account, Pipedream securely stores the keys so you can easily authenticate to Campaign Cleaner APIs in both code and no-code steps.

About Campaign Cleaner

The Ultimate Tool for Optimized, High-Performance Email Campaigns

More Ways to Connect Campaign Cleaner + Discord

Get Campaign Status with Campaign Cleaner API on Message Deleted (Instant) from Discord API
Discord + Campaign Cleaner
 
Try it
Get Campaign Status with Campaign Cleaner API on New Guild Member (Instant) from Discord API
Discord + Campaign Cleaner
 
Try it
Get Campaign Status with Campaign Cleaner API on Reaction Added (Instant) from Discord API
Discord + Campaign Cleaner
 
Try it
Send Campaign with Campaign Cleaner API on Message Deleted (Instant) from Discord API
Discord + Campaign Cleaner
 
Try it
Send Campaign with Campaign Cleaner API on New Guild Member (Instant) from Discord API
Discord + Campaign Cleaner
 
Try it
New Message (Instant) from the Discord API

Emit new event for each message posted to one or more channels in a Discord server

 
Try it
Message Deleted (Instant) from the Discord API

Emit new event for each message deleted

 
Try it
New Command Received (Instant) from the Discord API

Emit new event for each command posted to one or more channels in a Discord server

 
Try it
New Guild Member (Instant) from the Discord API

Emit new event for each new member added to a guild

 
Try it
Reaction Added (Instant) from the Discord API

Emit new event for each reaction added to a message

 
Try it
Send Message with the Discord API

Send a simple message to a Discord channel

 
Try it
Send Message (Advanced) with the Discord API

Send a simple or structured message (using embeds) to a Discord channel

 
Try it
Send Message With File with the Discord API

Post a message with an attached file

 
Try it
Get Campaign Status with the Campaign Cleaner API

Check the status of your campaign. See the documentation

 
Try it
Send Campaign with the Campaign Cleaner API

Send in a campaign to be processed and analyzed. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
2,000+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Premium
Salesforce (REST API)
Salesforce (REST API)
Web services API for interacting with Salesforce
Premium
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Premium
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Premium
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify Developer App
Shopify Developer App
Shopify is a user-friendly e-commerce platform that helps small businesses build an online store and sell online through one streamlined dashboard.
Premium
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Premium
Snowflake
Snowflake
A data warehouse built for the cloud
Premium
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Premium
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.