03

Amazon Ads AI Optimization

A report-analysis workflow that reads Amazon advertising data from Google Drive, handles CSV or XLSX formats, prepares the data for Gemini, and emails optimisation recommendations for human review. It produces a recommendation. It does not change campaigns.

Class
Ecommerce Automation
Built with
n8n · Google Drive · Google Gemini · XLSX/CSV · Gmail
Walkthrough
Loom recording

The work

Amazon Ads reports normally need to be downloaded, opened, interpreted, and turned into optimisation recommendations.

The friction

The repetitive part is handling the report files, dealing with different formats, extracting the useful data, flattening the records, reviewing campaign information, and preparing recommendations.

n8n workflow canvas for Amazon Ads AI Optimization, showing Google Drive file listing and retrieval, an Is XLSX format check branching into separate XLSX and CSV extraction paths, a merge and flatten step, Gemini analysis, and an email of optimisation recommendations.
The full n8n canvas. The Is XLSX check splits the run into two extraction paths that rejoin at the merge, and the workflow ends at an email rather than at the ad account.1832 × 788 · 224 KB

The system

The format check is the fork in the workflow: XLSX and CSV take separate extraction paths, then rejoin before analysis.

  1. Manual Test Trigger
  2. Email Options
  3. List Files in Google Drive
  4. Get File
  5. Set File Name
  6. Is XLSX?

    Two extraction paths

    • XLSX: Extract XLSX Data, then Preserve File Name
    • CSV: Extract CSV Data, then Preserve CSV File Name
  7. Merge and Flatten
  8. AI Analyze using Google Gemini
  9. Email Optimizations

What it handles

  • Google Drive file discovery
  • File retrieval
  • CSV and XLSX format detection
  • Report parsing
  • File-name preservation
  • Data merging
  • Flattening
  • Gemini analysis
  • Email recommendation preparation

What stays human

The workflow ends at an email. Every change to a live campaign is a human decision.

  • Reviewing the recommendations
  • Deciding which changes are applied
  • Judging whether a recommendation fits the account
  • All spend decisions

The principle

The system recommends. A person decides what actually changes.

Exceptions

The workflow does not change bids or campaigns. Anything it produces is a recommendation.

  • Missing report columns
  • Malformed files
  • Download failure
  • Unsupported file structure
  • CSV parsing errors
  • XLSX parsing errors
  • AI recommendation requiring human review

How it improves the workflow

The system reduces the repetitive work of preparing advertising reports for analysis and turns a report into a structured recommendation that can be reviewed before anything is acted on.

Who it’s for

  • Amazon sellers & FBA businesses
  • Digital marketing agencies managing ad accounts
  • E-commerce brands spending on Amazon PPC
  • Teams that review ad reports manually
  • Businesses wanting faster, smarter ad decisions

Walkthrough