Automating AMC workflows: saved queries, parameters and schedules

In short: An AMC workflow is a saved SQL query with a unique `workflowId`. You run it on demand or create a schedule that starts it daily or weekly and puts the result in the instance's S3 bucket. Parameters let you set values only at execution.

Creating a workflow

  • A workflow is a SQL query with a workflowId that may contain only letters, digits, periods, dashes and underscores, for example Streaming_T.V_Performance-Report2023.
  • sqlQuery must be a single-line query without tabs and line breaks; a trailing semicolon is not required.
  • When defining it the aggregation requirements apply so that the privacy of customers is preserved. A saved workflow produces results only once you execute or schedule it.

Parameters instead of hard-coded values

In the workflow you define custom parameters, optionally with defaultValue, and set the values at execution. The simple types BINARY, BOOLEAN, BYTE, DATE, DOUBLE, FLOAT, INTEGER, LONG, SHORT, STRING, TIMESTAMP and ARRAY of these types are supported. Never add information about an individual, such as an email or phone number, to the description or a parameter value.

Executing: time window and data freshness

`timeWindowType`Time window
EXPLICITStart and end are given explicitly in the request.
MOST_RECENT_DAYDefault: the most recent day for which the instance is likely to have data.
MOST_RECENT_WEEKThe most recent week likely to have data, aligned to day boundaries.
CURRENT_MONTHFrom the start of the month up to the latest time with data.
PREVIOUS_MONTHThe entire previous month.

AMC does not ingest data in real time. Amazon recommends a date range ending 48 hours before the current date, because the data can take up to 48 hours to be available. For the limits on parallel executions see the error page on the limit.

Schedules and results

  • A schedule sets cadence, day of week and time of day. The parameter aggregationHourUtc is the offset in hours from midnight UTC: 10 a.m. MST is 4 p.m. UTC, so 16.
  • ScheduleEnabled = true enables the schedule; with false the workflow is not queued.
  • Without a value, aggregationStartDay defaults to the creation day for weekly aggregation; for daily it is not used.
  • The result lands in the instance's S3 bucket, about 6 to 7 hours after the scheduled time according to Amazon; the file carries the suffix -ver1.csv and omits invalid traffic.

Frequently asked questions

Does a saved workflow produce results on its own?

No. Only an execution or a schedule produces output data.

Sources: Amazon Ads API: Manage a workflow · Amazon Ads API: Manage workflow executions · Amazon Ads API: Manage a workflow schedule (retrieved 2026-10-09)

Keep reading: AMC errors · Query library