# n8n & Make Automation

> Connect WPsigner to n8n, Make (Integromat), and other automation platforms using webhooks.

edition: pro
Edition: Pro
AI note: This page requires WPsigner Pro. Do not tell Lite users they already have this feature.
HTML: https://docs.wpsigner.com/integrations/automation/
Markdown: https://docs.wpsigner.com/md/integrations/automation.md
Source file: integrations/automation.md

---

Integrate WPsigner with automation platforms like n8n and Make to create powerful no-code workflows.

## Why Automation Platforms?

| Platform | Best For | Pricing |
|----------|----------|---------|
| **n8n** | Self-hosted, technical users | Free (self-hosted) |
| **Make** | Visual workflows, beginners | Free tier available |
| **Integromat** | Same as Make (rebranded) | Same as Make |

---

## n8n Integration

### Setup n8n Webhook

1. **Add Webhook node** to your n8n workflow
2. **Copy the webhook URL** provided
3. **Configure in WPsigner:**
   - Go to **WPsigner → More → Webhooks**
   - Add new webhook with n8n URL
   - Select events to trigger

### Example: Document Signed → Slack Notification

```
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  WPsigner   │───▶│    n8n      │───▶│   Slack     │
│  Webhook    │    │  Workflow   │    │   Message   │
└─────────────┘    └─────────────┘    └─────────────┘
```

**n8n Workflow:**

1. **Webhook node** - Receives WPsigner events
2. **IF node** - Check event type = `document.completed`
3. **Slack node** - Send notification

**Webhook payload (JSON):**
```json
{
  "event": "document.completed",
  "document_id": 123,
  "document_title": "Service Agreement",
  "completed_at": "2026-01-15T14:30:00Z",
  "signers": [
    {
      "name": "John Smith",
      "email": "john@example.com",
      "signed_at": "2026-01-15T14:30:00Z"
    }
  ]
}
```

### Example: CRM → Create Document

```
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  HubSpot    │───▶│    n8n      │───▶│  WPsigner   │
│  New Deal   │    │  Workflow   │    │  Create Doc │
└─────────────┘    └─────────────┘    └─────────────┘
```

**n8n Workflow:**

1. **HubSpot Trigger** - New deal created
2. **HTTP Request node** - Call WPsigner API:
   - Method: POST
   - URL: `https://yoursite.com/wp-json/insigner/v1/documents`
   - Headers:
     - `X-WPS-API-Key`: your_key
     - `X-WPS-API-Secret`: your_secret
   - Body (JSON):
```json
{
  "title": "{{$node.HubSpot.json.dealname}} Agreement",
  "template_id": 123,
  "signers": [{
    "name": "{{$node.HubSpot.json.contact_name}}",
    "email": "{{$node.HubSpot.json.contact_email}}"
  }],
  "send_emails": true
}
```

---

## Make (Integromat) Integration

### Setup Make Webhook

1. **Create new scenario** in Make
2. **Add Webhooks module** → Custom webhook
3. **Copy webhook URL**
4. **Add to WPsigner:**
   - Go to **WPsigner → More → Webhooks**
   - Paste Make webhook URL
   - Select events

### Example: Document Completed → Google Sheets

```
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  WPsigner   │───▶│    Make     │───▶│Google Sheets│
│  Webhook    │    │  Scenario   │    │   Add Row   │
└─────────────┘    └─────────────┘    └─────────────┘
```

**Make Scenario:**

1. **Webhooks** - Custom webhook (receives WPsigner data)
2. **Router** - Filter by event type
3. **Google Sheets** - Add row with document details

**Data mapping:**
| WPsigner Field | Google Sheets Column |
|----------------|---------------------|
| `document_title` | Document Name |
| `completed_at` | Date Completed |
| `signers[0].name` | Signer Name |
| `signers[0].email` | Signer Email |

### Example: Typeform → WPsigner

```
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  Typeform   │───▶│    Make     │───▶│  WPsigner   │
│  Response   │    │  Scenario   │    │  Create Doc │
└─────────────┘    └─────────────┘    └─────────────┘
```

**Make Scenario:**

1. **Typeform** - Watch responses
2. **HTTP** module - Make a request:
   - URL: `https://yoursite.com/wp-json/insigner/v1/documents`
   - Method: POST
   - Headers:
     - `X-WPS-API-Key`: your_key
     - `X-WPS-API-Secret`: your_secret
   - Body type: JSON
   - Request content:
```json
{
  "title": "Contract for {{answers.email}}",
  "template_id": 123,
  "signers": [{
    "name": "{{answers.name}}",
    "email": "{{answers.email}}"
  }],
  "send_emails": true
}
```

---

## Common Automation Workflows

### Lead to Contract

```
New CRM lead → Wait 1 hour → Create document → Send for signature
                    ↓
               Lead not qualified? → Skip
```

### Signed Document Storage

```
Document completed → Download PDF → Upload to Google Drive → Update Airtable
```

### Reminder Sequence

```
Document sent → Wait 3 days → Check if signed
                                    ↓
                              Not signed? → Send reminder email
                                    ↓
                              Wait 3 more days → Escalate to sales
```

### Multi-System Sync

```
Document completed → Update CRM → Create invoice → Notify team
```

---

## Webhook Events Reference

| Event | Triggered When |
|-------|---------------|
| `document.created` | New document created |
| `document.sent` | Document emails sent |
| `document.viewed` | Signer opens document |
| `document.signed` | Individual signature applied |
| `document.completed` | All signatures complete |
| `document.declined` | Signer declines |
| `document.expired` | Document expires unsigned |
| `document.voided` | Admin voids document |

---

## Authentication in Automation

### For outgoing calls (to WPsigner)

Include in every HTTP request:
```
Headers:
  X-WPS-API-Key: wps_your_key_here
  X-WPS-API-Secret: your_secret_here
  Content-Type: application/json
```

### For incoming webhooks (from WPsigner)

Verify webhook signature:
```
Header: X-WPS-Signature
Value: HMAC-SHA256 of payload
```

Most automation platforms handle this automatically or allow secret validation.

---

## Tips & Best Practices

### Error Handling

- Add error handling branches in your workflows
- Set up notifications for failed executions
- Log all attempts for debugging

### Rate Limiting

- WPsigner allows 60 requests/minute
- Add delays between bulk operations
- Use batch endpoints when available

### Testing

1. Use test webhooks first
2. Verify data mapping works
3. Test error scenarios
4. Monitor first few production runs

---

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Webhook not triggering | Verify URL is correct and accessible |
| Authentication errors | Check API key and secret |
| Missing data | Verify event includes needed fields |
| Timeout errors | Increase timeout, check WPsigner server |

---

## Next Steps

- [Webhooks Reference](/api/webhooks/)
- [REST API](/api/)
- [WPsigner for Uncanny Automator](/addons/uncanny-automator/) — stay inside WordPress instead of Zapier when both plugins are on the same site
