with EspoCRM and TinyPNG?
Emit new event upon the creation, update, deletion, or changes of any field in an entity type. See the documentation
Compress a WebP, JPEG, or PNG image using the TinyPNG API. See the documentation
This component creates a new task in Espo CRM. See the documentation
Convert your images to your desired image type using TinyPNG. See the documentation
The EspoCRM API allows for robust interaction with your CRM data, enabling the automation of tasks, syncing data across platforms, and the enhancement of customer relationship management through customized workflows. By leveraging this API within Pipedream, you can design serverless workflows that react to CRM events, integrate with other services, and manipulate data to fit your business processes. Pipedream's no-code platform makes it straightforward to create, execute, and maintain these workflows, allowing you to focus on innovation rather than infrastructure.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
espocrm: {
type: "app",
app: "espocrm",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.espocrm.$auth.url}/api/v1/CurrencyRate`,
headers: {
"X-Api-Key": `${this.espocrm.$auth.api_key}`,
},
})
},
})
The TinyPNG API lets you compress and optimize image files efficiently. With this API, you can shrink the size of PNG and JPEG files without a noticeable loss in quality, making it a crucial tool for improving website load times and saving bandwidth. On Pipedream, you can automate image optimization workflows, harnessing the power of TinyPNG to process batches of images, integrate with CMS platforms, trigger optimizations from various events, and more.
module.exports = defineComponent({
props: {
tinypng: {
type: "app",
app: "tinypng",
}
},
async run({steps, $}) {
const results = await require("@pipedream/platform").axios($, {
method: "post",
url: `https://api.tinify.com/shrink`,
auth: {
username: `api:${this.tinypng.$auth.api_key}`,
password: ``,
},
data: {
"source": {
"url": "https://tinypng.com/images/panda-happy.png"
}
},
})
const retVal = results.output
retVal.original_image_metadata = results.input
return retVal
},
})