Script Generator · session integration
Three states showing how script creation flows from a FlowPilot session — matched template, custom script with three-option dialog, and the post-resolve templatization prompt.
1
Template match
Suggested fix has a matching template
When FlowPilot's suggested fix maps to a template in the Script Library, clicking opens the generator with parameters pre-filled from What we know. The engineer confirms, generates, done.
resolutionflow.com/pilot/session/48291
CW #48291
Outlook not syncing after password reset
Acme Corp · jsmith@acme.com · P2 · Service board
What we know · 4 facts
✓OWA working — rules out tenant/license
✓Password reset via AD at 14:02
✓Isolated to jsmith — not tenant-wide
✓AD unlocked, EXO license active
Suggested fix · template found94% match
Clear cached credentials + rebuild Outlook profile
From your team library · resolved 7 similar sessions · last used 3 days ago
You can also invoke the script generator anytime with ⌘K → "script" or from the composer toolbar.
Script Generator
Clear cached credentials + rebuild profile
Verified template · v3 · ActiveDirectory module · runs as admin
3 of 5 parameters pre-filled from session context. Review and adjust the highlighted fields, then generate.
Target user
SAM account name* from session
Pulled from ticket subject + What we know.
Domain* from Acme config
Pulled from CW company config for Acme Corp.
Cache targets
Clear Windows Credential Manager entries*
Wildcard patterns. Default covers Outlook + ADAL cached tokens.
Clear Autodiscover cache
Profile rebuild
Rebuild strategy
2
No template match
AI generates a custom script — three paths
When no existing template matches, FlowPilot drafts a session-specific script and offers three paths. The middle option (one-off now, template later) is the default because it captures institutional knowledge without blocking the engineer mid-crisis.
resolutionflow.com/pilot/session/48307
CW #48307
VPN session torn down every 3–5 minutes
Duncan & Partners · GlobalProtect · P3
What we know · 3 facts
✓Gateway logs show GPTunnel: session timeout every 3–5min
✓Happens on both wifi and LAN — not network-path
✓Gateway-side teardown confirmed via PAN XML API
Suggested fix · custom script
Query & clear duplicate sessions from GP gateway
No template match in your library · AI drafted this from session context.
No template match — how would you like to proceed?
FlowPilot has drafted a PowerShell script for this ticket
The script queries the GP gateway's active session table via the PAN XML API and clears duplicates. Pick how this gets saved — the choice affects whether your team benefits from it later.
drafted script · PowerShell · 32 lines
proposed parameters
# Query & clear duplicate GP sessions — jsmith @ Duncan $fw = 'fw01.duncan.law' $key = 'LUFRPT1...ZG9u' $user = 'dfield' $xml = Invoke-RestMethod -Uri "https://$fw/api/?type=op&cmd=..." $sessions = $xml.response.result.entry | Where-Object { $_.username -eq $user } ... (show full script)
Run as one-off
Generate the script for this ticket only. Captured in session documentation. Discarded after.
Fastest — no follow-up
Team won't benefit next time
Recommended
Run now, templatize after resolve
Generate for this ticket. If it works, FlowPilot offers to turn it into a team template when you click Resolve.
Zero cognitive overhead now
Only templatize what actually works
~30 sec review after resolve
Build as template now
Full parameterization up front. Takes 2–3 min but becomes a first-class team template immediately.
Immediate team benefit
Adds time mid-ticket
3
Post-resolve prompt
Turn what just worked into a reusable template
After Resolve posts the summary to CW, FlowPilot surfaces the templatization prompt for any custom script that ran successfully. The engineer reviews AI-proposed parameters, adjusts if needed, and ships — or skips.
resolutionflow.com/pilot/session/48307 · resolved
Session resolved — summary posted to CW #48307
Status set to Resolved · 7 minutes total session time · Custom script ran successfully
One more thing
Turn this into a team template?
The script you just ran resolved the VPN session teardown for D. Field at Duncan & Partners. If a similar ticket comes in next week, your team can skip the analysis and run this in 10 seconds.
Proposed template · parameters highlighted
# Query & clear duplicate GP sessions # Auto-generated from CW #48307 · D. Field · Duncan $fw = {{ gateway_host }} $key = {{ api_key }} $user = {{ sam_account_name }} $xml = Invoke-RestMethod -Uri "https://$fw/api/?type=op&cmd=<show>..." $sessions = $xml.response.result.entry | Where-Object { $_.username -eq $user } foreach ($s in $sessions) { Invoke-RestMethod -Uri "https://$fw/api/?type=op&cmd=<clear>..." Write-Host "Cleared session $($s.session-id)" }
Extracted parameters 3 proposed
gateway_host Firewall hostname text
api_key PAN API key password
sam_account_name Target username text
Provenance tracked · this template will show "generated from CW #48307 · resolved by M. Davis" in the library. Visible to your team only until promoted to Verified by an admin.