with Odoo and Hippo Video?
Emit new event when any of the selected events are triggered.
Sends a personalization request for a specified video. See the documentation
import xmlrpc from 'xmlrpc';
export default defineComponent({
props: {
odoo: {
type: "app",
app: "odoo",
}
},
async run({ steps, $ }) {
const url = this.odoo.$auth.server_url;
const db = this.odoo.$auth.db;
const username = this.odoo.$auth.username;
const password = this.odoo.$auth.password;
// Create clients for common and object endpoints
const common = xmlrpc.createSecureClient(`${url}/xmlrpc/2/common`);
const models = xmlrpc.createSecureClient(`${url}/xmlrpc/2/object`);
// Using async/await with promises
async function getFields() {
try {
// Authenticate and get uid
const uid = await new Promise((resolve, reject) => {
common.methodCall('authenticate', [db, username, password, {}], (error, value) => {
if (error) reject(error);
resolve(value);
});
});
// Get fields
const results = await new Promise((resolve, reject) => {
models.methodCall('execute_kw', [
db,
uid,
password,
'res.partner',
'fields_get',
[],
{ 'attributes': ['string', 'help', 'type'] }
], (error, value) => {
if (error) reject(error);
resolve(value);
});
});
return results;
} catch (error) {
throw new Error(error);
}
}
return await getFields();
},
})
The Hippo Video API lets you harness the power of video in your business processes. Through Pipedream, you can automate video creation, management, and distribution workflows. This means you can trigger actions in Hippo Video based on events from other apps, or use Hippo Video events to kick off processes elsewhere. Whether it's automating video emails in your CRM, monitoring video analytics, or managing video content at scale, Pipedream's serverless platform empowers you to build and run workflows seamlessly.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
hippo_video: {
type: "app",
app: "hippo_video",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.hippovideo.io/api/v1/me/videos/list`,
params: {
email: `${this.hippo_video.$auth.email}`,
api_key: `${this.hippo_video.$auth.api_key}`,
},
})
},
})