Automated dynamic pricing with AI competitor monitoring & revenue optimization
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
How it works
This workflow automatically monitors competitor prices, analyzes market demand, and optimizes product pricing in real-time for maximum profitability using advanced AI algorithms.
Key Steps
- Hourly Trigger - Runs automatically every hour for real-time price optimization and competitive response.
- Multi-Platform Competitor Monitoring - Uses AI-powered scrapers to track prices from Amazon, Best Buy, Walmart, and Target.
- Market Demand Analysis - Analyzes Google Trends data to understand search volume trends and seasonal patterns.
- Customer Sentiment Analysis - Reviews customer feedback to assess price sensitivity and value perception.
- AI Pricing Optimization - Calculates optimal prices using weighted factors including competitor positioning, demand indicators, and inventory levels.
- Automated Price Updates - Directly updates e-commerce platform prices when significant opportunities are identified.
- Comprehensive Analytics - Logs all pricing decisions and revenue projections to Google Sheets for performance tracking.
Set up steps
Setup time: 15-20 minutes
- Configure ScrapeGraphAI credentials - Add your ScrapeGraphAI API key for AI-powered competitor and market analysis.
- Set up e-commerce API connection - Connect your e-commerce platform API for automated price updates.
- Configure Google Sheets - Set up Google Sheets connections for pricing history and revenue analytics logging.
- Set up Slack notifications - Connect your Slack workspace for real-time pricing alerts and team updates.
- Customize product catalog - Modify the product configuration with your actual products, costs, and pricing constraints.
- Adjust monitoring frequency - Change the trigger timing based on your business needs (hourly, daily, etc.).
- Configure competitor platforms - Update competitor URLs and selectors for your target market.
What you get
- Real-time price optimization with 15-25% potential revenue increase through intelligent pricing
- Competitive intelligence with automated monitoring of major e-commerce platforms
- Market demand insights with seasonal and trend-based pricing adjustments
- Customer sentiment analysis to understand price sensitivity and value perception
- Automated price updates when significant opportunities are identified (>2% change, >70% confidence)
- Comprehensive analytics with pricing history, revenue projections, and performance tracking
- Team notifications with detailed market analysis and pricing recommendations
- Margin protection with intelligent constraints to maintain profitability
n8n Workflow: Dynamic Pricing with AI Competitor Monitoring and Revenue Optimization
This n8n workflow provides a framework for implementing a dynamic pricing strategy by monitoring competitor prices, analyzing data, and notifying stakeholders of potential pricing adjustments. While the provided JSON defines the core structure, it's designed to be extended with AI integration for sophisticated analysis and decision-making.
What it does
This workflow outlines the following key steps:
- Scheduled Execution: The workflow is triggered at regular intervals (e.g., daily, hourly) to initiate the pricing analysis process.
- Fetch Competitor Data (Placeholder): An HTTP Request node is included as a placeholder to fetch competitor pricing data from an external API or scraping service. This is where you would integrate your specific data source.
- Process and Analyze Data (Placeholder): A Code node is included for custom JavaScript logic. This is intended for:
- Parsing the fetched competitor data.
- Applying AI models (e.g., via an external API call from within the Code node) to analyze competitor pricing, market trends, and potentially recommend new pricing.
- Comparing current product prices with competitor prices and AI recommendations.
- Store Data (Placeholder): A Google Sheets node is included as a placeholder to store the processed data, competitor prices, and potentially AI-generated recommendations for historical tracking and further analysis.
- Conditional Notification: An If node checks a condition (e.g., if a significant price change is recommended or detected).
- Notify Stakeholders (Success): If the condition is met (e.g., a price adjustment is recommended), an email is sent to relevant stakeholders with details.
- Notify Stakeholders (No Change/Error): If the condition is not met (e.g., no significant change, or an issue occurred), a Slack message is sent to a team channel, indicating the status of the pricing run.
- Batch Processing: The "Loop Over Items" node suggests that the workflow is designed to process multiple products or competitor data points in batches, ensuring efficient handling of large datasets.
- Merge Results: The "Merge" node combines the results from different branches of the workflow, likely before final storage or notification.
Prerequisites/Requirements
To use and extend this workflow, you will need:
- n8n Instance: A running n8n instance.
- Google Sheets Account: For storing and tracking pricing data.
- Email Service (SMTP): Configured for sending email notifications.
- Slack Account: For sending internal team notifications.
- Competitor Data Source: An API endpoint or a web scraping solution to retrieve competitor pricing information. This will be configured in the "HTTP Request" node.
- AI Service/Model (Optional but Recommended): For advanced pricing recommendations, you'll need access to an AI service (e.g., OpenAI, custom ML model API) that can be called from the "Code" node.
- n8n Credentials: Appropriate credentials configured in n8n for Google Sheets, Email (SMTP), Slack, and any external APIs (e.g., for competitor data or AI services).
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Credentials:
- Set up your Google Sheets credentials.
- Configure your Email (SMTP) credentials.
- Set up your Slack credentials.
- Add any necessary API credentials for your competitor data source or AI service.
- Customize "HTTP Request" Node (ID: 19):
- Update the URL and authentication to fetch data from your competitor monitoring service or API.
- Customize "Code" Node (ID: 834):
- Implement JavaScript logic to parse the data from the "HTTP Request" node.
- Add logic to call your AI service for pricing recommendations (if applicable).
- Implement the comparison logic between current prices, competitor prices, and AI recommendations.
- Prepare the output data for Google Sheets and the conditional "If" node.
- Customize "Google Sheets" Node (ID: 18):
- Specify the Spreadsheet ID and Sheet Name where you want to store the data.
- Map the data from the "Code" node to the appropriate columns in your Google Sheet.
- Customize "If" Node (ID: 20):
- Define the condition for when a price change notification should be sent (e.g.,
{{ $json.recommendedPriceChange > 5 }}).
- Define the condition for when a price change notification should be sent (e.g.,
- Customize "Send Email" Node (ID: 11):
- Set the recipient email address, subject, and body of the email, using data from previous nodes to provide details about the recommended price changes.
- Customize "Slack" Node (ID: 40):
- Specify the Slack channel and customize the message to be sent when no significant price change is detected or for general status updates.
- Configure "Schedule Trigger" Node (ID: 839):
- Set the desired interval for the workflow to run (e.g., every day at a specific time, every few hours).
- Activate the Workflow: Once configured, activate the workflow to enable automated dynamic pricing adjustments and monitoring.
This workflow provides a robust foundation for automating dynamic pricing. Further enhancements could include more sophisticated error handling, versioning of pricing changes, and integration with e-commerce platforms for automatic price updates.
Related Templates
Two-way property repair management system with Google Sheets & Drive
This workflow automates the repair request process between tenants and building managers, keeping all updates organized in a single spreadsheet. It is composed of two coordinated workflows, as two separate triggers are required — one for new repair submissions and another for repair updates. A Unique Unit ID that corresponds to individual units is attributed to each request, and timestamps are used to coordinate repair updates with specific requests. General use cases include: Property managers who manage multiple buildings or units. Building owners looking to centralize tenant repair communication. Automation builders who want to learn multi-trigger workflow design in n8n. --- ⚙️ How It Works Workflow 1 – New Repair Requests Behind the Scenes: A tenant fills out a Google Form (“Repair Request Form”), which automatically adds a new row to a linked Google Sheet. Steps: Trigger: Google Sheets rowAdded – runs when a new form entry appears. Extract & Format: Collects all relevant form data (address, unit, urgency, contacts). Generate Unit ID: Creates a standardized identifier (e.g., BUILDING-UNIT) for tracking. Email Notification: Sends the building manager a formatted email summarizing the repair details and including a link to a Repair Update Form (which activates Workflow 2). --- Workflow 2 – Repair Updates Behind the Scenes:\ Triggered when the building manager submits a follow-up form (“Repair Update Form”). Steps: Lookup by UUID: Uses the Unit ID from Workflow 1 to find the existing row in the Google Sheet. Conditional Logic: If photos are uploaded: Saves each image to a Google Drive folder, renames files consistently, and adds URLs to the sheet. If no photos: Skips the upload step and processes textual updates only. Merge & Update: Combines new data with existing repair info in the same spreadsheet row — enabling a full repair history in one place. --- 🧩 Requirements Google Account (for Forms, Sheets, and Drive) Gmail/email node connected for sending notifications n8n credentials configured for Google API access --- ⚡ Setup Instructions (see more detail in workflow) Import both workflows into n8n, then copy one into a second workflow. Change manual trigger in workflow 2 to a n8n Form node. Connect Google credentials to all nodes. Update spreadsheet and folder IDs in the corresponding nodes. Customize email text, sender name, and form links for your organization. Test each workflow with a sample repair request and a repair update submission. --- 🛠️ Customization Ideas Add Slack or Telegram notifications for urgent repairs. Auto-create folders per building or unit for photo uploads. Generate monthly repair summaries using Google Sheets triggers. Add an AI node to create summaries/extract relevant repair data from repair request that include long submissions.
Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation
PDF Invoice Extractor (AI) End-to-end pipeline: Watch Drive ➜ Download PDF ➜ OCR text ➜ AI normalize to JSON ➜ Upsert Buyer (Account) ➜ Create Opportunity ➜ Map Products ➜ Create OLI via Composite API ➜ Archive to OneDrive. --- Node by node (what it does & key setup) 1) Google Drive Trigger Purpose: Fire when a new file appears in a specific Google Drive folder. Key settings: Event: fileCreated Folder ID: google drive folder id Polling: everyMinute Creds: googleDriveOAuth2Api Output: Metadata { id, name, ... } for the new file. --- 2) Download File From Google Purpose: Get the file binary for processing and archiving. Key settings: Operation: download File ID: ={{ $json.id }} Creds: googleDriveOAuth2Api Output: Binary (default key: data) and original metadata. --- 3) Extract from File Purpose: Extract text from PDF (OCR as needed) for AI parsing. Key settings: Operation: pdf OCR: enable for scanned PDFs (in options) Output: JSON with OCR text at {{ $json.text }}. --- 4) Message a model (AI JSON Extractor) Purpose: Convert OCR text into strict normalized JSON array (invoice schema). Key settings: Node: @n8n/n8n-nodes-langchain.openAi Model: gpt-4.1 (or gpt-4.1-mini) Message role: system (the strict prompt; references {{ $json.text }}) jsonOutput: true Creds: openAiApi Output (per item): $.message.content → the parsed JSON (ensure it’s an array). --- 5) Create or update an account (Salesforce) Purpose: Upsert Buyer as Account using an external ID. Key settings: Resource: account Operation: upsert External Id Field: taxid_c External Id Value: ={{ $json.message.content.buyer.tax_id }} Name: ={{ $json.message.content.buyer.name }} Creds: salesforceOAuth2Api Output: Account record (captures Id) for downstream Opportunity. --- 6) Create an opportunity (Salesforce) Purpose: Create Opportunity linked to the Buyer (Account). Key settings: Resource: opportunity Name: ={{ $('Message a model').item.json.message.content.invoice.code }} Close Date: ={{ $('Message a model').item.json.message.content.invoice.issue_date }} Stage: Closed Won Amount: ={{ $('Message a model').item.json.message.content.summary.grand_total }} AccountId: ={{ $json.id }} (from Upsert Account output) Creds: salesforceOAuth2Api Output: Opportunity Id for OLI creation. --- 7) Build SOQL (Code / JS) Purpose: Collect unique product codes from AI JSON and build a SOQL query for PricebookEntry by Pricebook2Id. Key settings: pricebook2Id (hardcoded in script): e.g., 01sxxxxxxxxxxxxxxx Source lines: $('Message a model').first().json.message.content.products Output: { soql, codes } --- 8) Query PricebookEntries (Salesforce) Purpose: Fetch PricebookEntry.Id for each Product2.ProductCode. Key settings: Resource: search Query: ={{ $json.soql }} Creds: salesforceOAuth2Api Output: Items with Id, Product2.ProductCode (used for mapping). --- 9) Code in JavaScript (Build OLI payloads) Purpose: Join lines with PBE results and Opportunity Id ➜ build OpportunityLineItem payloads. Inputs: OpportunityId: ={{ $('Create an opportunity').first().json.id }} Lines: ={{ $('Message a model').first().json.message.content.products }} PBE rows: from previous node items Output: { body: { allOrNone:false, records:[{ OpportunityLineItem... }] } } Notes: Converts discount_total ➜ per-unit if needed (currently commented for standard pricing). Throws on missing PBE mapping or empty lines. --- 10) Create Opportunity Line Items (HTTP Request) Purpose: Bulk create OLIs via Salesforce Composite API. Key settings: Method: POST URL: https://<your-instance>.my.salesforce.com/services/data/v65.0/composite/sobjects Auth: salesforceOAuth2Api (predefined credential) Body (JSON): ={{ $json.body }} Output: Composite API results (per-record statuses). --- 11) Update File to One Drive Purpose: Archive the original PDF in OneDrive. Key settings: Operation: upload File Name: ={{ $json.name }} Parent Folder ID: onedrive folder id Binary Data: true (from the Download node) Creds: microsoftOneDriveOAuth2Api Output: Uploaded file metadata. --- Data flow (wiring) Google Drive Trigger → Download File From Google Download File From Google → Extract from File → Update File to One Drive Extract from File → Message a model Message a model → Create or update an account Create or update an account → Create an opportunity Create an opportunity → Build SOQL Build SOQL → Query PricebookEntries Query PricebookEntries → Code in JavaScript Code in JavaScript → Create Opportunity Line Items --- Quick setup checklist 🔐 Credentials: Connect Google Drive, OneDrive, Salesforce, OpenAI. 📂 IDs: Drive Folder ID (watch) OneDrive Parent Folder ID (archive) Salesforce Pricebook2Id (in the JS SOQL builder) 🧠 AI Prompt: Use the strict system prompt; jsonOutput = true. 🧾 Field mappings: Buyer tax id/name → Account upsert fields Invoice code/date/amount → Opportunity fields Product name must equal your Product2.ProductCode in SF. ✅ Test: Drop a sample PDF → verify: AI returns array JSON only Account/Opportunity created OLI records created PDF archived to OneDrive --- Notes & best practices If PDFs are scans, enable OCR in Extract from File. If AI returns non-JSON, keep “Return only a JSON array” as the last line of the prompt and keep jsonOutput enabled. Consider adding validation on parsing.warnings to gate Salesforce writes. For discounts/taxes in OLI: Standard OLI fields don’t support per-line discount amounts directly; model them in UnitPrice or custom fields. Replace the Composite API URL with your org’s domain or use the Salesforce node’s Bulk Upsert for simplicity.
Automate RSS to social media pipeline with AI, Airtable & GetLate for multiple platforms
Overview Automates your complete social media content pipeline: sources articles from Wallabag RSS, generates platform-specific posts with AI, creates contextual images, and publishes via GetLate API. Built with 63 nodes across two workflows to handle LinkedIn, Instagram, and Bluesky—with easy expansion to more platforms. Ideal for: Content marketers, solo creators, agencies, and community managers maintaining a consistent multi-platform presence with minimal manual effort. How It Works Two-Workflow Architecture: Content Aggregation Workflow Monitors Wallabag RSS feeds for tagged articles (to-share-linkedin, to-share-instagram, etc.) Extracts and converts content from HTML to Markdown Stores structured data in Airtable with platform assignment AI Generation & Publishing Workflow Scheduled trigger queries Airtable for unpublished content Routes to platform-specific sub-workflows (LinkedIn, Instagram, Bluesky) LLM generates optimized post text and image prompts based on custom brand parameters Optionally generates AI images and hosts them on Imgbb CDN Publishes via GetLate API (immediate or draft mode) Updates Airtable with publication status and metadata Key Features: Tag-based content routing using Wallabag's native system Swappable AI providers (Groq, OpenAI, Anthropic) Platform-specific optimization (tone, length, hashtags, CTAs) Modular design—duplicate sub-workflows to add new platforms in \~30 minutes Centralized Airtable tracking with 17 data points per post Set Up Steps Setup time: \~45-60 minutes for initial configuration Create accounts and get API keys (\~15 min) Wallabag (with RSS feeds enabled) GetLate (social media publishing) Airtable (create base with provided schema—see sticky notes) LLM provider (Groq, OpenAI, or Anthropic) Image service (Hugging Face, Fal.ai, or Stability AI) Imgbb (image hosting) Configure n8n credentials (\~10 min) Add all API keys in n8n's credential manager Detailed credential setup instructions in workflow sticky notes Set up Airtable database (\~10 min) Create "RSS Feed - Content Store" base Add 19 required fields (schema provided in workflow sticky notes) Get Airtable base ID and API key Customize brand prompts (\~15 min) Edit "Set Custom SMCG Prompt" node for each platform Define brand voice, tone, goals, audience, and image preferences Platform-specific examples provided in sticky notes Configure platform settings (\~10 min) Set GetLate account IDs for each platform Enable/disable image generation per platform Choose immediate publish vs. draft mode Adjust schedule trigger frequency Test and deploy Tag test articles in Wallabag Monitor the first few executions in draft mode Activate workflows when satisfied with the output Important: This is a proof-of-concept template. Test thoroughly with draft mode before production use. Detailed setup instructions, troubleshooting tips, and customization guidance are in the workflow's sticky notes. Technical Details 63 nodes: 9 Airtable operations, 8 HTTP requests, 7 code nodes, 3 LangChain LLM chains, 3 RSS triggers, 3 GetLate publishers Supports: Multiple LLM providers, multiple image generation services, unlimited platforms via modular architecture Tracking: 17 metadata fields per post, including publish status, applied parameters, character counts, hashtags, image URLs Prerequisites n8n instance (self-hosted or cloud) Accounts: Wallabag, GetLate, Airtable, LLM provider, image generation service, Imgbb Basic understanding of n8n workflows and credential configuration Time to customize prompts for your brand voice Detailed documentation, Airtable schema, prompt examples, and troubleshooting guides are in the workflow's sticky notes. Category Tags social-media-automation, ai-content-generation, rss-to-social, multi-platform-posting, getlate-api, airtable-database, langchain, workflow-automation, content-marketing