Skip to main content

Amazon affiliate marketing automation

Workflow preview

Workflow preview
100%
Amazon affiliate marketing automation 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 this is for This workflow is for Amazon affiliate marketers and social media managers who want to quickly turn product links into engaging Facebook posts with AI generated captions and images —...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.converttofile, n8n-nodes-base.facebookgraphapi, n8n-nodes-base.googlesheetstrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.wait, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Amazon affiliate marketing automation
Workflow name
Amazon affiliate marketing automation

Who this is for

This workflow is for Amazon affiliate marketers and social media managers who want to quickly turn product links into engaging Facebook posts with AI-generated captions and images — fully automated.


What this workflow does

This workflow starts every time a new Product Link is added to a connected Google Sheet. It then:

  • Extracts the ASIN from the product link.
  • Fetches product details from Amazon using RapidAPI.
  • Generates a short, scroll-stopping Facebook caption with OpenRouter AI.
  • Creates a product image prompt and sends it to Google Gemini for high-quality image generation.
  • Uploads the creative directly to Facebook via the Facebook Graph API.
  • Marks the Google Sheet row as “Done ✅” after posting.

The Facebook post includes:

  • Product image (AI-enhanced)
  • Short, benefit-focused caption with emojis
  • Affiliate link

Setup

To set this template up, follow the sticky notes inside the workflow and:

  1. Google Sheets → Connect your sheet and ensure the columns “Product Link” & “Facebook Upload” exist.
  2. RapidAPI → Add your API key in the “Amazon Product Details” node.
  3. OpenRouter → Add credentials for caption generation.
  4. Google Gemini → Add your API key for image generation.
  5. Facebook Graph API → Connect your Facebook account for posting.

How to customize this workflow to your needs

  • Change the Facebook caption prompt to match your tone or branding.
  • Adjust the AI image generation prompt to fit your preferred photography style.
  • Modify the Google Sheet update logic if you want to track additional info (e.g., posting date, engagement stats).
  • Switch Facebook posting to Instagram or another platform by replacing the final API call.

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 - Amazon Product Details

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

Block 2 - Product Image

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

Block 3 - Image Upload To Server

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

Block 4 - OpenRouter Chat Model

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

Block 5 - Convert to File

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

Block 6 - Facebook Graph API

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

Block 7 - OpenRouter Chat Model1

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

Block 8 - Google Sheets Trigger

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

Block 9 - OpenRouter Chat Model2

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

Block 10 - Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 11 - Wait

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

Block 12 - FB caption

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

Block 13 - Image Prompt Generate

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

Block 14 - asin number

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

Block 15 - ai image generator

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

Block 16 - Sticky Note

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

Block 17 - Sticky Note1

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

Block 18 - Sticky Note2

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

Block 19 - Sticky Note5

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

3. Summary Table

Workflow Amazon affiliate marketing automation
Complexity advanced
Nodes 19
Categories Social Media, Multimodal AI
Author Rakin Jakaria
Published 15 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7422/7422.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 Amazon affiliate marketing automation do?

Who this is for This workflow is for Amazon affiliate marketers and social media managers who want to quickly turn product links into engaging Facebook posts with AI generated captions and images —...

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 Social Media, Multimodal AI use case.