The n8n.io API provides a platform for automating workflows in a node-based structure that allows for integrations across various services and apps. Leveraging this API within Pipedream enables you to orchestrate complex operations, connect disparate systems, and trigger actions conditionally, transforming and passing data between services without writing extensive code.
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}`,
},
})
},
})
Automated Data Sync Between n8n and Google Sheets: Use the n8n.io API to fetch data from a specific workflow run and sync it to a Google Sheet for easy monitoring and reporting. This can be triggered at regular intervals or upon specific workflow events.
Conditional Alerting with n8n and Slack: Set up a Pipedream workflow that calls the n8n.io API to monitor the status of workflows. If a workflow fails or produces an unexpected result, send an alert with details to a designated Slack channel, ensuring immediate team response.
Dynamic Workflow Trigger Based on GitHub Events: Create a Pipedream workflow that listens for GitHub events, such as a new push or pull request. Once an event is detected, use the n8n.io API to trigger specific n8n workflows that perform tasks like code linting or automated testing.
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
.