with Zendesk Sell and Peach?
Emit new event when a new contact is created in Zendesk Sell.
Emit new event when a new deal is created in Zendesk Sell.
Emit new event when a new lead is created in Zendesk Sell.
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    zendesk_sell: {
      type: "app",
      app: "zendesk_sell",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api.getbase.com/v2/users/self`,
      headers: {
        Authorization: `Bearer ${this.zendesk_sell.$auth.oauth_access_token}`,
        "accept": `application/json`,
      },
    })
  },
})
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    peach: {
      type: "app",
      app: "peach",
    }
  },
  async run({steps, $}) {
    const data = {
      "name": `John Smith`,
      "phone_number": `+919876543210`,
      "email": `john.smith@example.com`,
    }
    return await axios($, {
      method: "post",
      url: `https://app.trypeach.io/api/v1/contacts`,
      headers: {
        "Authorization": `${this.peach.$auth.api_token}`,
      },
      data,
    })
  },
})