← Asana + Twilio integrations

Send MMS with Twilio API on New Story Added To Project (Instant) from Asana API

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

Trigger workflow on
New Story Added To Project (Instant) from the Asana API
Next, do this
Send MMS 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 Asana 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 New Story Added To Project (Instant) trigger
    1. Connect your Asana account
    2. Optional- Select a Workspace
    3. Select a Project
  3. Configure the Send MMS action
    1. Connect your Twilio account
    2. Select a From
    3. Configure To
    4. Configure Message Body
    5. Optional- Configure Media URL
  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 story added to a project.
Version:0.1.3
Key:asana-new-story

Asana Overview

Using the Asana API, you can build software that integrates with Asana to help
your team track their work. For example, you could build a tool to help your
team plan their work for the week, or a reporting tool to help you track
progress on a project.

Trigger Code

import common from "../common/common.mjs";
const { asana } = common.props;

export default {
  ...common,
  key: "asana-new-story",
  type: "source",
  name: "New Story Added To Project (Instant)",
  description: "Emit new event for each story added to a project.",
  version: "0.1.3",
  dedupe: "unique",
  props: {
    ...common.props,
    project: {
      label: "Project",
      description: "Gid of a project.",
      type: "string",
      propDefinition: [
        asana,
        "projects",
        (c) => ({
          workspace: c.workspace,
        }),
      ],
    },
  },

  methods: {
    ...common.methods,
    getWebhookFilter() {
      return {
        filters: [
          {
            action: "added",
            resource_type: "story",
          },
        ],
        resource: this.project,
      };
    },
    async emitEvent(event) {
      const { body } = event;

      if (!body || !body.events) return;

      for (const e of body.events) {
        const story = await this.asana.getStory(e.resource.gid);

        this.$emit(story, {
          id: story.gid,
          summary: story.text,
          ts: Date.now(),
        });
      }
    },
  },
};

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
AsanaasanaappThis component uses the Asana 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.
WorkspaceworkspacestringSelect a value from the drop down menu.
ProjectprojectstringSelect a value from the drop down menu.

Trigger Authentication

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

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

About Asana

Manage your team's work, projects, & tasks online

Action

Description:Send an SMS with text and media files. [See the docs](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource) for more information
Version:0.1.3
Key:twilio-send-mms

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 { messageToString } from "../../common/utils.mjs";

export default {
  key: "twilio-send-mms",
  name: "Send MMS",
  description: "Send an SMS with text and media files. [See the docs](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource) for more information",
  type: "action",
  version: "0.1.3",
  props: {
    twilio,
    from: {
      propDefinition: [
        twilio,
        "from",
      ],
    },
    to: {
      propDefinition: [
        twilio,
        "to",
      ],
    },
    body: {
      propDefinition: [
        twilio,
        "body",
      ],
    },
    mediaUrl: {
      propDefinition: [
        twilio,
        "mediaUrl",
      ],
    },
  },
  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);
    if (!toParsed || !toParsed.phoneNumber) {
      throw new Error(`Phone number ${this.to} could not be parsed as a valid number.`);
    }

    const fromParsed = phone(this.from);
    if (!fromParsed || !fromParsed.phoneNumber) {
      throw new Error(`Phone number ${this.from} could not be parsed as a valid number.`);
    }

    const data = {
      to: toParsed.phoneNumber,
      from: fromParsed.phoneNumber,
      body: this.body,
      mediaUrl: this.mediaUrl,
    };

    const resp = await this.twilio.getClient().messages.create(data);
    $.export("$summary", `Successfully sent a new MMS, "${messageToString(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).

Message Bodybodystring

The text of the message you want to send, limited to 1600 characters.

Media URLmediaUrlstring[]

The URL of the media you wish to send out with the message. The media size limit is 5MB. You may provide up to 10 media URLs per message.

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 + Asana

Make a Phone Call with Twilio API on Team Added To Organization from Asana API
Asana + Twilio
 
Try it
Send MMS with Twilio API on Team Added To Organization from Asana API
Asana + Twilio
 
Try it
Send SMS with Twilio API on Team Added To Organization from Asana API
Asana + Twilio
 
Try it
Make a Phone Call with Twilio API on Story Added To Project (Instant) from Asana API
Asana + Twilio
 
Try it
Send SMS with Twilio API on Story Added To Project (Instant) from Asana API
Asana + Twilio
 
Try it
New Project Added To Workspace (Instant) from the Asana API

Emit new event for each new project added to a workspace.

 
Try it
Task Added To Project (Instant) from the Asana API

Emits an event for each new task added to a project.

 
Try it
New Story Added To Project (Instant) from the Asana API

Emit new event for each story added to a project.

 
Try it
New Subtask (Instant) from the Asana API

Emit new event for each subtask added to a project.

 
Try it
Task Completed (Instant) from the Asana API

Emits an event for each task completed in a project.

 
Try it
Add Task To Section with the Asana API

Add a task to a specific, existing section. This will remove the task from other sections of the project. See the docs here

 
Try it
Create Project with the Asana API

Create a new project in a workspace or team. See the docs here

 
Try it
Create Subtask with the Asana API

Creates a new subtask and adds it to the parent task. See the docs here

 
Try it
Create Task with the Asana API

Creates a new task. See the docs here

 
Try it
Create Task Comment with the Asana API

Adds a comment to a task. See the docs here

 
Try it

Explore Other Apps

1
-
12
of
1400+
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.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Beta
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.
Beta
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
Telegram Bot
Telegram Bot
Telegram is a cloud-based instant messaging and voice over IP service
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 apps like ChatGPT and DALL·E 2.
Google Sheets
Google Sheets
With Google Sheets, you can create, edit, and collaborate wherever you are
Discord
Discord
Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
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.
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.