Skip to main content

Analyze inflation hedges with OpenAI GPT-4.1-mini and Gmail

Workflow preview

Workflow preview
100%
Analyze inflation hedges with OpenAI GPT-4.1-mini and Gmail preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow runs manually to calculate inflation adjusted (real) returns for a set of commodities versus a savings rate, then uses OpenAI to generate a structured analysis and emai...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.splitout, n8n-nodes-base.merge, n8n-nodes-base.aggregate, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.gmail

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Analyze inflation hedges with OpenAI GPT-4.1-mini and Gmail
Workflow name
Analyze inflation hedges with OpenAI GPT-4.1-mini and Gmail

Quick Overview

This workflow runs manually to calculate inflation-adjusted (real) returns for a set of commodities versus a savings rate, then uses OpenAI to generate a structured analysis and emails the final report via Gmail.

How it works

  1. Starts when you run the workflow manually.
  2. Loads the provided inflation rate, savings return, and a list of commodity nominal returns, then validates that inflation is greater than 0 and savings return is at least 0.
  3. Calculates the real return for savings and each commodity (nominal return minus inflation) and flags whether each commodity beats the savings real return.
  4. Evaluates each commodity and labels it as a good or bad inflation hedge based on whether it outperforms savings after inflation.
  5. Aggregates all labeled commodity results and sends them to OpenAI to identify the best hedge, explain the reasoning, compare against savings, and produce beginner-friendly advice in JSON format.
  6. Parses the AI response and sends an HTML email report with the findings through Gmail.

Setup

  1. Add OpenAI API credentials (or use the configured n8n OpenAI credits) and confirm the selected model in the OpenAI step.
  2. Add a Gmail OAuth2 credential and set the recipient email address in the Gmail send step.
  3. Update the input values (inflation, savings_return, and the commodities list with name and return) to match your own data before executing the workflow.

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 - Validate Input

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

Block 2 - Label as GOOD

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

Block 3 - Label as BAD

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

Block 4 - Input: Inflation & Returns

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

Block 5 - Compute Real Returns

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Split Commodities

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

Block 7 - Check Invalid Inputs

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

Block 8 - Check Better Than Savings

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

Block 9 - Merge Results

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 10 - Aggregate Data for AI

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

Block 11 - Generate AI Insights

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.1

Block 12 - Format Final Report

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

Block 13 - Send Email Report

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

Block 14 - Sticky Note

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

Block 15 - Sticky Note1

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

Block 16 - Sticky Note2

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

Block 17 - Sticky Note3

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

Block 18 - Start Workflow Manually

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

3. Summary Table

Workflow Analyze inflation hedges with OpenAI GPT-4.1-mini and Gmail
Complexity advanced
Nodes 18
Categories Market Research, AI Summarization
Author WeblineIndia
Published 16 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16432/16432.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 Analyze inflation hedges with OpenAI GPT-4.1-mini and Gmail do?

Quick Overview This workflow runs manually to calculate inflation adjusted (real) returns for a set of commodities versus a savings rate, then uses OpenAI to generate a structured analysis and emai...

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 Market Research, AI Summarization use case.