← Discord + Deepgram integrations

Transcribe Audio with Deepgram API on New Message (Instant) from Discord API

Pipedream makes it easy to connect APIs for Deepgram, Discord and 2,400+ other apps remarkably fast.

Trigger workflow on
New Message (Instant) from the Discord API
Next, do this
Transcribe Audio with the Deepgram 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 trigger and Deepgram 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 Transcribe Audio action
    1. Connect your Deepgram account
    2. Optional- Configure URL
    3. Optional- Configure File Path
    4. Optional- Select a Tier
    5. Optional- Select a Model
    6. Optional- Configure Version
    7. Optional- Select a Language
    8. Configure Detect Language
    9. Optional- Configure Punctuate
    10. Optional- Configure Profanity Filter
    11. Optional- Select a Redact
    12. Optional- Configure Diarize
    13. Optional- Configure Diarize Version
    14. Configure Smart Format
    15. Optional- Configure MultiChannel
    16. Optional- Configure Alternatives
    17. Optional- Configure Numerals
    18. Optional- Configure Search
    19. Optional- Configure Replace
    20. Optional- Configure Callback
    21. Optional- Configure Keywords
    22. Optional- Configure Paragraph
    23. Optional- Configure Summarize
    24. Optional- Configure Detect Topics
    25. Optional- Configure Detect Entities
    26. Optional- Configure Utterances
    27. Optional- Configure Utt Split
    28. Optional- Configure Tag
    29. Optional- Configure Callback with Suspend
  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:Transcribes the specified audio file. [See the documentation](https://developers.deepgram.com/api-reference/transcription/#transcribe-pre-recorded-audio)
Version:0.0.4
Key:deepgram-transcribe-audio

Deepgram Overview

The Deepgram API offers powerful speech recognition capabilities, enabling you to transcribe, search, and analyze audio data with ease. With its cutting-edge machine learning models, you can uncover insights from voice conversations, automate content moderation, and enhance user experience by converting spoken words into text. Pipedream, as a serverless integration platform, empowers you to craft custom workflows that harness the potential of Deepgram. By connecting to various apps, you can automate complex tasks, analyze audio data on-the-fly, and respond to audio-driven events.

Action Code

import deepgram from "../../deepgram.app.mjs";
import { ConfigurationError } from "@pipedream/platform";
import fs from "fs";

export default {
  key: "deepgram-transcribe-audio",
  name: "Transcribe Audio",
  description: "Transcribes the specified audio file. [See the documentation](https://developers.deepgram.com/api-reference/transcription/#transcribe-pre-recorded-audio)",
  version: "0.0.4",
  type: "action",
  props: {
    deepgram,
    url: {
      type: "string",
      label: "URL",
      description: "URL of audio file to transcribe",
      optional: true,
    },
    filePath: {
      type: "string",
      label: "File Path",
      description: "The path to the file saved to the `/tmp` directory (e.g. `/tmp/example.mp3`). [See the documentation](https://pipedream.com/docs/workflows/steps/code/nodejs/working-with-files/#the-tmp-directory).",
      optional: true,
    },
    tier: {
      propDefinition: [
        deepgram,
        "tier",
      ],
    },
    model: {
      propDefinition: [
        deepgram,
        "model",
      ],
    },
    version: {
      type: "string",
      label: "Version",
      description: "Version of the model to use. Default: `latest`",
      default: "latest",
      optional: true,
    },
    language: {
      propDefinition: [
        deepgram,
        "language",
      ],
    },
    detectLanguage: {
      type: "boolean",
      label: "Detect Language",
      description: "Indicates whether to detect the language of the provided audio",
      default: true,
    },
    punctuate: {
      type: "boolean",
      label: "Punctuate",
      description: "Indicates whether to add punctuation and capitalization to the transcript",
      optional: true,
    },
    profanityFilter: {
      type: "boolean",
      label: "Profanity Filter",
      description: "Indicates whether to remove profanity from the transcript",
      optional: true,
    },
    redact: {
      propDefinition: [
        deepgram,
        "redact",
      ],
    },
    diarize: {
      type: "boolean",
      label: "Diarize",
      description: "Indicates whether to recognize speaker changes. When set to `true`, each word in the transcript will be assigned a speaker number starting at 0. To use the legacy diarization feature, set the `diarize_version` parameter set to `2021-07-14.0`.",
      optional: true,
    },
    diarizeVersion: {
      type: "string",
      label: "Diarize Version",
      description: "Indicates the version of the diarization feature to use. To use the legacy diarization feature, set the parameter value to `2021-07-14.0`. Only used when the diarization feature is enabled.",
      optional: true,
    },
    smartFormat: {
      type: "boolean",
      label: "Smart Format",
      description: "Applies additional formatting to transcripts to optimize them for human readability.",
      default: true,
    },
    multiChannel: {
      type: "boolean",
      label: "MultiChannel",
      description: "Indicates whether to transcribe each audio channel independently",
      optional: true,
    },
    alternatives: {
      type: "integer",
      label: "Alternatives",
      description: "Maximum number of transcript alternatives to return",
      optional: true,
    },
    numerals: {
      type: "boolean",
      label: "Numerals",
      description: "Indicates whether to convert numbers from written format (e.g., one) to numerical format (e.g., 1).",
      optional: true,
    },
    search: {
      type: "string[]",
      label: "Search",
      description: "Terms or phrases to search for in the submitted audio",
      optional: true,
    },
    replace: {
      type: "string[]",
      label: "Replace",
      description: "Terms or phrases to search for in the submitted audio and replace.",
      optional: true,
    },
    callback: {
      type: "string",
      label: "Callback",
      description: "Callback URL to provide if you would like your submitted audio to be processed asynchronously",
      optional: true,
    },
    keywords: {
      type: "string[]",
      label: "Keywords",
      description: "Keywords to which the model should pay particular attention to boosting or suppressing to help it understand context",
      optional: true,
    },
    paragraph: {
      type: "boolean",
      label: "Paragraph",
      description: "Indicates whether Deepgram will split audio into paragraphs to improve transcript readability. When paragraphs is set to `true`, you must also set either `punctuate`, `diarize`, or `multichannel` to `true`.",
      optional: true,
    },
    summarize: {
      type: "boolean",
      label: "Summarize",
      description: "Indicates whether Deepgram will provide summaries for sections of content. When `summarize` is set to `true`, `punctuate` will be set to `true` by default.",
      optional: true,
    },
    detectTopics: {
      type: "boolean",
      label: "Detect Topics",
      description: "Indicates whether Deepgram will identify and extract key topics for sections of content. When `detect_topics` is set to `true`, `punctuate` will be set to `true` by default.",
      optional: true,
    },
    detectEntities: {
      type: "boolean",
      label: "Detect Entities",
      description: "Indicates whether Deepgram will identify and extract key entities for sections of content. When `detect_entities` is set to `true`, `punctuate` will be set to true by default.",
      optional: true,
    },
    utterances: {
      type: "boolean",
      label: "Utterances",
      description: "Indicates whether Deepgram will segment speech into meaningful semantic units, which allows the model to interact more naturally and effectively with speakers’ spontaneous speech patterns",
      optional: true,
    },
    uttSplit: {
      type: "string",
      label: "Utt Split",
      description: "Length of time in seconds of silence between words that Deepgram will use when determining where to split utterances. Used when utterances is enabled.",
      optional: true,
    },
    tag: {
      type: "string",
      label: "Tag",
      description: "Tag to associate with the request",
      optional: true,
    },
    callbackWithSuspend: {
      type: "boolean",
      label: "Callback with Suspend",
      description: "Use the `$.flow.suspend` Node.js helper to suspend the workflow until the transcription is completed. Overrides the `callback` parameter to Deepgram.",
      optional: true,
    },
  },
  async run({ $ }) {
    if (!this.url && !this.filePath) {
      throw new ConfigurationError("Either URL or File Path must be provided.");
    }

    let callback  = this.callback;
    if (this.callbackWithSuspend) {
      ({ resume_url: callback } = $.flow.suspend());
    }

    const params = {
      tier: this.tier,
      model: this.model,
      version: this.version,
      language: this.language,
      detect_language: this.detectLanguage,
      punctuate: this.punctuate,
      profanity_filter: this.profanityFilter,
      redact: this.redact,
      diarize: this.diarize,
      diarize_version: this.diarizeVersion,
      smart_format: this.smartFormat,
      multi_channel: this.multiChannel,
      alternatives: this.alternatives,
      numerals: this.numerals,
      search: this.search,
      replace: this.replace,
      callback,
      keywords: this.keywords,
      paragraph: this.paragraph,
      summarize: this.summarize,
      detect_topics: this.detectTopics,
      detect_entities: this.detectEntities,
      utterances: this.utterances,
      utt_split: this.uttSplit,
      tag: this.tag,
    };

    const config = {
      params,
      $,
    };

    if (this.url) {
      config.data = {
        url: this.url,
      };
    }
    if (this.filePath) {
      config.data = fs.readFileSync(this.filePath.includes("tmp/")
        ? this.filePath
        : `/tmp/${this.filePath}`);
      config.headers = {
        "Content-Type": "application/octet-stream",
      };
    }

    const response = await this.deepgram.transcribeAudio(config);

    if (response) {
      $.export("$summary", "Successfully transcribed audio");
    }

    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
DeepgramdeepgramappThis component uses the Deepgram app.
URLurlstring

URL of audio file to transcribe

File PathfilePathstring

The path to the file saved to the /tmp directory (e.g. /tmp/example.mp3). See the documentation.

TiertierstringSelect a value from the drop down menu:{ "label": "These are our newest and most powerful speech-to-text models on the market today", "value": "nova" }{ "label": "These are still some of our most powerful ASR models", "value": "enhanced" }{ "label": "Applies our Base models, which are built on our signature end-to-end deep learning speech model architecture", "value": "base" }
ModelmodelstringSelect a value from the drop down menu:{ "label": "Optimized for everyday audio processing. TIERS: nova, enhanced, base", "value": "general" }{ "label": "Optimized for conference room settings. TIERS: enhanced beta, base", "value": "meeting" }{ "label": "Optimized for low-bandwidth audio phone calls. TIERS: nova, enhanced, base", "value": "phonecall" }{ "label": "Optimized for low-bandwidth audio clips with a single speaker. TIERS: base", "value": "voicemail" }{ "label": "Optimized for multiple speakers with varying audio quality. TIERS: enhanced, base", "value": "finance" }{ "label": "Optimized to allow artificial intelligence technologies. TIERS: base", "value": "conversationalai" }{ "label": "Optimized for audio sourced from videos. TIERS: base", "value": "video" }{ "label": "Deepgram’s hosted version of OpenAI’s Whisper model. TIERS: not-applicable", "value": "whisper" }
Versionversionstring

Version of the model to use. Default: latest

LanguagelanguagestringSelect a value from the drop down menu:{ "value": "da", "label": "Danish" }{ "value": "de", "label": "German Germany" }{ "value": "en-AU", "label": "English Australia" }{ "value": "en-IN", "label": "English India" }{ "value": "en-NZ", "label": "English New Zealand" }{ "value": "en-GB", "label": "English United Kingdom" }{ "value": "en-US", "label": "English United States" }{ "value": "es", "label": "Spanish Spain" }{ "value": "es-419", "label": "Spanish Latin America" }{ "value": "fr-CA", "label": "French Canada" }{ "value": "fr", "label": "French France" }{ "value": "hi", "label": "Hindi India" }{ "value": "hi-Latn", "label": "Hindi Roman Script" }{ "value": "id", "label": "Indonesian Indonesia" }{ "value": "it", "label": "Italian Italy" }{ "value": "ja", "label": "Japanese Japan" }{ "value": "ko", "label": "Korean Republic of Korea" }{ "value": "nl", "label": "Dutch" }{ "value": "no", "label": "Norwegian Norway" }{ "value": "pl", "label": "Polish Poland" }{ "value": "pt-BR", "label": "Portuguese Brazil" }{ "value": "pt-PT", "label": "Portuguese Portugal" }{ "value": "ru", "label": "Russian Russian Federation" }{ "value": "sv", "label": "Swedish Sweden" }{ "value": "tr", "label": "Turkish Turkey" }{ "value": "zh-CN", "label": "Chinese China" }{ "value": "zh-TW", "label": "Chinese Taiwan" }{ "value": "uk", "label": "Ukranian" }
Detect LanguagedetectLanguageboolean

Indicates whether to detect the language of the provided audio

Punctuatepunctuateboolean

Indicates whether to add punctuation and capitalization to the transcript

Profanity FilterprofanityFilterboolean

Indicates whether to remove profanity from the transcript

RedactredactstringSelect a value from the drop down menu:{ "label": "Redacts sensitive credit card information", "value": "pci" }{ "label": "Aggressively redacts strings of numerals", "value": "numbers" }{ "label": "Redacts social security numbers", "value": "ssn" }
Diarizediarizeboolean

Indicates whether to recognize speaker changes. When set to true, each word in the transcript will be assigned a speaker number starting at 0. To use the legacy diarization feature, set the diarize_version parameter set to 2021-07-14.0.

Diarize VersiondiarizeVersionstring

Indicates the version of the diarization feature to use. To use the legacy diarization feature, set the parameter value to 2021-07-14.0. Only used when the diarization feature is enabled.

Smart FormatsmartFormatboolean

Applies additional formatting to transcripts to optimize them for human readability.

MultiChannelmultiChannelboolean

Indicates whether to transcribe each audio channel independently

Alternativesalternativesinteger

Maximum number of transcript alternatives to return

Numeralsnumeralsboolean

Indicates whether to convert numbers from written format (e.g., one) to numerical format (e.g., 1).

Searchsearchstring[]

Terms or phrases to search for in the submitted audio

Replacereplacestring[]

Terms or phrases to search for in the submitted audio and replace.

Callbackcallbackstring

Callback URL to provide if you would like your submitted audio to be processed asynchronously

Keywordskeywordsstring[]

Keywords to which the model should pay particular attention to boosting or suppressing to help it understand context

Paragraphparagraphboolean

Indicates whether Deepgram will split audio into paragraphs to improve transcript readability. When paragraphs is set to true, you must also set either punctuate, diarize, or multichannel to true.

Summarizesummarizeboolean

Indicates whether Deepgram will provide summaries for sections of content. When summarize is set to true, punctuate will be set to true by default.

Detect TopicsdetectTopicsboolean

Indicates whether Deepgram will identify and extract key topics for sections of content. When detect_topics is set to true, punctuate will be set to true by default.

Detect EntitiesdetectEntitiesboolean

Indicates whether Deepgram will identify and extract key entities for sections of content. When detect_entities is set to true, punctuate will be set to true by default.

Utterancesutterancesboolean

Indicates whether Deepgram will segment speech into meaningful semantic units, which allows the model to interact more naturally and effectively with speakers’ spontaneous speech patterns

Utt SplituttSplitstring

Length of time in seconds of silence between words that Deepgram will use when determining where to split utterances. Used when utterances is enabled.

Tagtagstring

Tag to associate with the request

Callback with SuspendcallbackWithSuspendboolean

Use the $.flow.suspend Node.js helper to suspend the workflow until the transcription is completed. Overrides the callback parameter to Deepgram.

Action Authentication

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

You can create a Deepgram API Key in the Deepgram Console. Please note, that you should copy the key and save it somewhere safe, as you will not be able to view the key again after generating it.

About Deepgram

Intelligent, high accuracy speech recognition built for business

More Ways to Connect Deepgram + Discord

Get Balance with Deepgram API on New Guild Member (Instant) from Discord API
Discord + Deepgram
 
Try it
Get Balance with Deepgram API on Message Deleted (Instant) from Discord API
Discord + Deepgram
 
Try it
Get Balance with Deepgram API on New Command Received (Instant) from Discord API
Discord + Deepgram
 
Try it
Get Balance with Deepgram API on New Message (Instant) from Discord API
Discord + Deepgram
 
Try it
Get Balance with Deepgram API on Reaction Added (Instant) from Discord API
Discord + Deepgram
 
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 Balance with the Deepgram API

Retrieves details about the specified balance. See the documentation

 
Try it
Get Project with the Deepgram API

Retrieves basic information about the specified project. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
2,400+
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
Salesforce
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
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.
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.
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.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.