eBay Recommendation API Server for AI Agents - n8n Workflow

Use this n8n workflow to turn the eBay Recommendation API into a powerful AI agent tool. Easily expose listing recommendations via an n8n MCP server for optimization.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

This n8n workflow is ideal for:

E-commerce Developers: Seeking to integrate eBay listing optimization tools directly into AI agents.
Automation Specialists: Who want to leverage the power of n8n templates to build custom API servers.
AI/LLM Engineers: Needing a reliable, scalable Microservice Component Protocol (MCP) server for eBay data.
Data Consultants: Who need a flexible n8n node structure to manage OAuth2 and parameter injection for external APIs.

Overview

This specialized n8n workflow solves the challenge of connecting AI agents, such as those built with LangChain or proprietary models, directly to the eBay Recommendation API. By utilizing the MCP server capabilities within n8n, you transform a standard API endpoint into a fully described tool that AI agents can utilize automatically.

The eBay Recommendation API provides crucial data for sellers, specifically listing recommendations related to Promoted Listings campaigns. This n8n workflow handles authentication and dynamic parameter parsing using $fromAI() expressions, allowing the AI agent to intelligently determine search criteria (like filter, limit, and offset). This robust n8n workflow ensures your AI automation tasks run smoothly, maximizing listing visibility and seller performance.

How it Works

This automation functions as a dedicated server endpoint:


  1. Incoming Request: The process starts with the Recommendation MCP Server n8n trigger node. This n8n node acts as the entry point, listening for requests from a configured AI agent via a specific webhook URL.

  2. Tool Routing: Once a request is received, the n8n trigger node identifies which tool (operation) the AI intends to execute. In this n8n workflow, the available operation is Get Promoted Listings Recommendations.

  3. Dynamic Parameter Injection: The request is routed to the Get Promoted Listings Recommendations n8n node (an HTTP Request Tool). This n8n node is configured using special $fromAI() expressions, which automatically extract and inject query parameters (like filter or limit) and header parameters (X-EBAY-C-MARKETPLACE-ID) synthesized by the AI agent based on its prompt.

  4. External API Call: The n8n node executes a POST request to the eBay API endpoint.

  5. Return to Agent: The raw API response containing the listing recommendations is passed back through the MCP trigger to the initiating AI agent, completing the execution of the n8n workflow tool.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance via the 'New' > 'Import from JSON' function.

  2. Configure Credentials: Ensure you set up the necessary OAuth2 credentials for accessing the eBay API. This authentication will be used by the Get Promoted Listings Recommendations n8n node.

  3. Activate the Workflow: Set the workflow to 'Active'. This initializes the MCP server endpoint.

  4. Obtain the Webhook URL: The URL for the Recommendation MCP Server n8n trigger node must be copied. This URL is the actual tool endpoint your AI agent will call.

  5. Connect AI Agent: Configure your AI agent (e.g., in LangChain or another framework) to recognize this URL as the tool endpoint for the eBay Recommendation operations. This crucial n8n templates step links your AI logic to your server logic.

Node Details

This n8n workflow leverages the following key n8n nodes:

Recommendation MCP Server (MCP Trigger):
Function: Serves as the primary n8n trigger for the AI agent, listening on the path /recommendation-mcp. It receives the AI's intent and argument structure.
Key Configuration: Configured to map incoming requests to the specific HTTP Request Tool defined in the n8n workflow.

Get Promoted Listings Recommendations (HTTP Request Tool):
Function: Executes the core business logic, calling the eBay Recommendation API to retrieve data sellers can use to optimize Promoted Listings campaigns. This is the only operation exposed by this n8n node tool.
Key Configuration:
Method: POST
URL: https://api.ebay.com{basePath}/find (Base path is dynamically handled by the MCP context).
Query Parameters: Uses expressions like ={{ $fromAI('limit', '...') }} for parameters like filter, limit, and offset, allowing the AI to specify pagination and filtering criteria.
Header Parameters: Uses ={{ $fromAI('X-EBAY-C-MARKETPLACE-ID', '...') }} to dynamically set the required marketplace ID based on the AI agent's instructions.

Related n8n Workflows

Free

Nodes: 3 Nodes
Updated: December 26 2025
View all
Created by

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

Featured*