Sweep on a schedule and tell the SOC
Build a Flow from the Scheduled threat sweep template that runs a hunt's query every day and posts in the SOC's channel when it finds something, run it, and read what it did.
Goal
A Flow in Corporate SOC that runs the query of Encoded PowerShell command lines every day and posts in the SOC's channel when it returns rows, with one run you started yourself.
Before you start
Not every hunt should become a detection. Encoded PowerShell command lines finds what attackers do, but some management tools encode PowerShell on purpose too. As a detection it would fire all day. Run it every day instead, and tell the SOC when it finds something. It is also the answer to the gap in Run it by hand, then on a schedule: a scheduled hunt tells nobody, and a Flow does.
Open the template. Open Flow → Templates. Under SOC OPERATIONS, click Scheduled threat sweep: On a schedule, run a hunt query on the SIEM and alert the SOC when it returns hits. The panel shows its trigger, Schedule · Every 6 hours, and two steps, Run SIEM search and Notify, the second with
when: ${sweep.rowCount} > 0. Press Open in builder.

Name it and set it to every day. In the name box, type
Sweep for encoded PowerShell. Open Every 6 hours and choose Every day. The list runs from Every 15 min to Every week, and Custom (cron).
Put the hunt's query in the search. Click Run SIEM search. Two boxes hold queries. Query per SIEM carries the template's query for each SIEM, as JSON, and the one for your workspace's SIEM is used in place of SIEM query. Clear Query per SIEM; its grey hint stays. Then paste the hunt's query into SIEM query. It is the Splunk tab of Encoded PowerShell command lines, as Studio ships it:
index=* sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational EventCode=1 Image="*\\powershell.exe" (CommandLine="* -enc*" OR CommandLine="* -e *" OR CommandLine="*-EncodedCommand*") | stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as command_lines by host, User, ParentImage | sort - countLeave Earliest time empty: the search reads the last 24 hours, the day since the run before. On a workspace with another SIEM, copy that SIEM's tab of the hunt before you open the builder, and paste it instead. Press Done.

Read the Notify step. Click Notify. Title reads Threat sweep hits, and Message reads
Scheduled threat sweep returned ${sweep.rowCount} result(s) to triage.Under Run only when is${sweep.rowCount} > 0: the step runs only when the search returned rows.sweepis the search step's name, androwCountis how many rows it returned. Leave it as it is and press Done.
Press Test run. The Test run panel, marked dry run, reads 1 step ran · a dry run, nothing changed. Run SIEM search: dry run — search skipped. Notify (skipped): Condition not met: ${sweep.rowCount} > 0. Run searches, beside Test run, is off, so the test did not read your SIEM: the row count is 0 and Notify waits. It shows the flow hangs together, not what the search finds. Tick Run searches and press Test run again to run the search on your SIEM for real, read-only and audited: Run SIEM search then reads how many rows it found, and Notify runs as a dry run when there are any. Notifications and every other send stay skipped either way.

Save it, and run it now. Press Save. A toast reads Saved — the automation is live. Saving goes through a change request; for an admin, Studio opens it, approves it and merges it at once. Flow → Automations lists Sweep for encoded PowerShell: Schedule, Workspace, 2 steps, Active. From now on it runs once a day on its own. To see it work today, press Run on its row. A dialog asks Run “Sweep for encoded PowerShell”?, The automation runs its steps now. It never merges or deploys. Press Run. A toast reads Automation started — watch it in Flow → Executions.
Read the run. Open Flow → Executions. Your run reads Manual, Succeeded. Click it. Under WORK TIMELINE: Run SIEM search, 2 row(s), one for each program that started the encoded PowerShell on WS-031, then Notify, Notified: Threat sweep hits (posted to #corporate-soc). With no Slack, Teams or email set up, Notify posts in the workspace's own channel.

Read it where the SOC will. Open Teams → Chat and the channel corporate-soc. Above, Studio's own cards for this course: 1 detection added on main, New case opened, and the change request that saved your automation, opened, approved and merged. At the foot, from Sweep for encoded PowerShell, tagged AUTOMATION: Threat sweep hits Scheduled threat sweep returned 2 event(s) to triage. The two are rows, not events: the query groups the events by host, user and parent.

You should now see
Sweep for encoded PowerShell on Flow → Automations, Schedule and Active, with one run on Flow → Executions and its message in your workspace's channel.
From a piece of intel to a hunt, and from a finding to a detection, a case and a daily sweep: that is the Threat Hunter path.
Quick check
Go deeper
- Templates, for every starter flow and what each needs.
- Executions, for reading a run step by step.