@php $isConnected = $connection && $connection->status; $baseUrl = $baseUrl ?? rtrim((string) config('app.url'), '/') . '/api/v1'; $selected = $selected ?? []; @endphp
{{ __('More / Automation') }}
n8n {{ __('automation') }}
@if ($isConnected) {{ __('Connected') }} @else {{ __('Not connected') }} @endif {{ __('Webhooks') }} {{ __('API keys') }}
@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif
{{ __('How it works') }}

{{ __('Connect your own n8n — automate with 400+ apps') }}

{{ __('Triggers') }}

{{ __(':brand sends events (new message, new contact, campaign updates) to your n8n workflow in real time.', ['brand' => brand_name()]) }}

{{ __('Actions') }}

{{ __('Your n8n workflow calls back into :brand over the REST API to send messages, add contacts, start campaigns and more.', ['brand' => brand_name()]) }}

{{ __('Bring your own n8n') }}
{{ __('Self-hosted or n8n Cloud') }}

{{ __('n8n is a separate product with its own licence. Connect the n8n instance you run — nothing to install here.') }}

{{ __('Get n8n') }}
{{ __('Step 1') }}

{{ __('Send events to n8n') }}

@if ($isConnected)
{{ __('Last fired') }}: {{ $connection->last_fired_at ? $connection->last_fired_at->diffForHumans() : __('never') }} @if ($connection->last_status_code) · HTTP {{ $connection->last_status_code }} @endif
@endif
@csrf

{{ __('In n8n, add a Webhook node and copy its Production URL here.') }}

@foreach ($events as $key => $label) @endforeach
@if ($isConnected) @endif
@if ($isConnected)
{{ __('Stop sending events to this n8n instance.') }}
@csrf @method('DELETE')
@endif
{{ __('Step 2') }}

{{ __('Let n8n act back on :brand', ['brand' => brand_name()]) }}

{{ __('Add an HTTP Request node in n8n (or the credential) using this base URL and your API key.') }}

{{ __('Base URL') }}
{{ $baseUrl }}
{{ __('Auth header') }}
Authorization: Bearer <key>
{{ __('API key') }}
@if ($hasApiKey)
{{ __('Key active') }} {{ $apiKeyPrefix }}…

{{ __('Use this workspace key in your n8n credential. Manage or rotate it on the API keys page.') }}

@else
{{ __('No key yet') }}

{{ __('Create a workspace API key so n8n can call back. It is shown once on creation.') }}

@endif {{ $hasApiKey ? __('Manage keys') : __('Create API key') }}
{{ __('Popular actions') }}
@foreach ([ ['POST', '/messages', __('Send a message')], ['POST', '/contacts', __('Create a contact')], ['POST', '/templates/{id}/send', __('Send a template')], ['POST', '/flows/{id}/enroll', __('Enroll in a flow')], ['POST', '/broadcasts', __('Start a broadcast')], ['POST', '/campaigns', __('Start a campaign')], ] as $act)
{{ $act[0] }} /api/v1{{ $act[1] }} {{ $act[2] }}
@endforeach
{{ __('Recipe — n8n HTTP Request node') }}
Method  POST
URL     {{ $baseUrl }}/messages
Header Authorization: Bearer <your key>
Header Content-Type: application/json
Body (JSON)
{
  "to": "919812345678",
  "type": "text",
  "text": "Hello from your n8n workflow"
}

{{ __('Add an HTTP Request node in n8n with these settings, then map the number and text from your trigger.') }}

{{ __('Optional') }}

{{ __('Open n8n inside :brand', ['brand' => brand_name()]) }}

{{ __('Embed your own n8n editor here so you can build flows without leaving the app.') }}

@if ($editorUrl) {{ __('Open in new tab') }} @endif
@csrf
@if ($editorUrl)
@csrf
@endif
@if ($editorUrl)

{{ __('If the panel stays blank, your n8n blocks embedding — use "Open in new tab". This embeds your OWN single n8n; hosting n8n for your customers needs an n8n Embed licence.') }}

@endif

{{ __('Setup checklist') }}

    @foreach ([ __('Run your own n8n (self-hosted or n8n Cloud).'), __('In n8n, add a Webhook node and copy its Production URL.'), __('Paste that URL above, pick the events you want, and save.'), __('For actions, add an HTTP Request node in n8n using the base URL + API key above.'), ] as $i => $step)
  1. {{ $i + 1 }} {{ $step }}
  2. @endforeach
{{ __('Starter workflows') }}

{{ __('Import a ready-made workflow') }}

{{ __('n8n → Import from File') }}
@foreach ([ ['auto-reply-inbound.json', __('Auto-reply to messages'), __('Reply automatically to every inbound message.')], ['welcome-new-contact.json', __('Welcome new contacts'), __('Send a welcome message when a contact is created.')], ['enroll-new-contact-in-flow.json', __('Enroll contacts in a flow'), __('Add every new contact to an onboarding flow.')], ] as $tpl) {{ $tpl[1] }} {{ $tpl[2] }} {{ __('Download .json') }} @endforeach

{{ __('These use the free WaDesk node pack — install it in n8n via Settings → Community nodes (search "n8n-nodes-wadesk"), then add your API credential.') }}