← GitHub + Google Docs integrations

Append Text with Google Docs APIon New Collaborator (Instant) from GitHub API

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

Trigger workflow on
New Collaborator (Instant) from the GitHub API
Next, do this
Append Text with the Google Docs API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
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 GitHub 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 Collaborator (Instant) trigger
    1. Connect your GitHub account
    2. Select a Repo
  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

Details

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.

Trigger

Description:Emit new events when collaborators are added to a repo
Version:0.0.4
Key:github-new-collaborator

Trigger Code

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

module.exports = {
  ...common,
  key: "github-new-collaborator",
  name: "New Collaborator (Instant)",
  description: "Emit new events when collaborators are added to a repo",
  version: "0.0.4",
  dedupe: "unique",
  type: "source",
  methods: {
    ...common.methods,
    getEventNames() {
      return [
        "member",
      ];
    },
    getEventTypes() {
      return [
        "added",
      ];
    },
    generateMeta(data) {
      const ts = Date.now();
      return {
        id: data.member.id,
        summary: `${data.sender.login} added to ${this.repoFullName}`,
        ts,
      };
    },
  },
};

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
GitHubgithubappThis component uses the GitHub app.
ReporepoFullNamestringSelect a value from the drop down menu.
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.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.

Trigger Authentication

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

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

repoadmin:orgadmin:public_keyadmin:org_hookgistnotificationsuserwrite:discussionwrite:packagesread:packages

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

Action

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
Key:google_docs-append-text

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: {
    googleDocs,
    docId: {
      propDefinition: [
        googleDocs,
        "docId",
      ],
    },
    text: {
      propDefinition: [
        googleDocs,
        "text",
      ],
    },
    appendAtBeginning: {
      propDefinition: [
        googleDocs,
        "appendAtBeginning",
      ],
    },
  },
  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.

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

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:

emailprofilehttps://www.googleapis.com/auth/drive

About Google Docs

Free Online Documents for Personal Use

More Ways to Connect Google Docs + GitHub