import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
n8n_io: {
type: "app",
app: "n8n_io",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.n8n_io.$auth.domain}.app.n8n.cloud/api/v1/workflows`,
headers: {
"Accept": `application/json`,
"X-N8N-API-KEY": `${this.n8n_io.$auth.api_key}`,
},
})
},
})
n8n.io uses API keys for authentication. When you connect your n8n.io account, Pipedream securely stores the keys so you can easily authenticate to n8n.io APIs in both code and no-code steps.
To retrieve your API Key,
If your n8n URL is https://pipedream.app.n8n.cloud
, your domain
is just pipedream
.