with Confluent and Power Automate?
The Confluent API provides programmatic interaction with Confluent Cloud, a fully managed Kafka service. It lets you manage Kafka clusters, topics, users, and configurations, enabling seamless integration and data streaming capabilities. With Pipedream, you can create workflows that automate interactions with your Kafka infrastructure, such as triggering events on message arrival, managing topics, or integrating Kafka data with other services.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
confluent: {
type: "app",
app: "confluent",
}
},
async run({steps, $}) {
const data = {
"topic_name": `pipedream-test`,
}
return await axios($, {
method: "post",
url: `https://${this.confluent.$auth.rest_endpoint_url}/kafka/v3/clusters/${this.confluent.$auth.cluster_id}/topics`,
headers: {
"Content-Type": `application/json`,
},
auth: {
username: `${this.confluent.$auth.api_key}`,
password: `${this.confluent.$auth.api_secret}`,
},
data,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
power_automate: {
type: "app",
app: "power_automate",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments?api-version=2016-11-01`,
headers: {
Authorization: `Bearer ${this.power_automate.$auth.oauth_access_token}`,
},
})
},
})