← Twilio + Google Docs integrations

Append Text with Google Docs APIon New Phone Number from Twilio API

Pipedream makes it easy to connect APIs for Google Docs, Twilio and 700+ other apps remarkably fast.

Trigger workflow on
New Phone Number from the Twilio API
Next, do this
Append Text with the Google Docs API
No credit card required
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a Twilio trigger and Google Docs 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 Phone Number trigger
    1. Connect your Twilio account
    2. Configure Polling schedule
  3. Configure the Append Text action
    1. Connect your Google Docs account
    2. Select a Document
    3. Configure Text
    4. Optional- Configure Append at Beginning
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger


This integration uses pre-built, open source 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.


Description:Emits an event when you add a new phone number to your account

Trigger Code

import common from "../common-polling.mjs";

export default {
  key: "twilio-new-phone-number",
  name: "New Phone Number",
  description: "Emits an event when you add a new phone number to your account",
  version: "0.0.3",
  type: "source",
  dedupe: "unique",
  methods: {
    async listResults(...args) {
      return await this.twilio.listIncomingPhoneNumbers(...args);
    generateMeta(number) {
      const {
        sid: id,
        friendlyName: summary,
      } = number;
      return {
        ts: Date.parse(dateCreated),

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.
TwiliotwilioappThis component uses the Twilio app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
Polling scheduletimer$.interface.timer

Pipedream polls Twilio for events on this schedule.

Trigger 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.

In Twilio, create an API key. 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.

Once created, you'll receive an Sid and Secret here that you should enter in the corresponding fields below.

Then, in your Twilio Dashboard, you'll see your Account SID listed near the top. This is required for certain API operations. Enter that in the AccountSid field below.

About Twilio

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


Description:Append text to an existing document. [See the docs](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertTextRequest)

Action Code

import googleDocs from "../../google_docs.app.mjs";

export default {
  key: "google_docs-append-text",
  name: "Append Text",
  description: "Append text to an existing document. [See the docs](https://developers.google.com/docs/api/reference/rest/v1/documents/request#InsertTextRequest)",
  version: "0.1.0",
  type: "action",
  props: {
    docId: {
      propDefinition: [
    text: {
      propDefinition: [
    appendAtBeginning: {
      propDefinition: [
  async run({ $ }) {
    const text = {
      text: this.text,
    await this.googleDocs.insertText(this.docId, text, this.appendAtBeginning);
    $.export("summary", "Successfully appended text to doc");
    return {
      documentId: this.docId,

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.

Google DocsgoogleDocsappThis component uses the Google Docs app.
DocumentdocIdstringSelect a value from the drop down menu.

Enter static text (e.g., hello world) or a reference to a string exported by a previous step (e.g., {{steps.foo.$return_value}}).

Append at BeginningappendAtBeginningboolean

Whether to append at the beginning (true) of the document or at the end (false). Defaults to false

Action Authentication

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

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


About Google Docs

Free Online Documents for Personal Use

More Ways to Connect Google Docs + Twilio

About Pipedream

Stop writing boilerplate code, struggling with authentication and managing infrastructure. Start connecting APIs with code-level control when you need it — and no code when you don't.

Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
"The past few weeks, I truly feel like the clichéd 10x engineer."