with swiDOC and Schedule?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
swidoc: {
type: "app",
app: "swidoc",
}
},
async run({ steps, $ }) {
const data = {
"fileContent": "UEsDBBQABgAIAAAAIQDfpNJsWgEAACA...",
"metadata": {
"fileName": "2024 Amazon Bill.pdf",
"filePath": "2024/bills/Amazon",
"description": "Bill for the book 1984 by George Orwell",
"tags": [
"bill"
],
"archiveDuration": 31536000000,
"searchAttributes": [
{
"name": "Department",
"value": "Sales"
}
]
}
};
return await axios($, {
method: `POST`,
url: `https://app.swidoc.ch/api/v1/documents`,
headers: {
Authorization: `Bearer ${this.swidoc.$auth.api_key}`,
},
data
})
},
})
The Schedule app in Pipedream is a powerful tool that allows you to trigger workflows at regular intervals, ranging from every minute to once a year. This enables the automation of repetitive tasks and the scheduling of actions to occur without manual intervention. By leveraging this API, you can execute code, run integrations, and process data on a reliable schedule, all within Pipedream's serverless environment.