post
https://www.virustotal.com/api/v3/flows
Create a new Agentic Flow.
Creates a new Flow inside the caller's group. name is required (max 255 characters). The graph itself (nodes and connections) is required: every create and update validates the full graph (2 to 20 nodes, 1 to 45 connections), and an invalid graph returns an InvalidArgumentError. A Flow only runs on its trigger while enabled is true.
A Flow is a directed acyclic graph of nodes; successor nodes can reference an upstream node's output with dynamic variables. The example below is a four-node threat-hunt triage pipeline: it runs a saved search on a schedule, feeds the matched IOCs into a prompt for triage, and emails the agent's summary — using CEL expressions to pass data between nodes.
{
"data": {
"type": "flow",
"attributes": {
"name": "Cobalt Strike daily triage",
"enabled": true,
"nodes": [
{
"id": "n1",
"type": "NODE_TYPE_SCHEDULE_TIME",
"name": "Every morning",
"schedule_node": {
"cron_expression": "0 8 * * *",
"timezone": "UTC"
}
},
{
"id": "n2",
"type": "NODE_TYPE_RUN_SAVED_SEARCH",
"name": "Find Cobalt Strike infrastructure",
"run_saved_search_node": {
"saved_search_id": "ss-cobalt-strike"
}
},
{
"id": "n3",
"type": "NODE_TYPE_RUN_PROMPT",
"name": "Triage matched IOCs",
"run_prompt_node": {
"prompt": "Triage the following indicators and summarise the most relevant threats for a SOC analyst: ${nodes.n2.output.matched_items.slice(0, 20).join(\", \")}"
}
},
{
"id": "n4",
"type": "NODE_TYPE_SEND_EMAIL",
"name": "Email the SOC",
"send_email_node": {
"notification_emails": [
"[email protected]"
],
"email_subject": "${nodes.n2.output.match_count > 0 ? \"[Alert] Cobalt Strike infrastructure detected\" : \"[Clean] No Cobalt Strike infrastructure\"}",
"message": "${nodes.n3.output.gti_agentic_response}"
}
}
],
"connections": [
{
"source_node_id": "n1",
"target_node_id": "n2",
"source_handle": ""
},
{
"source_node_id": "n2",
"target_node_id": "n3",
"source_handle": ""
},
{
"source_node_id": "n3",
"target_node_id": "n4",
"source_handle": ""
}
]
}
}
}