← Discord Bot + Intelliprint integrations

Create a Print Job with Intelliprint API on New Guild Member from Discord Bot API

Pipedream makes it easy to connect APIs for Intelliprint, Discord Bot and 3,000+ other apps remarkably fast.

Trigger workflow on
New Guild Member from the Discord Bot API
Next, do this
Create a Print Job with the Intelliprint API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 1,000,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 Bot trigger and Intelliprint 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 Guild Member trigger
    1. Connect your Discord Bot account
    2. Select a Guild
    3. Configure timer
  3. Configure the Create a Print Job action
    1. Connect your Intelliprint account
    2. Configure File Path
    3. Optional- Configure Reference
    4. Optional- Configure Confirmed
    5. Optional- Configure Test Mode
    6. Optional- Select a Splitting Method
    7. Optional- Configure Split On Phrase
    8. Optional- Configure Split On Page
    9. Optional- Select a Double Sided
    10. Optional- Configure Double Sided Specific Pages
    11. Optional- Configure Premium Quality
    12. Optional- Select a Postage Service
    13. Optional- Select a Ideal Envelope
    14. Optional- Configure Mail Date
    15. Optional- Configure Background First Page
    16. Optional- Configure Background Other Pages
    17. Optional- Configure Confidential
    18. Optional- Configure Remove Letters With Phrase
    19. Optional- Configure Remove Letters Series
    20. Optional- Configure Nudge X
    21. Optional- Configure Nudge Y
    22. Optional- Configure Confirmation Email
    23. Optional- Configure Metadata
    24. Configure syncDir
  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 every member added to a guild. [See docs here](https://discord.com/developers/docs/resources/guild#list-guild-members)
Version:1.0.0
Key:discord_bot-new-guild-member

Discord Bot Overview

The Discord Bot API unlocks the power to interact with Discord users and channels programmatically, making it possible to automate messages, manage servers, and integrate with other services. With Pipedream's serverless platform, you can create complex workflows that respond to events in Discord, process data, and trigger actions in other apps. This opens up opportunities for community engagement, content moderation, analytics, and more, without the overhead of managing infrastructure.

Trigger Code

import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
import common from "../common/common.mjs";

export default {
  ...common,
  key: "discord_bot-new-guild-member",
  name: "New Guild Member",
  description: "Emit new event for every member added to a guild. [See docs here](https://discord.com/developers/docs/resources/guild#list-guild-members)",
  type: "source",
  dedupe: "unique",
  version: "1.0.0",
  props: {
    ...common.props,
    db: "$.service.db",
    timer: {
      type: "$.interface.timer",
      default: {
        intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
      },
    },
  },
  async run({ $ }) {
    const { guildId } = this;
    const params = {
      limit: 100,
      after: this._getLastMemberID(),
    };

    while (true) {
      const members = await this.discord.getGuildMembers({
        $,
        guildId,
        params,
      });

      if (members.length === 0) {
        return;
      }

      for (const member of members) {
        const {
          user,
          joined_at: joinedAt,
        } = member;

        params.after = user.id;
        if (user.bot) continue;

        this.$emit(member, {
          summary: `New member: ${user.username}`,
          id: user.id,
          ts: Date.parse(joinedAt),
        });
      }

      this._setLastMemberID(params.after);
    }
  },
};

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
Discord BotdiscordappThis component uses the Discord Bot app.
GuildguildIdstringSelect a value from the drop down menu.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
timer$.interface.timer

Trigger Authentication

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

This app allows you to use the Discord API using your own Discord bot. If you don't want to use a custom bot, and you just need to use the Discord API, exit this screen and use the Discord app, instead.


If you want to use your own Discord bot, but haven't created one yet, see these instructions or watch this video. You'll need to add this bot to your server(s) to make successful API requests.

Once you've created your bot, you'll find the Bot token within the Bot section of your app. Enter that token below.

About Discord Bot

Use this app to interact with the Discord API using a bot in your account

Action

Description:Creates a new print job in the Intelliprint API. [See the documentation](https://api-docs.intelliprint.net/?_gl=1*19r3k2k*_gcl_au*MTU2NDU2MDgzMS4xNzY0MDIwNDQx#print_jobs-create)
Version:0.0.1
Key:intelliprint-create-a-print-job

Intelliprint Overview

The Intelliprint API offers a suite of printing solutions, enabling developers to automate the process of sending documents for print. With this API, you can create workflows in Pipedream to programmatically manage print jobs, customize printing options, and track the status of each task. It's ideal for businesses looking to integrate print capabilities into their services without the overhead of managing printers and supplies.

Action Code

/* eslint-disable no-unused-vars */
import {
  ConfigurationError,
  getFileStreamAndMetadata,
} from "@pipedream/platform";
import FormData from "form-data";
import {
  DOUBLE_SIDED_OPTIONS,
  IDEAL_ENVELOPE_OPTIONS,
  POSTAGE_SERVICE_OPTIONS,
  SPLITTING_METHOD_OPTIONS,
} from "../../common/constants.mjs";
import {
  camelCaseToSnakeCase, parseObject,
} from "../../common/utils.mjs";
import intelliprint from "../../intelliprint.app.mjs";

export default {
  key: "intelliprint-create-a-print-job",
  name: "Create a Print Job",
  description: "Creates a new print job in the Intelliprint API. [See the documentation](https://api-docs.intelliprint.net/?_gl=1*19r3k2k*_gcl_au*MTU2NDU2MDgzMS4xNzY0MDIwNDQx#print_jobs-create)",
  version: "0.0.1",
  type: "action",
  annotations: {
    destructiveHint: false,
    openWorldHint: true,
    readOnlyHint: false,
  },
  props: {
    intelliprint,
    filePath: {
      type: "string",
      label: "File Path",
      description: "The file to upload. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.txt`)",
    },
    reference: {
      type: "string",
      label: "Reference",
      description: "An user-provided reference for this Print Job.",
      optional: true,
    },
    confirmed: {
      type: "boolean",
      label: "Confirmed",
      description: "Whether to confirm this Print Job immediately, or to leave it as a draft.",
      optional: true,
    },
    testmode: {
      type: "boolean",
      label: "Test Mode",
      description: "Whether to mark this Print Job as a test.",
      optional: true,
    },
    splittingMethod: {
      type: "string",
      label: "Splitting Method",
      description: "The method to use to split the Print Job into multiple Print Jobs.",
      options: SPLITTING_METHOD_OPTIONS,
      optional: true,
    },
    splitOnPhrase: {
      type: "string",
      label: "Split On Phrase",
      description: "The word or phrase to split letters using. Only used when **Splitting Method** is set to `split_on_phrase`.",
      optional: true,
    },
    splitOnPage: {
      type: "integer",
      label: "Split On Page",
      description: "The number of pages each letter should be. Only used when **Splitting Method** is set to `split_on_page`.",
      optional: true,
    },
    doubleSided: {
      type: "string",
      label: "Double Sided",
      description: "Whether to print these letters double sided.",
      options: DOUBLE_SIDED_OPTIONS,
      optional: true,
    },
    doubleSidedSpecificPages: {
      type: "string",
      label: "Double Sided Specific Pages",
      description: "The array of pages to print double sided. Only used when **Double Sided** is set to `mixed`. Example: **1-3,6-7**.",
      optional: true,
    },
    premiumQuality: {
      type: "boolean",
      label: "Premium Quality",
      description: "Whether to print these letters in premium quality.",
      optional: true,
    },
    postageService: {
      type: "string",
      label: "Postage Service",
      description: "The postage service to use for this Print Job.",
      options: POSTAGE_SERVICE_OPTIONS,
      optional: true,
    },
    idealEnvelope: {
      type: "string",
      label: "Ideal Envelope",
      description: "The ideal envelope size for these letters.",
      options: IDEAL_ENVELOPE_OPTIONS,
      optional: true,
    },
    mailDate: {
      type: "string",
      label: "Mail Date",
      description: "The date to send this letter out on. Format: **YYYY-MM-DD**",
      optional: true,
    },
    backgroundFirstPage: {
      type: "string",
      label: "Background First Page",
      description: "The ID of the Background to apply to the first page of these letters.",
      optional: true,
    },
    backgroundOtherPages: {
      type: "string",
      label: "Background Other Pages",
      description: "The ID of the Background to apply to the other pages of these letters.",
      optional: true,
    },
    confidential: {
      type: "boolean",
      label: "Confidential",
      description: "Whether to mark letters of this Print Job as confidential.",
      optional: true,
    },
    removeLettersWithPhrase: {
      type: "string",
      label: "Remove Letters With Phrase",
      description: "Remove letter objects that have this phrase in their content.",
      optional: true,
    },
    removeLettersSeries: {
      type: "string[]",
      label: "Remove Letters Series",
      description: "An array of letters' indexes that have been removed.",
      optional: true,
    },
    nudgeX: {
      type: "integer",
      label: "Nudge X",
      description: "What amount in mm to move the first page of each letter horizontally. A positive number moves the page right, a negative number moves the page left.",
      optional: true,
    },
    nudgeY: {
      type: "integer",
      label: "Nudge Y",
      description: "What amount in mm to move the first page of each letter vertically. A positive number moves the page down, a negative number moves the page up.",
      optional: true,
    },
    confirmationEmail: {
      type: "boolean",
      label: "Confirmation Email",
      description: "Whether a confirmation email should be sent to the user or account's email address when this letter is confirmed.",
      optional: true,
    },
    metadata: {
      type: "object",
      label: "Metadata",
      description: "A key-value object for storing any information you want to along with this Print Job.",
      optional: true,
    },
    syncDir: {
      type: "dir",
      accessMode: "read",
      sync: true,
      optional: false,
    },
  },
  async run({ $ }) {

    try {
      const {
        intelliprint,
        confirmed,
        testmode,
        filePath,
        syncDir,
        splittingMethod,
        splitOnPhrase,
        splitOnPage,
        doubleSided,
        doubleSidedSpecificPages,
        premiumQuality,
        postageService,
        idealEnvelope,
        mailDate,
        backgroundFirstPage,
        backgroundOtherPages,
        nudgeX,
        nudgeY,
        confidential,
        removeLettersWithPhrase,
        removeLettersSeries,
        confirmationEmail,
        ...data
      } = this;

      const {
        stream, metadata,
      } = await getFileStreamAndMetadata(filePath);

      const formData = new FormData();
      formData.append("file", stream, {
        contentType: metadata.contentType,
        knownLength: metadata.size,
        filename: metadata.name,
      });

      if (confirmed) formData.append("confirmed", `${confirmed}`);
      if (testmode) formData.append("testmode", `${testmode}`);
      if (doubleSided) formData.append("printing.double_sided", doubleSided);
      if (doubleSidedSpecificPages) formData.append("printing.double_sided_specific_pages", doubleSidedSpecificPages);
      if (premiumQuality) formData.append("printing.premium_quality", `${premiumQuality}`);
      if (splittingMethod) formData.append("splitting.method", splittingMethod);
      if (splitOnPhrase) formData.append("splitting.phrase", splitOnPhrase);
      if (splitOnPage) formData.append("splitting.pages", splitOnPage);
      if (postageService) formData.append("postage.service", postageService);
      if (idealEnvelope) formData.append("postage.ideal_envelope", idealEnvelope);
      if (mailDate) formData.append("postage.mail_date", Date.parse(mailDate) / 1000);
      if (backgroundFirstPage) formData.append("background.first_page", backgroundFirstPage);
      if (backgroundOtherPages) formData.append("background.other_pages", backgroundOtherPages);
      if (nudgeX) formData.append("nudge.x", nudgeX);
      if (nudgeY) formData.append("nudge.y", nudgeY);
      if (confidential) formData.append("confidential", `${confidential}`);
      if (removeLettersWithPhrase) formData.append("remove_letters.with_phrase", removeLettersWithPhrase);
      if (removeLettersSeries) formData.append("remove_letters.series", JSON.stringify(parseObject(removeLettersSeries)));
      if (confirmationEmail) formData.append("confirmation_email", `${confirmationEmail}`);
      for (const [
        key,
        value,
      ] of Object.entries(data)) {
        formData.append(camelCaseToSnakeCase(key), `${value}`);
      }

      const response = await intelliprint.createPrintJob({
        $,
        data: formData,
        headers: formData.getHeaders(),
      });

      $.export("$summary", `Successfully created print job with ID: ${response.id}`);
      return response;
    } catch (error) {
      throw new ConfigurationError(`Error creating print job: ${error.response.data.error.message}`);
    }
  },
};

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
IntelliprintintelliprintappThis component uses the Intelliprint app.
File PathfilePathstring

The file to upload. Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.txt)

Referencereferencestring

An user-provided reference for this Print Job.

Confirmedconfirmedboolean

Whether to confirm this Print Job immediately, or to leave it as a draft.

Test Modetestmodeboolean

Whether to mark this Print Job as a test.

Splitting MethodsplittingMethodstringSelect a value from the drop down menu:nonesplit_on_phrasesplit_on_page
Split On PhrasesplitOnPhrasestring

The word or phrase to split letters using. Only used when Splitting Method is set to split_on_phrase.

Split On PagesplitOnPageinteger

The number of pages each letter should be. Only used when Splitting Method is set to split_on_page.

Double SideddoubleSidedstringSelect a value from the drop down menu:noyesmixed
Double Sided Specific PagesdoubleSidedSpecificPagesstring

The array of pages to print double sided. Only used when Double Sided is set to mixed. Example: 1-3,6-7.

Premium QualitypremiumQualityboolean

Whether to print these letters in premium quality.

Postage ServicepostageServicestringSelect a value from the drop down menu:uk_first_classuk_second_classuk_first_class_signed_foruk_second_class_signed_foruk_special_deliveryinternational
Ideal EnvelopeidealEnvelopestringSelect a value from the drop down menu:c4c5c4_plusa4_box
Mail DatemailDatestring

The date to send this letter out on. Format: YYYY-MM-DD

Background First PagebackgroundFirstPagestring

The ID of the Background to apply to the first page of these letters.

Background Other PagesbackgroundOtherPagesstring

The ID of the Background to apply to the other pages of these letters.

Confidentialconfidentialboolean

Whether to mark letters of this Print Job as confidential.

Remove Letters With PhraseremoveLettersWithPhrasestring

Remove letter objects that have this phrase in their content.

Remove Letters SeriesremoveLettersSeriesstring[]

An array of letters' indexes that have been removed.

Nudge XnudgeXinteger

What amount in mm to move the first page of each letter horizontally. A positive number moves the page right, a negative number moves the page left.

Nudge YnudgeYinteger

What amount in mm to move the first page of each letter vertically. A positive number moves the page down, a negative number moves the page up.

Confirmation EmailconfirmationEmailboolean

Whether a confirmation email should be sent to the user or account's email address when this letter is confirmed.

Metadatametadataobject

A key-value object for storing any information you want to along with this Print Job.

syncDirsyncDirdir

Action Authentication

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

About Intelliprint

Intelliprint: Efficient Online Letter & Postcard Sending

More Ways to Connect Intelliprint + Discord Bot

Create a Print Job with Intelliprint API on New Forum Thread Message from Discord Bot API
Discord Bot + Intelliprint
 
Try it
Create a Print Job with Intelliprint API on New Message in Channel from Discord Bot API
Discord Bot + Intelliprint
 
Try it
Create a Print Job with Intelliprint API on New Tag Added to Forum Thread from Discord Bot API
Discord Bot + Intelliprint
 
Try it
Create a Print Job with Intelliprint API on New Thread Message from Discord Bot API
Discord Bot + Intelliprint
 
Try it
New Message in Channel from the Discord Bot API

Emit new event for each message posted to one or more channels

 
Try it
New Forum Thread Message from the Discord Bot API

Emit new event for each forum thread message posted. Note that your bot must have the MESSAGE_CONTENT privilege intent to see the message content. See the documentation

 
Try it
New Guild Member from the Discord Bot API

Emit new event for every member added to a guild. See docs here

 
Try it
New Tag Added to Forum Thread from the Discord Bot API

Emit new event when a new tag is added to a thread

 
Try it
New Thread Message from the Discord Bot API

Emit new event for each thread message posted.

 
Try it
Add Role with the Discord Bot API

Assign a role to a user. Remember that your bot requires the MANAGE_ROLES permission. See the docs here

 
Try it
Change Nickname with the Discord Bot API

Modifies the nickname of the current user in a guild.

 
Try it
Create Channel Invite with the Discord Bot API

Create a new invite for the channel. See the docs here

 
Try it
Create Guild Channel with the Discord Bot API

Create a new channel for the guild. See the docs here

 
Try it
Delete Channel with the Discord Bot API

Delete a Channel.

 
Try it

Explore Other Apps

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

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.
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.
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.
Anthropic (Claude)
Anthropic (Claude)
AI research and products that put safety at the frontier. Introducing Claude, a next-generation AI assistant for your tasks, no matter the scale.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Telegram
Telegram
Telegram, is a cloud-based, cross-platform, encrypted instant messaging (IM) service.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
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.
AWS
AWS
Premium
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Twilio SendGrid
Twilio SendGrid
Premium
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
Klaviyo
Klaviyo
Premium
Klaviyo unifies your data, channels, and AI agents in one platform—text, WhatsApp, email marketing, and more—driving growth with every interaction.
Zendesk
Zendesk
Premium
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
ServiceNow
ServiceNow
Premium
Beta
The smarter way to workflow
Slack
Slack
Slack is the AI-powered platform for work bringing all of your conversations, apps, and customers together in one place. Around the world, Slack is helping businesses of all sizes grow and send productivity through the roof.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.