PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.32k stars 5.27k forks source link

[ACTION] Zoom Admin - List Webinar participants report #5698

Closed vunguyenhung closed 1 year ago

vunguyenhung commented 1 year ago

Is there a specific app this action is for? Zoom Admin

Note that this action is for Zoom Admin app with the admin scope.

Please provide a link to the relevant API docs for the specific service / operation. https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/reportWebinarParticipants

vellames commented 1 year ago

Hey @dannyroosevelt. We need a paid account here :) https://pipedream-users.slack.com/archives/G01J50YGJGP/p1678880420018919

turvak commented 1 year ago

I was the OP on this and have a paid account. Can I help? Most report API's need the admin access which you have as an APP the code should transfer from https://github.com/PipedreamHQ/pipedream/issues/5585 Let me what I can do to get this across the line.

dannyroosevelt commented 1 year ago

@vellames do you need a paid account to finish coding the action? Or specifically what do you need?

vellames commented 1 year ago

Hey. Yep! I need a paid account :)

turvak commented 1 year ago

I have a paid account. How can I help?

On Thu, 23 Mar 2023, 1:41 am vellames, @.***> wrote:

Hey. Yep! I need a paid account :)

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/issues/5698#issuecomment-1479503943, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVM5DJOLALOCUAMCYNC46E3W5LXPZANCNFSM6AAAAAAVYRGETA . You are receiving this because you commented.Message ID: @.***>

suhassangangire commented 1 year ago

dannyroosevelt commented 1 year ago

@turvak to confirm, you're looking to list webinar participants for Zoom, is that right?

If so, can you try pasting this code into a code step and let me know if it works?

import { axios } from "@pipedream/platform";

export default defineComponent({
  props: {
    zoom: {
      type: "app",
      app: "zoom",
    },
    webinar: {
      type: "string",
      label: "Webinar",
      description: "Select a webinar to list its participants",
      async options(opts) {
        const response = await axios(this, {
          method: "GET",
          url: `https://api.zoom.us/v2/users/me/webinars`,
          headers: {
            Authorization: `Bearer ${this.zoom.$auth.oauth_access_token}`,
          },
        });
        return response.webinars.map((webinar) => {
          return { label: webinar.topic, value: webinar.id };
        });
      },
    },
  },
  async run({ steps, $ }) {
    return await axios($, {
      method: "GET",
      url: `https://api.zoom.us/v2/webinars/${this.webinar}/participants`,
      headers: {
        Authorization: `Bearer ${this.zoom.$auth.oauth_access_token}`,
      },
    });
  },
});
vellames commented 1 year ago

The original method requested is no longer available, looks like this is the new endpoint https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/listWebinarParticipants

@turvak I am developing a new action pointing to this endpoint. I will let you know when published. I will need your help to check if everything will work fine

turvak commented 1 year ago

Okay great I also got that error message. Keep me posted. I'm happy to help with my admin account.

Error - Request failed with status code 404 {"code":2300,"message":"This API endpoint is not recognized."}

DETAILS at null.createError @. /node_modules/axios/lib/core/createError.js:16:15) at null.settle @. /node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd @.*** /node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (events.js:412:35) at null.endReadableNT (internal/streams/readable.js:1333:12) at process.processTicksAndRejections (internal/process/task_queues.js:82:21)

On Sat, 6 May 2023 at 06:52, vellames @.***> wrote:

The original method requested is no longer available, looks like this is the new endpoint https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/listWebinarParticipants

@turvak https://github.com/turvak I am developing a new action pointing to this endpoint. I will let you know when published. I will need your help to check if everything will work fine

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/issues/5698#issuecomment-1536645454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVM5DJMXXYRKTJTSF53IZBDXEVD7NANCNFSM6AAAAAAVYRGETA . You are receiving this because you were mentioned.Message ID: @.***>

vellames commented 1 year ago

Hey @turvak. We just published the new component. Please let me know if this is working for you. Thanks and sorry for the delay

turvak commented 1 year ago

I receive this error:

TypeError Cannot read property 'zoomAdmin' of undefined

DETAILS at Object.run (file:///tmp/pdg/dist/code/f7f3a8e7b12d95c088e378dd2b38a1c6ee245a9aed37fe070f18fbae2be20435/code/actions/list-webinar-participants/list-webinar-participants.mjs:31:32) at global.executeComponent (/var/task/launch_worker.js:139:53) at MessagePort.messageHandler (/var/task/launch_worker.js:598:28)

vellames commented 1 year ago

Hi there @turvak. Okay. I will send a new version in some minutes

vellames commented 1 year ago

Please check #6422 with the bugfix. I will inform you as soon as it is merged

vellames commented 1 year ago

@turvak The fix was merged, could you please update your action and try again?

turvak commented 1 year ago

now i get this error. I can see the webinars in the list and any I choose return this error when testing:

Error - Request failed with status code 404 {"code":3001,"message":"Meeting does not exist: [object Object]."}

DETAILS at null.createError (/tmp/pdg/dist/code/0734594e4ab74009141582e835eea2478657d274626337d1b066cafa6eb59d4f/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/createError.js:16:15) at null.settle (/tmp/pdg/dist/code/0734594e4ab74009141582e835eea2478657d274626337d1b066cafa6eb59d4f/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/tmp/pdg/dist/code/0734594e4ab74009141582e835eea2478657d274626337d1b066cafa6eb59d4f/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (events.js:412:35) at null.endReadableNT (internal/streams/readable.js:1333:12) at process.processTicksAndRejections (internal/process/task_queues.js:82:21)

vellames commented 1 year ago

Humm, strange. I will investigate

vellames commented 1 year ago

Hey @turvak , just a question. What happens if you run the action alone? Looks like this error is related to another thing

turvak commented 1 year ago

I've set it to allow support - here is the workflow @.***/pipedream-test-p_QPC729R/inspect

On Fri, 12 May 2023 at 23:55, vellames @.***> wrote:

@turvak https://github.com/turvak Could you please share your workflow with me?

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/issues/5698#issuecomment-1545626087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVM5DJP3PPBEZJPS3ZFVFQLXFYQJTANCNFSM6AAAAAAVYRGETA . You are receiving this because you were mentioned.Message ID: @.***>

vellames commented 1 year ago

@turvak Could you please test the action in a new workflow only with this new action?

vellames commented 1 year ago

@turvak A final PR with the fix is under review right now, it is tested, and it will close this card. You can check the evidence of the test in the PR. Thanks for your patience!

vellames commented 1 year ago

@turvak PR is merged

turvak commented 12 months ago

YES! It works!

Awesome stuff. Now time to apply it to my use case then upgrade my account.

You rock.

On Thu, 18 May 2023 at 02:08, vellames @.***> wrote:

@turvak https://github.com/turvak PR is merged

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/issues/5698#issuecomment-1551467463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVM5DJJP52AX2HTOQIW4ZLDXGTLV7ANCNFSM6AAAAAAVYRGETA . You are receiving this because you were mentioned.Message ID: @.***>

turvak commented 12 months ago

I guess there are 3 follow-up questions.

  1. You are not returning all the data. Very important is the join and leave time for each participant so the duration of attendance can be added.
  2. Max page size is 300, how does this work with attendance over that? How does paging work? We have often 350 to 400 attendees.
  3. How can this array be fed into a Google sheet?

Thanks again. I'll add this into the general chat in Slack.

On Thu, 18 May 2023 at 12:04, Marc Turner @.***> wrote:

YES! It works!

Awesome stuff. Now time to apply it to my use case then upgrade my account.

You rock.

On Thu, 18 May 2023 at 02:08, vellames @.***> wrote:

@turvak https://github.com/turvak PR is merged

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/issues/5698#issuecomment-1551467463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVM5DJJP52AX2HTOQIW4ZLDXGTLV7ANCNFSM6AAAAAAVYRGETA . You are receiving this because you were mentioned.Message ID: @.***>

vellames commented 12 months ago

Hi there!

Humm, I am doing the pagination internally, so I am returning all the data. If you have 1000 attendees, I will paginate that for you and you gonna see an array with 1000 values. If you want to use this data, you can get the data as a variable. You can access it by doing something like steps.list_webinar_participants.$return_value

Notice that list_webinar_participants is the name of your step, this is the default name, If you changed the name, you need to change it here as well

turvak commented 12 months ago

Sounds great - so for these edits to the step, should I use a custom code step instead? I can try that out. I'm okay at reverse engineering most code but I'm definitely not able to make up most of this stuff. Pretty much why I'm going to be using this product :)

On Fri, 19 May 2023 at 04:42, vellames @.***> wrote:

Hi there!

Humm, I am doing the pagination internally, so I think I am returning all the data. If you have 1000 attendees, I will paginate that for you and you gonna see an array with 1000 values. If you want to use this data, you can get the data as a variable. You can access it by doing something like steps.list_webinar_participants.$return_value

Notice that list_webinar_participants is the name of your step, this is the default name, If you changed the name, you need to change it here as well

— Reply to this email directly, view it on GitHub https://github.com/PipedreamHQ/pipedream/issues/5698#issuecomment-1553327498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVM5DJOJYT7CCH53V7OELNDXGZGQPANCNFSM6AAAAAAVYRGETA . You are receiving this because you were mentioned.Message ID: @.***>

dannyroosevelt commented 12 months ago

Hey @turvak glad we were able to get you unblocked!

I recommend checking out one of our community forums for help getting the rest of your workflow activated -- we have an active community of users and employees who monitor those channels more closely.