Skip to content

mixpanel_agent_flows (Data Source)

Lists all Agent Flows in a project — automated workflows powered by Mixpanel's AI capabilities that can analyze data, generate insights, and perform scheduled actions.

Example Usage

data "mixpanel_agent_flows" "all" {
  project_id = 1234567
}

Use ids and import_ids to bulk-import existing agent flows; see the import guide for the for_each pattern.

Bulk import with for_each

Adopt every agent flow in the project in one pass: the list data source's import_ids feed a for_each import block, and -generate-config-out scaffolds each resource body for review before you apply.

data "mixpanel_agent_flows" "all" {}

# One import per agent flow. Both for_each iterate import_ids, so the import block
# and the resource address share the same instance key.
import {
  for_each = toset(data.mixpanel_agent_flows.all.import_ids)
  to       = mixpanel_agent_flow.this[each.key]
  id       = each.value
}

resource "mixpanel_agent_flow" "this" {
  for_each = toset(data.mixpanel_agent_flows.all.import_ids)
  # Body scaffolded by `terraform plan -generate-config-out=generated.tf`,
  # then reviewed and edited before apply.
}

Run terraform plan -generate-config-out=generated.tf, review the generated configuration, then terraform apply to import every agent flow. Set project_id on the data source to target a non-default project. See the import guide for gotchas (write-only fields, normalization drift).

Schema

Optional

  • project_id (String) Project id. Falls back to the provider default project.

Read-Only

  • ids (List of String) Raw ids of every agent_flow in the project.
  • import_ids (List of String) <project_id>:<id> composite import ids for every agent_flow.