with Swapcard Exhibitor and LiveSwitch?
Emit new event when a new connection is formed (new lead).
Create a conversation in LiveSwitch See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
swapcard_exhibitor: {
type: "app",
app: "swapcard_exhibitor",
}
},
async run({steps, $}) {
const data = {
"query": "query TestQuery { __typename }"
}
return await axios($, {
method: "post",
url: `https://developer.swapcard.com/exhibitor/graphql`,
headers: {
"Authorization": `${this.swapcard_exhibitor.$auth.api_key}`,
"x-apollo-operation-name": `TestQuery`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
liveswitch: {
type: "app",
app: "liveswitch",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://public-api.production.liveswitch.com/v1/me`,
headers: {
Authorization: `Bearer ${this.liveswitch.$auth.oauth_access_token}`,
},
})
},
})