← AWeber + Google Drive integrations

Add File Sharing Preference with Google Drive API on Subscriber Added from AWeber API

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

Trigger workflow on
Subscriber Added from the AWeber 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 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 AWeber 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 Subscriber Added trigger
    1. Connect your AWeber account
    2. Configure Polling schedule
    3. Select a Account ID
  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, 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 event when a subscriber in a list is added. [See the docs here](https://api.aweber.com/#tag/Subscribers/paths/~1accounts~1{accountId}~1lists~1{listId}~1subscribers/get)
Version:0.0.2
Key:aweber-subscriber-added

AWeber Overview

The AWeber API enables you to interact with your AWeber account data and
perform actions, such as creating and updating subscribers, retrieving campaign
statistics, and managing account preferences. You can use the API to build
applications that integrate with AWeber, such as a custom subscriber management
system or a campaign reporting tool.

Trigger Code

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

export default {
  ...common,
  key: "aweber-subscriber-added",
  name: "Subscriber Added",
  description: "Emit new event when a subscriber in a list is added. [See the docs here](https://api.aweber.com/#tag/Subscribers/paths/~1accounts~1{accountId}~1lists~1{listId}~1subscribers/get)",
  type: "source",
  version: "0.0.2",
  dedupe: "unique",
  methods: {
    ...common.methods,
    getResourceFn() {
      return this.aweberApp.getSubscribersForAccount;
    },
    getResourceFnArgs(args) {
      return {
        ...args,
        accountId: this.accountId,
        params: {
          [constants.PAGINATION.OPTIONS_PROP]: "findSubscribers",
        },
      };
    },
    getSummary(resource) {
      return `Subscriber added ${resource.email}`;
    },
  },
};

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

How often to poll the AWeber API

Account IDaccountIdintegerSelect a value from the drop down menu.

Trigger Authentication

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

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

account.readlist.readlist.writesubscriber.readsubscriber.writesubscriber.read-extendedemail.reademail.write

About AWeber

Powerfully-Simple Email Marketing

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.0.4
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.0.4",
  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 + AWeber

Add Subscriber with AWeber API on Changes to Specific Files (Shared Drive) from Google Drive API
Google Drive + AWeber
 
Try it
Add Subscriber with AWeber API on Changes to Specific Files from Google Drive API
Google Drive + AWeber
 
Try it
Add Subscriber with AWeber API on New or Modified Comments from Google Drive API
Google Drive + AWeber
 
Try it
Add Subscriber with AWeber API on New or Modified Files from Google Drive API
Google Drive + AWeber
 
Try it
Add Subscriber with AWeber API on New or Modified Folders from Google Drive API
Google Drive + AWeber
 
Try it
Subscriber Added from the AWeber API

Emit new event when a subscriber in a list is added. See the 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
New or Modified Comments from the Google Drive API

Emits a new event any time a file comment is added, modified, or deleted in your linked Google Drive

 
Try it
Add Subscriber with the AWeber API

Add subscribers to the specified account and list. See the docs here.

 
Try it
Get Accounts with the AWeber API

Get a paginated collection of accounts. See the docs here.

 
Try it
Get Lists with the AWeber API

Get a paginated collection of subscriber lists. See the docs here.

 
Try it
Get Subscribers with the AWeber API

Get a paginated collection of subscribers under the specified account and list. See the docs here.

 
Try it
Add File Sharing Preference with the Google Drive API

Add a sharing permission to the sharing preferences of a file and provide a sharing URL. See the docs for more information

 
Try it