auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
const shortid = require('shortid')
// A recording with a topic "Test Recording" and file type MP4 becomes "test_recording-abc123.mp4"
// We append a "short ID" to avoid collisions for recordigs with the same topic name
const meetingTopic = event.meeting_topic.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase()
this.filename = `${meetingTopic}-${shortid.generate()}.${event.file_type.toLowerCase()}`
this.downloadURL = `${event.download_url}?access_token=${event.download_token}`
auths
objectThe URL of the file to upload to S3
The AWS region tied to your S3 bucket, e.g us-east-1 or us-west-2
return
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, params, auths) => {
}
const AWS = require("aws-sdk")
const fetch = require('node-fetch');
const format = require('date-fns/format')
const { accessKeyId, secretAccessKey } = auths.aws
const { Bucket, downloadURL, filename, region } = params
const s3 = new AWS.S3({
accessKeyId,
secretAccessKey,
region,
})
// Stream the data from HTTP request directly to S3.
// AWS' s3.upload method below accepts a Readable stream
// as the Body, which fetch returns by default.
// See https://github.com/aws/aws-sdk-js/issues/2100
const recordingResponse = await fetch(downloadURL)
this.s3Response = await s3.upload({
Bucket,
Key: `${format(new Date(), "yyyy/MM/dd/")}${filename}`, // Store in YYYY/MM/DD/ "dirs" to avoid name collisions
Body: recordingResponse.body,
}).promise()
this.url = this.s3Response.Location
auths
objectThe email address of the recipient.
The subject line of your email.
The email address of the sender.
The email address to which responses will be sent.
return
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, params, auths) => {
}
const axios = require('axios')
return await require("@pipedreamhq/platform").axios(this, {
url: `https://api.sendgrid.com/v3/mail/send`,
headers: {
Authorization: `Bearer ${auths.sendgrid.api_key}`,
},
method: 'POST',
data: {
"personalizations": [{
"to": [{
"email": params.to_email,
"name": params.to_name
}],
"subject": params.subject,
"headers": params.headers,
"substitutions": params.substitutions,
"custom_args": params.custom_args,
"send_at": params.send_at
}],
"from": {
"email": params.from_email,
"name": params.from_name
},
"reply_to": {
"email": params.reply_to_email,
"name": params.reply_to_name
},
"content": [{
"type": "text/plain",
"value": `Recording URL: ${steps.upload_recording_to_amazon_s3.s3Response.Location}`
}],
"template_id": params.template_id,
"sections": params.sections,
"categories": params.categories,
"batch_id": params.batch_id,
"ip_pool_name": params.ip_pool_name
}
})
The meeting ID or UUID
The recording delete action. trash: Move recording to the trash. delete: Delete recording permanently
async
(params, auths) => {
}
const axios = require("axios")
// See the API docs: https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/recordingdelete
const config = {
method: "DELETE",
url: `https://api.zoom.us/v2/meetings/${params.meetingId}/recordings`,
params: {
action: params.action,
},
headers: {
Authorization: `Bearer ${auths.zoom_admin.oauth_access_token}`,
"Content-Type": "application/json"
}
}
// A 204 response indicates the recording was successfully deleted
return await axios(config)