← RingCentral + Mailgun integrations

Send Email with Mailgun API on New Call Recording from RingCentral API

Pipedream makes it easy to connect APIs for Mailgun, RingCentral and 2,000+ other apps remarkably fast.

Trigger workflow on
New Call Recording from the RingCentral API
Next, do this
Send Email with the Mailgun 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 RingCentral trigger and Mailgun 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 Call Recording trigger
    1. Connect your RingCentral account
    2. Configure Timer
    3. Select a Extension
  3. Configure the Send Email action
    1. Connect your Mailgun account
    2. Select a Domain Name
    3. Configure From Name
    4. Configure From Email
    5. Optional- Configure Reply-To
    6. Configure To
    7. Configure Subject
    8. Optional- Configure Message Body (text)
    9. Optional- Configure Message Body (HTML)
    10. Optional- Configure Attachments
    11. Configure Send in test mode?
    12. Optional- Configure Use DKIM?
    13. Optional- Configure Use Tracking?
    14. Configure Halt on error?
  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 events when a call recording is created
Version:0.1.5
Key:ringcentral-new-call-recording

RingCentral Overview

RingCentral is a comprehensive cloud communication platform that melds messaging, video, and phone services. Integrating RingCentral with Pipedream allows for automated workflows involving SMS sending, call management, and leveraging communication logs for data-driven insights. With Pipedream's serverless execution model, you can trigger actions based on specific RingCentral events or schedule tasks to run at predetermined intervals, all without writing extensive code.

Trigger Code

import common from "../common/timer-based.mjs";

export default {
  ...common,
  key: "ringcentral-new-call-recording",
  name: "New Call Recording",
  description: "Emit new events when a call recording is created",
  type: "source",
  version: "0.1.5",
  props: {
    ...common.props,
    extensionId: {
      propDefinition: [
        common.props.ringcentral,
        "extensionId",
      ],
      type: "string",
      label: "Extension",
    },
  },
  methods: {
    ...common.methods,
    generateMeta(data) {
      const {
        id,
        startTime: timestamp,
        direction,
      } = data;
      const ts = Date.parse(timestamp);

      const { phoneNumber } = direction === "Outbound"
        ? data.to
        : data.from;
      const maskedPhoneNumber = this.getMaskedNumber(phoneNumber);
      const summary = `New call recording (${maskedPhoneNumber})`;

      return {
        id,
        summary,
        ts,
      };
    },
    async processEvent(opts) {
      const {
        dateFrom,
        dateTo,
      } = opts;

      const callRecordingsScan = this.ringcentral.getCallRecordings(
        this.extensionId,
        dateFrom,
        dateTo,
      );
      for await (const record of callRecordingsScan) {
        const meta = this.generateMeta(record);
        this.$emit(record, meta);
      }
    },
  },
};

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
RingCentralringcentralappThis component uses the RingCentral app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
Timertimer$.interface.timer

The timer that will trigger the event source

ExtensionextensionIdstringSelect a value from the drop down menu.

Trigger Authentication

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

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

About RingCentral

Experience Intelligent Phone, Meetings, Contact Center, and AI Solutions with RingCentral, the complete cloud communications platform.

Action

Description:Send email with Mailgun. [See the docs here](https://documentation.mailgun.com/en/latest/api-sending.html#sending)
Version:0.1.0
Key:mailgun-send-email

Mailgun Overview

The Mailgun API on Pipedream is a potent tool for automating email operations without the overhead of managing a full-fledged email server. It offers capabilities to send, receive, track, and store emails with ease. With Pipedream's serverless platform, you can trigger workflows using Mailgun events, such as inbound emails or delivery status changes, and connect them to hundreds of other services to streamline communication, marketing, and notification systems within your ecosystem.

Action Code

import mailgun from "../../mailgun.app.mjs";
import common from "../common.mjs";
import downloader from "@pipedream/helper_functions/actions/download-file-to-tmp/download-file-to-tmp.mjs";

export default {
  ...common,
  key: "mailgun-send-email",
  name: "Send Email",
  description: "Send email with Mailgun. [See the docs here](https://documentation.mailgun.com/en/latest/api-sending.html#sending)",
  version: "0.1.0",
  type: "action",
  props: {
    mailgun,
    domain: {
      propDefinition: [
        mailgun,
        "domain",
      ],
    },
    fromName: {
      propDefinition: [
        mailgun,
        "name",
      ],
      label: "From Name",
      description: "Sender name",
    },
    from: {
      propDefinition: [
        mailgun,
        "emailString",
      ],
      label: "From Email",
      description: "Sender email address",
    },
    /* eslint-disable pipedream/default-value-required-for-optional-props */
    replyTo: {
      propDefinition: [
        mailgun,
        "emailString",
      ],
      label: "Reply-To",
      description: "Sender reply email address",
      optional: true,
    },
    /* eslint-enable pipedream/default-value-required-for-optional-props */
    to: {
      propDefinition: [
        mailgun,
        "emails",
      ],
      label: "To",
      description: "Recipient email address(es)",
    },
    /* eslint-enable pipedream/default-value-required-for-optional-props */
    subject: {
      propDefinition: [
        mailgun,
        "subject",
      ],
      description: "Message subject",
    },
    text: {
      propDefinition: [
        mailgun,
        "bodyText",
      ],
      optional: true,
    },
    /* eslint-disable pipedream/default-value-required-for-optional-props */
    html: {
      propDefinition: [
        mailgun,
        "bodyHtml",
      ],
      optional: true,
    },
    attachments: {
      type: "object",
      label: "Attachments",
      description: "Add any attachments you'd like to include as objects. The `key` should be " +
       "the **filename** and the `value` should be the **url** download link for the attachment.",
      optional: true,
    },
    /* eslint-enable pipedream/default-value-required-for-optional-props */
    testMode: {
      type: "boolean",
      label: "Send in test mode?",
      default: true,
      description: "Enables sending in test mode. For more information, see the [Mailgun API " +
        "documentation](https://documentation.mailgun.com/en/latest/api-sending.html#sending)",
    },
    dkim: {
      type: "boolean",
      label: "Use DKIM?",
      default: true,
      description: "Enables or disables DKIM signatures. For more information, see the [Mailgun " +
        "API documentation](https://documentation.mailgun.com/en/latest/api-sending.html#sending)",
      optional: true,
    },
    tracking: {
      type: "boolean",
      label: "Use Tracking?",
      default: true,
      description: "Enables or disables tracking. For more information, see the [Mailgun API " +
        "documentation](https://documentation.mailgun.com/en/latest/api-sending.html#sending)",
      optional: true,
    },
    ...common.props,
  },
  methods: {
    ...common.methods,
    async download($, attachments) {
      const promises = Object.entries(attachments).map(async ([
        filename,
        url,
      ]) => downloader.run.bind({
        url,
        filename,
      })({
        $,
      }));

      return (await Promise.all(promises))
        .map((filedata) => this.createAttachment(filedata[3], filedata[0]));
    },
    createAttachment(data, filename) {
      return {
        data,
        filename,
      };
    },
  },
  async run({ $ }) {
    const msg = {
      "from": `${this.fromName} <${this.from}>`,
      "to": this.to,
      "subject": this.subject,
      "text": this.text,
      "html": this.html,
    };
    if (this.attachments) {
      msg["attachment"] = await this.download($, this.attachments);
    }
    if (this.testMode) {
      msg["o:testmode"] = "yes";
    }
    if (this.replyTo) {
      msg["h:Reply-To"] = this.replyTo;
    }
    if (this.dkim !== null) {
      msg["o:dkim"] = this.dkim
        ? "yes"
        : "no";
    }
    if (this.tracking) {
      msg["o:tracking"] = "yes";
    }
    const resp = await this.withErrorHandler(this.mailgun.sendMail, {
      domain: this.domain,
      msg,
    });
    $.export("filedata", null); // remove set filedata from downloader
    $.export("$summary", "Successfully sent email.");
    return resp;
  },
};

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
MailgunmailgunappThis component uses the Mailgun app.
Domain NamedomainstringSelect a value from the drop down menu.
From NamefromNamestring

Sender name

From Emailfromstring

Sender email address

Reply-ToreplyTostring

Sender reply email address

Totostring[]

Recipient email address(es)

Subjectsubjectstring

Message subject

Message Body (text)textstring
Message Body (HTML)htmlstring
Attachmentsattachmentsobject

Add any attachments you'd like to include as objects. The key should be the filename and the value should be the url download link for the attachment.

Send in test mode?testModeboolean

Enables sending in test mode. For more information, see the Mailgun API documentation

Use DKIM?dkimboolean

Enables or disables DKIM signatures. For more information, see the Mailgun API documentation

Use Tracking?trackingboolean

Enables or disables tracking. For more information, see the Mailgun API documentation

Halt on error?haltOnErrorboolean

Action Authentication

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

About Mailgun

Mailgun is an email automation service built for developers. Powerful transactional email APIs enable you to send, receive, and track emails.

More Ways to Connect Mailgun + RingCentral

Create Meeting with Ringcentral API on New Bounce from Mailgun API
Mailgun + RingCentral
 
Try it
Make CallOut with Ringcentral API on New Bounce from Mailgun API
Mailgun + RingCentral
 
Try it
Send SMS with Ringcentral API on New Bounce from Mailgun API
Mailgun + RingCentral
 
Try it
Create Meeting with Ringcentral API on New Click from Mailgun API
Mailgun + RingCentral
 
Try it
Make CallOut with Ringcentral API on New Click from Mailgun API
Mailgun + RingCentral
 
Try it
New Call Recording from the RingCentral API

Emit new events when a call recording is created

 
Try it
New Event (Instant) from the RingCentral API

Emit new event for each notification from RingCentral of a specified type

 
Try it
New Inbound Call (Instant) from the RingCentral API

Emit new event on each incoming call

 
Try it
New Inbound Fax (Instant) from the RingCentral API

Emit new event on each incoming fax

 
Try it
New Inbound Message Event (Instant) from the RingCentral API

Emit new event for each status change of inbound messages of a specific type

 
Try it
Create Meeting with the RingCentral API

Creates a new meeting. See the API docs here.

 
Try it
Download Recording with the RingCentral API

Gets a recording and downloads it to the /tmp directory. See the documentation

 
Try it
Get Message with the RingCentral API

Get message from the Message Store. See the API docs here

 
Try it
Make CallOut with the RingCentral API

Creates a new outbound call out session. See the API docs here

 
Try it
Send SMS with the RingCentral API

Creates and sends a new text message. See the API docs here

 
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.
Salesforce (REST API)
Salesforce (REST API)
Web services API for interacting with Salesforce
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
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.
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Snowflake
Snowflake
A data warehouse built for the cloud
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.
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
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
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
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.
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.