with TRIGGERcmd and Daktela?
Runs a command on a computer. Refer to the TRIGGERcmd Forum to learn more.
TRIGGERcmd is a cloud service that allows you to execute commands on your computers remotely through a REST API or via voice command with smart home integrators. With Pipedream's integration capabilities, you can create custom workflows to automate tasks across various apps and services. For instance, you could set up a serverless workflow to trigger scripts on your computer when specific events occur in other apps, such as receiving an email, a new GitHub commit, or a scheduled timer.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
triggercmd: {
type: "app",
app: "triggercmd",
}
},
async run({steps, $}) {
const data = {
"computer": `insert_computer_name_here`,
"trigger": `insert_trigger_name_here`,
}
return await axios($, {
method: "post",
url: `https://www.triggercmd.com/oauth/pipedream`,
headers: {
Authorization: `Bearer ${this.triggercmd.$auth.oauth_access_token}`,
"Content-Type": `application/json`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
daktela: {
type: "app",
app: "daktela",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.daktela.$auth.instance_url}/api/v6/whoim.json`,
params: {
accessToken: `${this.daktela.$auth.access_token}`,
},
})
},
})