← UserVoice + Discord Bot integrations

Create Guild Channel with Discord Bot API on New NPS Ratings from UserVoice API

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

Trigger workflow on
New NPS Ratings from the UserVoice API
Next, do this
Create Guild Channel with the Discord Bot API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
4 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 UserVoice trigger and Discord Bot 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 NPS Ratings trigger
    1. Connect your UserVoice account
    2. Configure Polling schedule
  3. Configure the Create Guild Channel action
    1. Connect your Discord Bot account
    2. Select a Guild
    3. Configure Channel's name
    4. Select a Channel type
    5. Optional- Configure Position
    6. Optional- Configure Topic
    7. Optional- Configure NSFW
    8. Optional- Configure Bitrate
    9. Optional- Configure Rate limit per user
    10. Optional- Configure User limit
    11. Optional- Select a Category
    12. Optional- Select one or more Roles to add
    13. Optional- Select one or more Members to add
  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:Emits new NPS ratings submitted through the UserVoice NPS widget. On first run, emits up to 10 sample NPS ratings users have previously submitted.
Version:0.0.4
Key:uservoice-new-nps-ratings

UserVoice Overview

Using the UserVoice API, developers can build powerful customer service tools
to improve the service your organization provides to its customers. Here are
just a few of the possibilities:

  • Create a custom portal, allowing your customers to submit and manage their
    requests, as well as track their progress, all within your own branded
    domain.
  • Integrate UserVoice with your existing customer service software, enabling
    customers to better track their inquiries and quickly provide feedback on
    their experiences.
  • Design branded surveys to gather feedback from customers and gain insight
    about how to improve your customer service.
  • Automate customer service processes to ensure each customer's inquiries are
    handled quickly and efficiently.
  • Use data from the UserVoice API to gain valuable insights into your customer
    service performance.

These are just a few of the possibilities that can be accomplished through the
UserVoice API. With its comprehensive suite of features, your organization will
be able to provide exceptional customer service experiences and better serve
your customers.

Trigger Code

const uservoice = require("../../uservoice.app.js");
const { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } = require("@pipedream/platform");

const NUM_SAMPLE_RESULTS = 10;

module.exports = {
  name: "New NPS Ratings",
  version: "0.0.4",
  key: "uservoice-new-nps-ratings",
  description: `Emits new NPS ratings submitted through the UserVoice NPS widget. On first run, emits up to ${NUM_SAMPLE_RESULTS} sample NPS ratings users have previously submitted.`,
  dedupe: "unique",
  type: "source",
  props: {
    uservoice,
    timer: {
      label: "Polling schedule",
      description:
        "Pipedream will poll the UserVoice API for new NPS ratings on this schedule",
      type: "$.interface.timer",
      default: {
        intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
      },
    },
    db: "$.service.db",
  },
  hooks: {
    async deploy() {
      // Emit sample records on the first run
      const { npsRatings } = await this.uservoice.listNPSRatings({
        numSampleResults: NUM_SAMPLE_RESULTS,
      });
      this.emitWithMetadata(npsRatings);
    },
  },
  methods: {
    emitWithMetadata(ratings) {
      for (const rating of ratings) {
        const {
          id, rating: score, body, created_at,
        } = rating;
        const summary = body && body.length
          ? `${score} - ${body}`
          : `${score}`;
        this.$emit(rating, {
          summary,
          id,
          ts: +new Date(created_at),
        });
      }
    },
  },
  async run() {
    let updated_after =
      this.db.get("updated_after") || new Date().toISOString();
    const {
      npsRatings, maxUpdatedAt,
    } = await this.uservoice.listNPSRatings({
      updated_after,
    });
    this.emitWithMetadata(npsRatings);

    if (maxUpdatedAt) {
      updated_after = maxUpdatedAt;
    }
    this.db.set("updated_after", updated_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
UserVoiceuservoiceappThis component uses the UserVoice app.
Polling scheduletimer$.interface.timer

Pipedream will poll the UserVoice API for new NPS ratings on this schedule

N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.

Trigger Authentication

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

To connect to the UserVoice API, create a trusted API client. In your UserVoice Admin Console, navigate to SettingsIntegrationsUserVoice API keys and click the button to Add API Key. Add a name and check the Trusted box at the bottom of the modal that appears:



Then, generate an access token by clicking the Create button near the right of the details of the API key:



About UserVoice

User feedback made easy and actionable

Action

Description:Create a new channel for the guild. [See the docs here](https://discord.com/developers/docs/resources/guild#create-guild-channel)
Version:0.0.14
Key:discord_bot-create-guild-channel

Discord Bot Overview

The Pipedream Discord app enables you to build event-driven workflows that interact with the Discord API. When you authorize the Pipedream app's access to your guilds, you can use Pipedream workflows to perform common Discord actions, or write your own code against the Discord API.

Action Code

import common from "../../common.mjs";
import constants from "../../common/constants.mjs";

const { discord } = common.props;

export default {
  ...common,
  key: "discord_bot-create-guild-channel",
  name: "Create Guild Channel",
  description: "Create a new channel for the guild. [See the docs here](https://discord.com/developers/docs/resources/guild#create-guild-channel)",
  type: "action",
  version: "0.0.14",
  props: {
    ...common.props,
    name: {
      propDefinition: [
        discord,
        "channelName",
      ],
    },
    type: {
      type: "string",
      label: "Channel type",
      description: "Please select a channel type. In case you want to create a Store channel please read the docs [here](https://discord.com/developers/docs/game-and-server-management/special-channels#store-channels). If you want to create a Stage Voice channel please read the docs [here](https://support.discord.com/hc/en-us/articles/1500005513722#h_01F22AMCVKHQGQB8N3EF30B20C)",
      options: [
        {
          label: "Text",
          value: String(constants.CHANNEL_TYPES.GUILD_TEXT),
        },
        {
          label: "Voice",
          value: String(constants.CHANNEL_TYPES.GUILD_VOICE),
        },
        {
          label: "Category",
          value: String(constants.CHANNEL_TYPES.GUILD_CATEGORY),
        },
        {
          label: "Store",
          value: String(constants.CHANNEL_TYPES.GUILD_STORE),
        },
        {
          label: "Stage Voice",
          value: String(constants.CHANNEL_TYPES.GUILD_STAGE_VOICE),
        },
      ],
    },
    position: {
      propDefinition: [
        discord,
        "channelPosition",
      ],
    },
    topic: {
      propDefinition: [
        discord,
        "channelTopic",
      ],
    },
    nsfw: {
      propDefinition: [
        discord,
        "channelNsfw",
      ],
    },
    bitrate: {
      propDefinition: [
        discord,
        "channelBitrate",
      ],
    },
    rateLimitPerUser: {
      propDefinition: [
        discord,
        "channelRateLimitPerUser",
      ],
    },
    userLimit: {
      propDefinition: [
        discord,
        "channelUserLimit",
      ],
    },
    parentId: {
      propDefinition: [
        discord,
        "channelParentId",
        ({ guildId }) => ({
          guildId,
        }),
      ],
    },
    rolePermissions: {
      propDefinition: [
        discord,
        "channelRolePermissions",
        ({ guildId }) => ({
          guildId,
        }),
      ],
    },
    memberPermissions: {
      propDefinition: [
        discord,
        "channelMemberPermissions",
        ({ guildId }) => ({
          guildId,
        }),
      ],
    },
  },
  async run({ $ }) {
    const {
      guildId,
      name,
      type,
      nsfw,
      topic,
      position,
      bitrate,
      rateLimitPerUser,
      userLimit,
      parentId,
      rolePermissions: rolePermissionStrs = [],
      memberPermissions: memberPermissionStrs = [],
    } = this;

    const permissionOverwrites = [
      ...rolePermissionStrs,
      ...memberPermissionStrs,
    ].map((str) => JSON.parse(str)).filter((p) => !(p.allow?.length === 0));

    const data = {
      name,
      // Pleas take a look at https://github.com/PipedreamHQ/pipedream/issues/1807
      // if we want to avoid this workaround in the future.
      type: +type,
      nsfw,
      topic,
      position,
      bitrate,
      rate_limit_per_user: rateLimitPerUser,
      user_limit: userLimit,
      parent_id: parentId,
      permission_overwrites: permissionOverwrites,
    };

    return this.discord.createChannel({
      $,
      guildId,
      data,
    });
  },
};

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
Discord BotdiscordappThis component uses the Discord Bot app.
GuildguildIdstringSelect a value from the drop down menu.
Channel's namenamestring

There is a 1-100 character channel name restriction

Channel typetypestringSelect a value from the drop down menu:{ "label": "Text", "value": "0" }{ "label": "Voice", "value": "2" }{ "label": "Category", "value": "4" }{ "label": "Store", "value": "6" }{ "label": "Stage Voice", "value": "13" }
Positionpositioninteger

The position of the channel in the left-hand listing

Topictopicstring

0-1024 character channel topic

NSFWnsfwboolean
Bitratebitrateinteger

The bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers).

Rate limit per userrateLimitPerUserinteger

Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected.

User limituserLimitinteger

The user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit.

CategoryparentIdstringSelect a value from the drop down menu.
Roles to addrolePermissionsstring[]Select a value from the drop down menu.
Members to addmemberPermissionsstring[]Select a value from the drop down menu.

Action 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

More Ways to Connect Discord Bot + UserVoice

Add Role with Discord Bot API on New NPS Ratings from UserVoice API
UserVoice + Discord Bot
 
Try it
Create Channel Invite with Discord Bot API on New NPS Ratings from UserVoice API
UserVoice + Discord Bot
 
Try it
Delete Channel with Discord Bot API on New NPS Ratings from UserVoice API
UserVoice + Discord Bot
 
Try it
Delete message with Discord Bot API on New NPS Ratings from UserVoice API
UserVoice + Discord Bot
 
Try it
Find Channel with Discord Bot API on New NPS Ratings from UserVoice API
UserVoice + Discord Bot
 
Try it
New NPS Ratings from the UserVoice API

Emits new NPS ratings submitted through the UserVoice NPS widget. On first run, emits up to 10 sample NPS ratings users have previously submitted.

 
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 docs here.

 
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 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
2,000+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
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.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
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.
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.
Filter
Filter
Specify a condition that your workflow must meet and whether you'd like to proceed or end workflow execution.
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.
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.
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
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.
Airtable (OAuth)
Airtable (OAuth)
Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.
Zoom
Zoom
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars.
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.
Gmail
Gmail
Gmail offers private and secure email by Google at no cost, for business and consumer accounts.
Gmail (Developer App)
Gmail (Developer App)
Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.
Email
Email
Trigger workflows on new emails, and send emails to yourself as part of a Pipedream workflow.
Delay
Delay
Delay, pause, suspend, or have the execution of your workflow wait for as little as one millisecond, or as long as one year.
Go
Go
Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.
Premium
Zoom Admin
Zoom Admin
Video conferencing (includes account-level scopes) for Zoom Admins.
Twilio
Twilio
Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.
Bash
Bash
Run any Bash in a Pipedream step within your workflow, including making curl requests.