> ## Documentation Index
> Fetch the complete documentation index at: https://docs.helloleo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n Integration

> Connect HelloLeo to your n8n workflow automation platform

Connect HelloLeo to your n8n instance to trigger workflows, execute automations, and integrate with your n8n workflows.

## Setup

1. Go to **Project Settings** → **Project Integrations**
2. Select **n8n** from the list
3. Enter your credentials:
   * **API Url** - Your n8n instance API URL (e.g., `https://your-n8n-instance.com`)
   * **API Key** - Your n8n API key
4. Test the connection
5. Start using n8n in your prompts

## How It Works

HelloLeo connects to your n8n instance using the n8n API. Your API URL and API key are encrypted and stored securely on the backend.

## Common Operations

With n8n integration, you can:

* **Trigger workflows** - Execute n8n workflows programmatically
* **Manage workflows** - Create, update, and manage workflow definitions
* **Monitor executions** - Check workflow execution status and results
* **Handle webhooks** - Work with n8n webhook nodes
* **Automate tasks** - Integrate n8n automations into your applications

## Example Usage

### Trigger Workflow

```
Trigger my n8n workflow "Send Welcome Email" with parameters 
email: "user@example.com" and name: "John Doe".
```

### Execute Automation

```
Run the n8n workflow "Process Order" when a new order is created.
```

### Check Workflow Status

```
Check the status of the last execution of workflow "Daily Report".
```

### Create Workflow

```
Create a new n8n workflow that sends a notification when a new 
user signs up.
```

## Best Practices

* **Specify workflow names** - Always mention which n8n workflow you want to use
* **Mention the integration** - Always say "from n8n" or "to n8n" so Leo knows which integration to use
* **Workflow parameters** - Clearly specify any parameters your workflows need
* **Error handling** - Consider how to handle workflow execution errors

## Troubleshooting

### Connection Issues

* **Check API URL** - Verify your n8n instance URL is correct and accessible
* **Check API key** - Ensure your n8n API key is valid
* **Network access** - Verify your n8n instance is accessible from the internet (if needed)

### Workflow Not Triggering

* **Workflow name** - Verify the workflow name or ID is correct
* **Workflow status** - Ensure the workflow is active
* **API permissions** - Check that your API key has permission to execute workflows

### Execution Errors

* **Workflow configuration** - Review workflow node configurations
* **Parameters** - Verify all required parameters are provided
* **Logs** - Check n8n execution logs for detailed error messages

<CardGroup cols={2}>
  <Card title="Working with Integrations" icon="plug" href="/integrations/working-with-integrations">
    Learn how to use integrations effectively
  </Card>

  <Card title="Network Monitor" icon="activity" href="/features/network-monitor">
    Debug n8n API calls
  </Card>
</CardGroup>
