Guides

n8n

Add human review to your n8n workflows.

n8n is a workflow automation platform. This guide shows how to add human-in-the-loop review to your automated workflows using Datashift's REST API and webhooks.

What you'll build

A workflow that processes incoming leads, with human review before adding them to your CRM.

Prerequisites

Architecture

The integration uses two n8n workflows:

1. Submit Workflow

Receives data, submits to Datashift for review, then pauses.

2. Webhook Workflow

Receives the review result from Datashift and continues processing.

Step 1: Create Webhook Workflow

First, create a workflow in n8n that will receive the review result:

1

Add a Webhook node

Set method to POST and copy the webhook URL

2

Add an IF node

Check if body.data.reviews[0].result contains "approved"

3

Add your action nodes

Connect approved path to your CRM node, rejected path to notification

Step 2: Register Webhook in Datashift

Go to Settings → Webhooks in Datashift:

URLhttps://your-n8n.app.n8n.cloud/webhook/xxx
Eventstask.reviewed

Copy the signing secret — you'll use it to verify webhooks.

Step 3: Create Submit Workflow

Create a second workflow that submits tasks for review:

HTTP Request Node Configuration

MethodPOST
URLhttps://api.datashift.io/v1/task
AuthenticationHeader Auth

Headers

json
{
  "Authorization": "Bearer {{ $credentials.datashiftApiKey }}",
  "Content-Type": "application/json"
}

Body (JSON)

json
{
  "queue_key": "lead-review",
  "data": {
    "lead_id": "{{ $json.id }}",
    "company": "{{ $json.company }}",
    "email": "{{ $json.email }}",
    "source": "{{ $json.source }}"
  },
  "metadata": {
    "n8n_execution_id": "{{ $execution.id }}"
  },
  "summary": "Review new lead: {{ $json.company }}"
}

Complete Example

Here's how the complete flow looks:

Submit Workflow

Typeform TriggerEnrich with ClearbitSubmit to Datashift

Webhook Workflow

Datashift WebhookIF ApprovedAdd to HubSpot

Verifying Webhooks (Optional)

For production, add a Code node to verify the webhook signature:

javascript
const crypto = require('crypto');

const signature = $input.first().headers['x-datashift-signature'];
const timestamp = $input.first().headers['x-datashift-timestamp'];
const body = JSON.stringify($input.first().body);

const payload = `${timestamp}.${body}`;
const expected = 'sha256=' + crypto
  .createHmac('sha256', $credentials.webhookSecret)
  .update(payload)
  .digest('hex');

if (signature !== expected) {
  throw new Error('Invalid webhook signature');
}

return $input.all();

Tips

Store execution context

Include the n8n execution ID in metadata so you can correlate webhook responses with the original trigger.

Use credential nodes

Store your Datashift API key and webhook secret as n8n credentials, not hardcoded in nodes.

Handle timeouts

Reviews may take time. The webhook pattern is preferred over waiting, but you can also use the Wait node with a timeout.

Test with manual executions

Use n8n's test webhook feature to simulate Datashift callbacks during development.