← Calendly + Twilio integrations

Make a Phone Call with Twilio API on Invitee Cancelled (Instant) from Calendly API

Pipedream makes it easy to connect APIs for Twilio, Calendly and 1000+ other apps remarkably fast.

Trigger workflow on
Invitee Cancelled (Instant) from the Calendly API
Next, do this
Make a Phone Call with the Twilio API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

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

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Calendly trigger and Twilio 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 Invitee Cancelled (Instant) trigger
    1. Connect your Calendly account
  3. Configure the Make a Phone Call action
    1. Connect your Twilio account
    2. Select a From
    3. Configure To
    4. Configure Text
  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 an event when an invitee cancels a scheduled event
Version:0.0.2
Key:calendly-invitee-cancelled

Calendly Overview

With the Calendly API, you can:

  • Schedule and manage appointments
  • Pull insights and data about your appointments
  • Automate appointment reminders
  • And more!

Trigger Code

const common = require("../common-webhook.js");

module.exports = {
  ...common,
  key: "calendly-invitee-cancelled",
  name: "Invitee Cancelled (Instant)",
  description: "Emits an event when an invitee cancels a scheduled event",
  version: "0.0.2",
  dedupe: "unique",
  methods: {
    ...common.methods,
    getEvents() {
      return ["invitee.canceled"];
    },
    generateMeta(body) {
      return this.generateInviteeMeta(body);
    },
  },
};

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
CalendlycalendlyappThis component uses the Calendly app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.

Trigger Authentication

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

Get your API key at the top of your integrations dashboard.

About Calendly

Free Online Appointment Scheduling Software

Action

Description:Make a phone call, passing text that Twilio will speak to the recipient of the call. [See the docs](https://www.twilio.com/docs/voice/api/call-resource#create-a-call-resource) for more information
Version:0.1.1
Key:twilio-make-phone-call

Twilio Overview

With the Twilio API, you can build telephone applications that make and receive
phone calls, as well astext messaging applications that send and receive text
messages.

Some examples of applications you could build include:

  • A phone call application that allows you to make and receive phone calls over
    the internet
  • A text messaging application that allows you to send and receive text
    messages over the internet
  • A voicemail application that allows you to leave and receive voicemails over
    the internet

Action Code

import { phone } from "phone";
import twilio from "../../twilio.app.mjs";
import { callToString } from "../../common/utils.mjs";

export default {
  key: "twilio-make-phone-call",
  name: "Make a Phone Call",
  description: "Make a phone call, passing text that Twilio will speak to the recipient of the call. [See the docs](https://www.twilio.com/docs/voice/api/call-resource#create-a-call-resource) for more information",
  version: "0.1.1",
  type: "action",
  props: {
    twilio,
    from: {
      propDefinition: [
        twilio,
        "from",
      ],
    },
    to: {
      propDefinition: [
        twilio,
        "to",
      ],
    },
    text: {
      label: "Text",
      type: "string",
      description: "The text you'd like Twilio to speak to the user when they pick up the phone.",
    },
  },
  async run({ $ }) {
    // Parse the given number into its E.164 equivalent
    // The E.164 phone number will be included in the first element
    // of the array, but the array will be empty if parsing fails.
    // See https://www.npmjs.com/package/phone
    const toParsed = phone(this.to);
    console.log(toParsed);
    if (!toParsed || !toParsed.phoneNumber) {
      throw new Error(`Phone number ${this.to} couldn't be parsed as a valid number.`);
    }

    const data = {
      to: toParsed.phoneNumber,
      from: this.from,
      twiml: `<Response><Say>${this.text}</Say></Response>`,
    };

    const resp = await this.twilio.getClient().calls.create(data);
    $.export("$summary", `Successfully made a new phone call, "${callToString(resp)}"`);
    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
TwiliotwilioappThis component uses the Twilio app.
FromfromstringSelect a value from the drop down menu.
Totostring

The destination phone number in E.164 format. Format with a + and country code (e.g., +16175551212).

Texttextstring

The text you'd like Twilio to speak to the user when they pick up the phone.

Action Authentication

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

To connect your Twilio account to Pipedream,

First, create an API key in Twilio.

  • There are two types of keys: Master and Standard. You'll need a Master key to interact with certain API endpoints, like /Accounts.
  • If you don't need to interact with those endpoints, you can use a Standard key.

After creating your key, you'll see fields for Sid and Secret. Enter those in the fields below.

About Twilio

Cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale

More Ways to Connect Twilio + Calendly

Send MMS with Twilio API on Invitee Cancelled (Instant) from Calendly API
Calendly + Twilio
 
Try it
Send SMS with Twilio API on Invitee Cancelled (Instant) from Calendly API
Calendly + Twilio
 
Try it
Make a Phone Call with Twilio API on Invitee Created (Instant) from Calendly API
Calendly + Twilio
 
Try it
Send MMS with Twilio API on Invitee Created (Instant) from Calendly API
Calendly + Twilio
 
Try it
Send SMS with Twilio API on Invitee Created (Instant) from Calendly API
Calendly + Twilio
 
Try it
Invitee Created (Instant) from the Calendly API

Emits an event when an invitee schedules an event

 
Try it
New Event from the Calendly API

Emits an event for each new event created

 
Try it
Invitee Cancelled (Instant) from the Calendly API

Emits an event when an invitee cancels a scheduled event

 
Try it
Invitee Canceled (Instant) from the Calendly API

Emits an event when an invitee cancels a scheduled event

 
Try it
New Event Type from the Calendly API

Emits an event for each new event type

 
Try it
Send SMS with the Twilio API

Send a simple text-only SMS. See the docs for more information

 
Try it
Make a Phone Call with the Twilio API

Make a phone call, passing text that Twilio will speak to the recipient of the call. See the docs for more information

 
Try it
Send MMS with the Twilio API

Send an SMS with text and media files. See the docs for more information

 
Try it
Delete Call with the Twilio API

Remove a call record from your account. See the docs for more information

 
Try it
Delete Message with the Twilio API

Delete a message record from your account. See the docs for more information

 
Try it