Sinch MessageMedia: Business SMS & Messaging Platform
Emits an event each time a new contact is created in Zoho CRM
Emit new events each time a new module/record is created in Zoho CRM
Emits an event each time a new contact is created or updated in Zoho CRM
Converts a Lead into a Contact or an Account. See the documentation
Downloads an attachment file from Zoho CRM, saves it in the temporary file system and exports the file path for use in a future step.
import axios from "axios";
import crypto from 'crypto';
export default defineComponent({
props: {
sinch_messagemedia: {
type: "app",
app: "sinch_messagemedia",
}
},
async run({ steps, $ }) {
// Date header in RFC7231 format
const date = new Date().toUTCString();
// Signing string (No Content-MD5 needed as this is a GET request with no body)
const requestLine = 'GET /v1/messaging/numbers/sender_address/addresses/ HTTP/1.1';
const signingString = `Date: ${date}\n${requestLine}`;
// Creating HMAC-SHA1 hash
const hmac = crypto.createHmac('sha1', this.sinch_messagemedia.$auth.api_secret);
hmac.update(signingString);
// Base64 encode the hash
const signature = hmac.digest('base64');
// Prepare authentication header and make the request
const authHeader = `hmac username="${this.sinch_messagemedia.$auth.api_key}", algorithm="hmac-sha1", headers="Date request-line", signature="${signature}"`;
const response = await axios({
method: 'get',
url: `${this.sinch_messagemedia.$auth.api_url}/v1/messaging/numbers/sender_address/addresses/`,
headers: {
'Date': date,
'Authorization': authHeader,
'Accept': 'application/json'
}
});
return response.data;
},
})
The Zoho CRM API enables the manipulation and retrieval of data within Zoho CRM, a platform for managing your sales, marketing, support, and inventory in a single system. Leveraging this on Pipedream, you can automate tasks like syncing contacts, updating lead statuses, or creating custom CRM operations that trigger actions in other apps. Pipedream's serverless platform allows for real-time data processing, transforming, and orchestrating workflows that respond to events in Zoho CRM with minimal latency.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
zoho_crm: {
type: "app",
app: "zoho_crm",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.zoho_crm.$auth.api_domain}/crm/v2/users?type=CurrentUser`,
headers: {
"Authorization": `Zoho-oauthtoken ${this.zoho_crm.$auth.oauth_access_token}`,
},
})
},
})