← nocodb + Google Drive integrations

Add File Sharing Preference with Google Drive API on New Update in Table from nocodb API

Pipedream makes it easy to connect APIs for Google Drive, nocodb and 1000+ other apps remarkably fast.

Trigger workflow on
New Update in Table from the nocodb API
Next, do this
Add File Sharing Preference with the Google Drive 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 nocodb trigger and Google Drive 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 Update in Table trigger
    1. Connect your nocodb account
    2. Select a Project Id
    3. Select a Table Name
    4. Configure Polling interval
  3. Configure the Add File Sharing Preference action
    1. Connect your Google Drive account
    2. Optional- Select a Drive
    3. Select a File
    4. Optional- Select a Role
    5. Optional- Select a Type
    6. Optional- Configure Domain
    7. Optional- Configure Email Address
  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 update in table. [See docs here](https://all-apis.nocodb.com/#tag/DB-table-row/operation/db-table-row-list)
Version:0.0.3
Key:nocodb-updated-record

nocodb Overview

NoCodeDB offers a powerful API that allows you to build compelling web and
mobile applications without writing code. With this API, you can create robust
applications that interact with millions of users, securely store data, and
build integrations with other services. Here’s a short list of some of the
things you can do with NoCodeDB:

  • Create real-time web applications by connecting to your users via WebSockets
  • Securely store and manage data for user accounts and settings
  • Create custom APIs to extend your applications
  • Create integrations with third-party services such as Stripe, Salesforce,
    Google Drive, and Dropbox
  • Deploy on serverless infrastructure to ensure fast and reliable results
  • Create custom data models to define relationships between data
  • Create custom queries to access data in powerful ways
  • Automate tasks with serverless functions
  • Monitor application performance and security with detailed analysis
  • Extend existing applications with custom data and logic
  • Utilize modern data practices such as GraphQL and cloud storage
  • Create secure and fully compliant serverless environments
  • And more!

Trigger Code

import common from "../common/base.mjs";

export default {
  ...common,
  type: "source",
  name: "New Update in Table",
  key: "nocodb-updated-record",
  description: "Emit new event for each update in table. [See docs here](https://all-apis.nocodb.com/#tag/DB-table-row/operation/db-table-row-list)",
  version: "0.0.3",
  dedupe: "unique",
  props: {
    ...common.props,
  },
  methods: {
    ...common.methods,
    getDataToEmit({
      Id, UpdatedAt,
    }) {
      const ts = new Date().getTime();
      return {
        id: `${Id}${UpdatedAt}`,
        summary: `New update (${Id})`,
        ts,
      };
    },
    getTimeField() {
      return "UpdatedAt";
    },
  },
};

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
nocodbnocodbappThis component uses the nocodb app.
Project IdprojectIdstringSelect a value from the drop down menu.
Table NametableNamestringSelect a value from the drop down menu.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
Polling intervaltimer$.interface.timer

Pipedream will poll the Nocodb API on this schedule

Trigger Authentication

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

Your API key can be found in API Tokens Management within your database.
Your domain is where you app is hosted, so for https://mytable.com use mytable.com for the domain.

About nocodb

Free & open source Airtable alternative

Action

Description:Add a [sharing](https://support.google.com/drive/answer/7166529) permission to the sharing preferences of a file and provide a sharing URL. [See the docs](https://developers.google.com/drive/api/v3/reference/permissions/create) for more information
Version:0.1.0
Key:google_drive-add-file-sharing-preference

Google Drive Overview

Using the Google Drive API, you can build applications that:

  • Create and manage files and folders
  • Download and upload files
  • Share and organize files
  • Search for files
  • Track changes to files
  • And much more!

Action Code

import googleDrive from "../../google_drive.app.mjs";

/**
 * Uses Google Drive API to create a permission for a file. The role granted by
 * the permission is one of `owner`,`organizer`,`fileOrganizer`,
 * `writer`,`commenter`, `reader`. See the [Google Drive API Reference for
 * Permissions](https://bit.ly/2XKKG1X) for more information.
 */
export default {
  key: "google_drive-add-file-sharing-preference",
  name: "Add File Sharing Preference",
  description:
    "Add a [sharing](https://support.google.com/drive/answer/7166529) permission to the sharing preferences of a file and provide a sharing URL. [See the docs](https://developers.google.com/drive/api/v3/reference/permissions/create) for more information",
  version: "0.1.0",
  type: "action",
  props: {
    googleDrive,
    drive: {
      propDefinition: [
        googleDrive,
        "watchedDrive",
      ],
      optional: true,
    },
    fileId: {
      propDefinition: [
        googleDrive,
        "fileId",
        (c) => ({
          drive: c.drive,
        }),
      ],
      optional: false,
      description: "The file to share",
    },
    role: {
      propDefinition: [
        googleDrive,
        "role",
      ],
    },
    type: {
      propDefinition: [
        googleDrive,
        "type",
      ],
    },
    domain: {
      propDefinition: [
        googleDrive,
        "domain",
      ],
    },
    emailAddress: {
      propDefinition: [
        googleDrive,
        "emailAddress",
      ],
    },
  },
  async run({ $ }) {
    const {
      fileId,
      role,
      type,
      domain,
      emailAddress,
    } = this;
    // Create the permission for the file
    await this.googleDrive.createPermission(fileId, {
      role,
      type,
      domain,
      emailAddress,
    });

    // Get the file to get the `webViewLink` sharing URL
    const resp = await this.googleDrive.getFile(this.fileId);
    const webViewLink = resp.webViewLink;
    $.export("$summary", `Successfully added a sharing permission to the file, "${resp.name}"`);
    return webViewLink;
  },
};

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 DrivegoogleDriveappThis component uses the Google Drive app.
DrivedrivestringSelect a value from the drop down menu.
FilefileIdstringSelect a value from the drop down menu.
RolerolestringSelect a value from the drop down menu:ownerorganizerfileOrganizerwritercommenterreader
TypetypestringSelect a value from the drop down menu:usergroupdomainanyone
Domaindomainstring

The domain of the G Suite organization to which this permission refers if Type is domain (e.g., yourcomapany.com)

Email AddressemailAddressstring

The email address of the user or group to which this permission refers if Type is user or group

Action Authentication

Google Drive uses OAuth authentication. When you connect your Google Drive account, Pipedream will open a popup window where you can sign into Google Drive 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 Drive API.

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

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

About Google Drive

Internet-related services and products

More Ways to Connect Google Drive + nocodb

Add Record with nocodb API on Changes to Specific Files (Shared Drive) from Google Drive API
Google Drive + nocodb
 
Try it
Add Record with nocodb API on Changes to Specific Files from Google Drive API
Google Drive + nocodb
 
Try it
Add Record with nocodb API on New or Modified Comments from Google Drive API
Google Drive + nocodb
 
Try it
Add Record with nocodb API on New or Modified Files from Google Drive API
Google Drive + nocodb
 
Try it
Add Record with nocodb API on New or Modified Folders from Google Drive API
Google Drive + nocodb
 
Try it
New Record in Table from the nocodb API

Emit new event for each new record in table. See docs here

 
Try it
New Update in Table from the nocodb API

Emit new event for each update in table. See docs here

 
Try it
Changes to Specific Files from the Google Drive API

Watches for changes to specific files, emitting an event any time a change is made to one of those files. To watch for changes to shared drive files, use the Changes to Specific Files (Shared Drive) source instead.

 
Try it
Changes to Specific Files (Shared Drive) from the Google Drive API

Watches for changes to specific files in a shared drive, emitting an event any time a change is made to one of those files

 
Try it
New Files (Instant) from the Google Drive API

Emit new event any time a new file is added in your linked Google Drive

 
Try it
Add Record with the nocodb API

This action adds a record in a table. See the docs here

 
Try it
Delete Record with the nocodb API

This action deletes a row in a table. See the docs here

 
Try it
Get Record (from row number) with the nocodb API

This action gets a row by row Id. See the docs here

 
Try it
List Records in Table Matching Criteria with the nocodb API

This action lists all rows in a table. See the docs here

 
Try it
Update Record with the nocodb API

This action updates a record in a table. See the docs here

 
Try it