@extends('layouts.app', ['title' => 'Workflows']) @section('content') @php($canManage = auth()->user()->can('automations.manage'))

Workflows

Follow up with every lead automatically: messages, tags, deals and tasks.

@if ($canManage)
@csrf
@endif
@error('workflow')
{{ $message }}
@enderror
@if ($workflows->isEmpty())
No workflows yet. Try: "New webinar lead → WhatsApp welcome → wait 1 day → reminder".
@else
@foreach ($workflows as $w) @endforeach
WorkflowStarts whenRunsLast runStatus
{{ $w->name }} @if ($w->failed_runs)
{{ $w->failed_runs }} failed {{ \Illuminate\Support\Str::plural('run', $w->failed_runs) }}
@endif
{{ \App\Models\Workflow::TRIGGERS[$w->trigger_type]['label'] ?? 'Not set' }} {{ number_format($w->runs_count) }} {{ $w->last_run_at?->diffForHumans() ?? '—' }} @if ($canManage)
@csrf
is_active)>
@else {{ $w->is_active ? 'On' : 'Off' }} @endif
@if ($canManage)@endif
@endif
@endsection