This topic was automatically generated from Slack. You can find the original thread here.
I need a step to get the Zoom meeting passcode of a new Zoom meeting recording as a trigger.
This topic was automatically generated from Slack. You can find the original thread here.
I need a step to get the Zoom meeting passcode of a new Zoom meeting recording as a trigger.
To achieve your goal of getting the Zoom meeting passcode when a new Zoom meeting recording is completed, you can use the “Recording Completed (Instant)” trigger from the Zoom app in Pipedream. Here are the steps to set this up: ## Using the Zoom Recording Completed (Instant) Trigger 1. Search for the Zoom app from the trigger menu: - In your Pipedream workflow, click on the “+” button to add a new trigger. - Search for “Zoom” in the trigger menu. 2. Select the Recording Completed (Instant) trigger: - Choose the “Recording Completed (Instant)” trigger from the list. 3. Connect your Zoom account: - Follow the prompts to connect your Zoom account to Pipedream. 4. Configure the trigger: - Follow the instructions on the trigger configuration screen. You may need to generate a test event from Zoom to get real data to test your workflow. 5. Add a step to get the meeting passcode: - After setting up the trigger, add a new step to your workflow to retrieve the meeting passcode. You can use a custom code step to achieve this. Here is an example of a Pipedream component that retrieves the meeting passcode: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { zoom: { type: “app”, app: “zoom”, }, }, async run({ steps, $ }) { const recording = steps.trigger.event; const meetingId = recording.payload.object.id; const response = await axios($, { url: https://api.zoom.us/v2/meetings/${meetingId}
, headers: { Authorization: Bearer ${this.zoom.$auth.oauth_access_token}
, }, }); const passcode = response.password; return passcode; }, });
I can’t pull the passcode using the JS code above. Can you provide a Python code to get the passcode of a new zoom recording
To help you retrieve the passcode of a new Zoom recording using Python, you can use the Zoom API. Below is an example of how you can achieve this using a Pipedream component in Python: 1. First, ensure you have connected your Zoom account to Pipedream. 2. Use the following Python code in a Pipedream component to make an API request to Zoom to get the recording details, including the passcode. Here’s an example Pipedream component in Python: def handler(pd: "pipedream"): import requests # Define the Zoom API endpoint for getting recording details recording_id = "YOUR_RECORDING_ID" # Replace with your actual recording ID url = f"https://api.zoom.us/v2/meetings/{recording_id}/recordings" # Make the API request to Zoom response = requests.get( url, headers={ "Authorization": f"Bearer {pd.inputs['zoom']['$auth']['oauth_access_token']}" } ) # Check if the request was successful if response.status_code == 200: recording_details = response.json() passcode = recording_details.get("password", "No passcode found") return {"passcode": passcode} else: return {"error": response.json()}
### Steps to use the code: 1. Replace YOUR_RECORDING_ID
with the actual recording ID you want to retrieve the passcode for. 2. Ensure that the Zoom account is connected and authorized in Pipedream. 3. Run the component to get the passcode of the specified recording. This code makes a GET request to the Zoom API to fetch the recording details for a specific meeting and extracts the passcode from the response. If the passcode is not found, it returns a message indicating that no passcode was found.
is there any step I can use to download the actual mp4 file of a new Zoom recording?
To download the actual MP4 file of a new Zoom recording, you can use the “Recording Completed (Instant)” trigger from the Zoom app in Pipedream. This trigger will fire when a new recording is completed, and you can then use a code step to download the MP4 file to the /tmp
directory of your workflow. Here’s a step-by-step guide on how to set this up: 1. Search for the Zoom app from the trigger menu: - Select the “Recording Completed (Instant)” trigger. - Connect your Zoom account. - Follow the instructions on the trigger configuration screen. You may need to generate a test event from Zoom to get real data to test your workflow. 2. Add a code step to download the MP4 file: - Use the following code to download the MP4 file to the /tmp
directory: import { axios } from "@pipedream/platform"; import fs from 'fs'; export default defineComponent({ props: { zoom: { type: "app", app: "zoom", }, }, async run({ steps, $ }) { // Replace with the actual download URL from the Zoom recording event const downloadUrl = steps.trigger.event.recording_files.find(file => file.file_extension === 'MP4').download_url; // Add the access token to the download URL const url = `${downloadUrl}?access_token=${this.zoom.$auth.oauth_access_token}`; // Download the file to /tmp/recording.mp4 const response = await axios($, { url, responseType: 'stream', }); const path = '/tmp/recording.mp4'; const writer = fs.createWriteStream(path); response.data.pipe(writer); return new Promise((resolve, reject) => { writer.on('finish', resolve); writer.on('error', reject); }); }, });
This code will: - Find the MP4 file from the Zoom recording event. - Construct the download URL with the access token. - Download the file and save it to the /tmp/recording.mp4
path. Make sure to replace the placeholder for the download URL with the actual URL from the Zoom recording event. If you need further assistance or run into any issues, please visit [Support - Pipedream](https://pipedream.com
can I use a python code to download the mp4 file of a new zoom recroding
Yes, you can use Python code to download the MP4 file of a new Zoom recording in a Pipedream workflow. Here’s a step-by-step guide on how to achieve this: 1. Set up a Zoom trigger: Use the “Recording Completed (Instant)” trigger to detect when a new recording is available. 2. Run Python code: Use the “Run Python Code” action to download the MP4 file. ### Step 1: Set up the Zoom trigger 1. Search for the Zoom app from the trigger menu. 2. Select the “Recording Completed (Instant)” trigger. 3. Connect your Zoom account. 4. Follow the instructions on the trigger configuration screen. You may need to generate a test event from Zoom to get real data to test your workflow. ### Step 2: Run Python code to download the MP4 file Here’s an example of the Python code you can use to download the MP4 file: import requests def handler(pd: "pipedream"): # Get the download URL from the Zoom event download_url = pd.steps["trigger"]["event"]["recording_files"][0]["download_url"] access_token = pd.inputs["zoom"]["$auth"]["oauth_access_token"] # Set up the headers for the request headers = { "Authorization": f"Bearer {access_token}" } # Make the request to download the MP4 file response = requests.get(download_url, headers=headers) # Save the file to /tmp directory with open("/tmp/zoom_recording.mp4", "wb") as f: f.write(response.content) return {"message": "File downloaded successfully"}
### Explanation - Trigger: The “Recording Completed (Instant)” trigger will fire when a new recording is completed. - Python Code: The Python code will: - Extract the download URL from the Zoom event. - Use the OAuth access token to authenticate the request. - Download the MP4 file and save it to the /tmp
directory. ### Using the Zoom app Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars. For more details, visit Zoom’s Pipedream documentation. ### Using the Python app Anything you can do in Python can be done in a