with Livespace and Firmao?
Emit new event when a new customer is created. See the documentation
import { axios } from "@pipedream/platform";
import crypto from "crypto";
export default defineComponent({
props: {
livespace: {
type: "app",
app: "livespace",
}
},
async run({steps, $}) {
const concatenatedString = this.livespace.$auth.api_key
+ this.livespace.$auth.token
+ this.livespace.$auth.api_secret;
const sha1Hash = crypto.createHash('sha1')
.update(concatenatedString)
.digest('hex');
const data = {
"_api_auth": `key`,
"_api_key": `${this.livespace.$auth.api_key}`,
"_api_sha": `${sha1Hash}`,
"_api_session": `${this.livespace.$auth.session_id}`,
}
return await axios($, {
method: "post",
url: `https://${this.livespace.$auth.subdomain}.livespace.io/api/public/json/Default/User_getInfo`,
data,
})
},
})
The Firmao API allows for the integration of Firmao's CRM and ERP features into Pipedream's serverless platform, enabling the automation of tasks such as managing contacts, projects, tasks, invoices, and timesheets. By leveraging Pipedream's capabilities, users can create custom workflows that respond to events in Firmao, or orchestrate actions between Firmao and other apps to streamline business processes.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
firmao: {
type: "app",
app: "firmao",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://system.firmao.net/${this.firmao.$auth.organization_id}/svc/v1/contacts`,
auth: {
username: `${this.firmao.$auth.api_login}`,
password: `${this.firmao.$auth.api_password}`,
},
})
},
})