The pCloud API allows for direct interaction with your pCloud account, providing access to files and folders within your cloud storage. With Pipedream, you can automate file management tasks such as uploading, downloading, and synchronizing files. Additionally, you can create workflows to organize your cloud storage, share files with team members, or back up important data from various sources.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
pcloud: {
type: "app",
app: "pcloud",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.pcloud.$auth.hostname}/userinfo`,
headers: {
Authorization: `Bearer ${this.pcloud.$auth.oauth_access_token}`,
},
})
},
})
Automated Backup from GitHub to pCloud: Upon a new GitHub release, Pipedream can trigger a workflow that archives the repository and uploads the zip file to a designated pCloud folder. This ensures your codebase is backed up at every significant milestone.
Image Sync with Social Media: When a new photo is posted to your Instagram account, Pipedream can automatically save a copy to a specific pCloud album. This workflow keeps a cloud backup of your social media imagery without manual intervention.
Receipt Collection from Email: Pipedream can monitor your email inbox for messages containing receipts and save the attachments directly to a pCloud folder. This can be particularly useful for expense tracking and reporting.
Emit new event when a file is created or modified in the specified folder.
pCloud uses OAuth authentication. When you connect your pCloud account, Pipedream will open a popup window where you can sign into pCloud and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any pCloud API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://my.pcloud.com/oauth2/authorize
?
client_id={{custom_fields.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
permissions=manageshares
POST
https://{{custom_fields.hostname}}/oauth2_token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
code={{oauth.code}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code