🎉 Pipedream raises $20M Series A 🎉
Read the blog post and TC Techcrunch article.
← Dropbox + Eventbrite integrations

Get Event Attendees with Eventbrite APIon New File from Dropbox API

Pipedream makes it easy to connect APIs for Eventbrite, Dropbox and 700+ other apps remarkably fast.

Trigger workflow on
New File from the Dropbox API
Next, do this
Get Event Attendees with the Eventbrite 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 Dropbox trigger and Eventbrite 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 File trigger
    1. Connect your Dropbox account
    2. Select a Path
    3. Configure Recursive
    4. Configure dropboxApphook
    5. Configure Include Media Info
    6. Configure Include Link
  3. Configure the Get Event Attendees action
    1. Connect your Eventbrite account
    2. Configure Event ID
  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 new file is added to your account or a specific folder. Make sure the number of files/folders in the watched folder does not exceed 4000.
Version:0.0.5
Key:dropbox-new-file

Trigger Code

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

export default {
  ...common,
  dedupe: "unique",
  type: "source",
  key: "dropbox-new-file",
  name: "New File",
  version: "0.0.5",
  description: "Emit new event when a new file is added to your account or a specific folder. Make sure the number of files/folders in the watched folder does not exceed 4000.",
  props: {
    ...common.props,
    includeMediaInfo: {
      label: "Include Media Info",
      type: "boolean",
      description: "Emit media info for photos and videos (incurs an additional API call)",
      default: false,
    },
    includeLink: {
      label: "Include Link",
      type: "boolean",
      description: "Emit temporary download link to file (incurs an additional API call)",
      default: false,
    },
  },
  hooks: {
    async activate() {
      const startTime = new Date();
      await this.dropbox.initState(this);
      this._setLastFileModTime(startTime);
    },
  },
  methods: {
    ...common.methods,
    _setLastFileModTime(time) {
      this.db.set("last_file_mod_time", time);
    },
    _getLastFileModTime() {
      return this.db.get("last_file_mod_time");
    },
  },
  async run() {
    const lastFileModTime = this._getLastFileModTime();
    let currFileModTime = "";
    const updates = await this.dropbox.getUpdates(this);
    for (let update of updates) {
      if (update[".tag"] == "file") {
        if (update.server_modified > currFileModTime) {
          currFileModTime = update.server_modified;
        }
        try {
          const dpx = await this.dropbox.sdk();
          let revisions = await dpx.filesListRevisions({
            path: update.id,
            mode: {
              ".tag": "id",
            },
            limit: 10,
          });
          if (revisions.result) {
            revisions = revisions.result;
          }
          if (revisions.entries.length > 1) {
            const oldest = revisions.entries.pop();
            if (lastFileModTime && lastFileModTime >= oldest.client_modified) {
              continue;
            }
          }
          if (this.includeMediaInfo) {
            const dpx = await this.dropbox.sdk();
            update = await dpx.filesGetMetadata({
              path: update.path_lower,
              include_media_info: true,
            });
            if (update.result) {
              update = update.result;
            }
          }
          if (this.includeLink) {
            const dpx = await this.dropbox.sdk();
            let response = await dpx.filesGetTemporaryLink({
              path: update.path_lower,
            });
            if (response.result) {
              response = response.result;
            }
            const { link } = response;
            update.link = link;
          }
        } catch (err) {
          console.log(err);
          throw `Error looking up revisions for file: ${update.name}`;
        }
        this.$emit(update, this.getMeta(update.id, update.path_display));
      }
    }
    if (currFileModTime != "") {
      this._setLastFileModTime(currFileModTime);
    }
  },
};

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

Also watch sub-directories and their contents.

dropboxApphook$.interface.apphook
Include Media InfoincludeMediaInfoboolean

Emit media info for photos and videos (incurs an additional API call)

Include LinkincludeLinkboolean

Emit temporary download link to file (incurs an additional API call)

Trigger Authentication

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

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

About Dropbox

Dropbox gives you secure access to all your files. Collaborate with friends, family, and coworkers from any device.

Action

Description:Get event attendees for a specified event.
Version:0.0.1
Key:eventbrite-get-event-attendees

Action Code

const eventbrite = require("../../eventbrite.app");

module.exports = {
  key: "eventbrite-get-event-attendees",
  name: "Get Event Attendees",
  description: "Get event attendees for a specified event.",
  version: "0.0.1",
  type: "action",
  props: {
    eventbrite,
    eventId: {
      propDefinition: [
        eventbrite,
        "eventId",
      ],
    },
  },
  methods: {
    async *attendeeStream(params = {}) {
      let hasMoreItems;
      do {
        const {
          attendees,
          pagination = {},
        } = await this.eventbrite.getEventAttendees(this.eventId, params);
        for (const attendee of attendees) {
          yield attendee;
        }

        hasMoreItems = !!pagination.has_more_items;
        params.continuation = pagination.continuation;
      } while (hasMoreItems);
    },
  },
  async run() {
    const attendeeStream = await this.attendeeStream();
    const attendees = [];
    for await (const attendee of attendeeStream) {
      attendees.push(attendee);
    }
    return attendees;
  },
};

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
EventbriteeventbriteappThis component uses the Eventbrite app.
Event IDeventIdinteger

Enter the ID of an event

Action Authentication

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

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

More Ways to Connect Eventbrite + Dropbox

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."
@heyellieday