Skip to main content

Automatically update Amazon transaction memos in YNAB with AI & Gmail

Workflow preview

Workflow preview
100%
Automatically update Amazon transaction memos in YNAB with AI & Gmail preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who it's for This workflow is ideal for YNAB users who frequently shop on Amazon and want their ...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.noop, n8n-nodes-base.webhook, n8n-nodes-base.scheduletrigger, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.stickynote, n8n-nodes-base.httprequest

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Angel Menendez.

Original n8n.io source

1.1 Workflow description

Title
Automatically update Amazon transaction memos in YNAB with AI & Gmail
Workflow name
Automatically update Amazon transaction memos in YNAB with AI & Gmail

Who it's for

This workflow is ideal for YNAB users who frequently shop on Amazon and want their transaction memos to automatically show itemized purchase details. It's especially helpful for people who import bank transactions into YNAB and want to keep purchase records tidy without manual entry.

How it works

The workflow triggers on a set schedule, via a webhook, or manually. It retrieves all unapproved transactions from your YNAB budget, filters for Amazon purchases with empty memo fields, and processes each transaction individually. Using Gmail, it searches for matching Amazon emails (within ±5 days of the transaction date) and sends the email data to an AI agent powered by OpenAI. The AI extracts product names and prices, generating a concise memo line (up to 499 characters). If no valid purchase info is found, a fallback message is added instead. A 5-second delay prevents API rate limiting.

How to set up

  1. Connect your YNAB account with valid API credentials.
  2. Connect Gmail with OAuth2 authentication.
  3. Add your OpenAI (or other LLM) API credentials.
  4. Configure the schedule trigger or use manual/webhook start.
  5. Run the workflow and monitor execution logs in n8n.

Requirements

  • YNAB API credentials
  • Gmail OAuth2 connection
  • OpenAI API key (or another compatible AI model)

How to customize

You can change the AI model (e.g., Gemini or Claude) or add HTML-to-Markdown conversion to lower token costs. Adjust the wait node delay to fit your API rate limits or modify the email date range for greater accuracy.

Security note: Never store or share API keys or personal email data directly in the workflow. Use credential nodes to manage sensitive information securely.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Check Next Transaction

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 3 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 4 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 5 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 6 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Get All Unapproved Transactions

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Split out Transactions

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 10 - Extract Needed Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Check if Amazon Purchase

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 12 - Check if Memo field is Empty

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 13 - Loop Over Transactions

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 14 - Wait 5 seconds to avoid Rate Limiting

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 15 - Update Transaction Memo Field

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - Update memo with Error

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Search Emails for Transaction Amount

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 18 - Check if emails found

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 19 - Format Emails

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Join emails together

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 21 - Memo AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 22 - Check if AI Able to parse items

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 23 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 30 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automatically update Amazon transaction memos in YNAB with AI & Gmail
Complexity advanced
Nodes 30
Categories Document Extraction, AI Summarization
Author Angel Menendez
Published 04 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10516/10516.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automatically update Amazon transaction memos in YNAB with AI & Gmail do?

Who it's for This workflow is ideal for YNAB users who frequently shop on Amazon and want their ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.