Dynamic search interface with Elasticsearch and automated report generation
Dynamic Search Interface with Elasticsearch and Automated Report Generation
π― What this workflow does
This template creates a comprehensive data search and reporting system that allows users to query large datasets through an intuitive web form interface. The system performs real-time searches against Elasticsearch, processes results, and automatically generates structured reports in multiple formats for data analysis and business intelligence.
Key Features:
- π Interactive web form for dynamic data querying
- β‘ Real-time Elasticsearch data retrieval with complex filtering
- π Auto-generated reports (Text & CSV formats) with custom formatting
- πΎ Automatic file storage system for data persistence
- π― Configurable search parameters (amounts, time ranges, entity filters)
- π§ Scalable architecture for handling large datasets
π οΈ Setup requirements
Prerequisites
- Elasticsearch cluster running on
https://localhost:9220 - Transaction dataset indexed in
bank_transactionsindex - Sample dataset: Download from Bank Transaction Dataset
- File system access to
/tmp/directory for report storage - HTTP Basic Authentication credentials for Elasticsearch
Required Elasticsearch Index Structure
This template uses the Bank Transaction Dataset from GitHub: https://github.com/dataminexcode/n8n-workflow/blob/main/Dynamic%20Search%20Interface%20with%20Elasticsearch%20and%20Automated%20Report%20Generation/data
You can use this python script for importing the csv file into elasticsearch: Python script for importing data
Your bank_transactions index should contain documents with these fields:
{
"transaction_id": "TXN_123456789",
"customer_id": "CUST_000001",
"amount": 5000,
"merchant_category": "grocery_net",
"timestamp": "2025-08-10T15:30:00Z"
}
Dataset Info: This dataset contains realistic financial transaction data perfect for testing search algorithms and report generation, with over 1 million transaction records including various transaction patterns and data types.
Credentials Setup
- Create HTTP Basic Auth credentials in n8n
- Configure with your Elasticsearch username/password
- Assign to the "Search Elasticsearch" node
βοΈ Configuration
1. Form Customization
- Webhook Path: Update the webhook ID if needed
- Form Fields: Modify amounts, time ranges, or add new filters
- Validation: Adjust required fields based on your needs
2. Elasticsearch Configuration
- URL: Change
localhost:9220to your ES cluster endpoint - Index Name: Update
bank_transactionsto your index name - Query Logic: Modify search criteria in "Build Search Query" node
- Result Limit: Adjust the
size: 100parameter for more/fewer results
3. File Storage
- Directory: Change
/tmp/to your preferred storage location - Filename Pattern: Modify
fraud_report_YYYY-MM-DD.{ext}format - Permissions: Ensure n8n has write access to the target directory
4. Report Formatting
- CSV Headers: Customize column names in the Format Report node
- Text Layout: Modify the report template for your organization
- Data Fields: Add/remove transaction fields as needed
π How to use
For Administrators:
- Import this workflow template
- Configure Elasticsearch credentials
- Activate the workflow
- Share the webhook URL with data analysts
For Data Analysts:
- Access the search interface via the webhook URL
- Set parameters: Minimum amount, time range, entity filter
- Choose format: Text report or CSV export
- Submit form to generate instant data report
- Review results in the generated file
Sample Use Cases:
- Data analysis: Search for transactions > $10,000 in last 24 hours
- Entity investigation: Filter all activity for specific customer ID
- Pattern analysis: Quick analysis of transaction activity patterns
- Business reporting: Generate CSV exports for business intelligence
- Dataset testing: Perfect for testing with the transaction dataset
π Sample Output
Text Report Format:
DATA ANALYSIS REPORT
====================
Search Criteria:
- Minimum Amount: $10000
- Time Range: Last 24 Hours
- Customer: All
Results: 3 transactions found
TRANSACTIONS:
=============
1. Transaction ID: TXN_123456789
Customer: CUST_000001
Amount: $15000
Merchant: grocery_net
Time: 2025-08-10T15:30:00Z
CSV Export Format:
Transaction_ID,Customer_ID,Amount,Merchant_Category,Timestamp
"TXN_123456789","CUST_000001",15000,"grocery_net","2025-08-10T15:30:00Z"
π§ Customization ideas
Enhanced Analytics Features:
- Add data validation and quality checks
- Implement statistical analysis (averages, trends, patterns)
- Include data visualization charts and graphs
- Generate summary metrics and KPIs
Advanced Search Capabilities:
- Multi-field search with complex boolean logic
- Fuzzy search and text matching algorithms
- Date range filtering with custom periods
- Aggregation queries for data grouping
Integration Options:
- Email notifications: Alert teams of significant data findings
- Slack integration: Post analytics results to team channels
- Dashboard updates: Push metrics to business intelligence systems
- API endpoints: Expose search functionality as REST API
Report Enhancements:
- PDF generation: Create formatted PDF analytics reports
- Data visualization: Add charts, graphs, and trending analysis
- Executive summaries: Include key metrics and business insights
- Export formats: Support for Excel, JSON, and other data formats
π·οΈ Tags
elasticsearch, data-search, reporting, analytics, automation, business-intelligence, data-processing, csv-export
π Use cases
- Business Intelligence: Organizations analyzing transaction patterns and trends
- E-commerce Analytics: Detecting payment patterns and customer behavior analysis
- Data Science: Real-time data exploration and pattern recognition systems
- Operations Teams: Automated reporting and data monitoring workflows
- Research & Development: Testing search algorithms and data processing techniques
- Training & Education: Learning Elasticsearch integration with realistic datasets
- Financial Technology: Transaction data analysis and business reporting systems
β οΈ Important notes
Security Considerations:
- Never expose Elasticsearch credentials in logs or form data
- Implement proper access controls for the webhook URL
- Consider encryption for sensitive data processing
- Regular audit of generated reports and access logs
Performance Tips:
- Index optimization improves search response times
- Consider pagination for large result sets
- Monitor Elasticsearch cluster performance under load
- Archive old reports to manage disk usage
Data Management:
- Ensure data retention policies align with business requirements
- Implement audit trails for all search operations
- Consider data privacy requirements when processing datasets
- Document all configuration changes for maintenance
This template provides a production-ready data search and reporting system that can be easily customized for various data analysis needs. The modular design allows for incremental enhancements while maintaining core search and reporting functionality.
Dynamic Search Interface with Elasticsearch and Automated Report Generation
This n8n workflow provides a dynamic search interface using an n8n form, queries an Elasticsearch instance, and generates a CSV report of the search results, which can then be downloaded. This setup is ideal for internal tools, data exploration, or generating on-demand reports from large datasets.
What it does
- Triggers on Form Submission: The workflow starts when a user submits a search query through a dedicated n8n form.
- Constructs Elasticsearch Query: It takes the user's input from the form and dynamically constructs a query suitable for Elasticsearch.
- Executes Elasticsearch Search: It sends the constructed query to an Elasticsearch instance via an HTTP Request to retrieve relevant data.
- Processes Search Results: The raw data from Elasticsearch is processed and transformed into a structured format.
- Generates CSV Report: The processed data is then converted into a CSV file.
- Provides Downloadable Report: The generated CSV file is made available for download, likely as a response to the form submission, allowing the user to immediately access their report.
Prerequisites/Requirements
- n8n Instance: A running n8n instance to host the workflow.
- Elasticsearch Instance: Access to an Elasticsearch instance with data indexed that you wish to search.
- n8n Form Trigger: The n8n Form Trigger node will create a public URL for your search interface.
- HTTP Request Node: Configured to interact with your Elasticsearch API.
Setup/Usage
- Import the workflow: Download the provided JSON and import it into your n8n instance.
- Configure the "On form submission" node:
- Define the form fields that users will use for their search queries (e.g., a "Search Term" text field).
- Copy the webhook URL generated by this node; this will be the URL for your search interface.
- Configure the "Code" node:
- Adjust the JavaScript code within this node to correctly parse the incoming form data and construct the Elasticsearch query payload based on your specific Elasticsearch index and search requirements.
- Configure the "HTTP Request" node:
- Set the URL to your Elasticsearch search endpoint (e.g.,
http://localhost:9200/your_index/_search). - Set the HTTP Method to
POST. - Ensure the Body Content Type is
JSON. - The Body should reference the output of the "Code" node, which contains your dynamically generated Elasticsearch query.
- Add any necessary authentication headers if your Elasticsearch instance requires them.
- Set the URL to your Elasticsearch search endpoint (e.g.,
- Configure the "Read/Write Files from Disk" node:
- This node is used to generate the CSV file. You will need to configure it to take the output from the Elasticsearch query, format it as CSV, and potentially set the filename.
- Ensure the output of this node is correctly passed back to the form trigger to enable download.
Once configured, users can access the form URL, submit their search queries, and receive a downloadable CSV report of the results directly from the n8n interface.
Related Templates
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chatβturn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. π What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing π§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation π Required Credentials OpenAI API Setup Go to platform.openai.com β API keys (sidebar) Click "Create new secret key" β Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β Dashboard β API Keys Generate a new API key β Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βοΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβchat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" π― Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration β οΈ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions
Automate Dutch Public Procurement Data Collection with TenderNed
TenderNed Public Procurement What This Workflow Does This workflow automates the collection of public procurement data from TenderNed (the official Dutch tender platform). It: Fetches the latest tender publications from the TenderNed API Retrieves detailed information in both XML and JSON formats for each tender Parses and extracts key information like organization names, titles, descriptions, and reference numbers Filters results based on your custom criteria Stores the data in a database for easy querying and analysis Setup Instructions This template comes with sticky notes providing step-by-step instructions in Dutch and various query options you can customize. Prerequisites TenderNed API Access - Register at TenderNed for API credentials Configuration Steps Set up TenderNed credentials: Add HTTP Basic Auth credentials with your TenderNed API username and password Apply these credentials to the three HTTP Request nodes: "Tenderned Publicaties" "Haal XML Details" "Haal JSON Details" Customize filters: Modify the "Filter op ..." node to match your specific requirements Examples: specific organizations, contract values, regions, etc. How It Works Step 1: Trigger The workflow can be triggered either manually for testing or automatically on a daily schedule. Step 2: Fetch Publications Makes an API call to TenderNed to retrieve a list of recent publications (up to 100 per request). Step 3: Process & Split Extracts the tender array from the response and splits it into individual items for processing. Step 4: Fetch Details For each tender, the workflow makes two parallel API calls: XML endpoint - Retrieves the complete tender documentation in XML format JSON endpoint - Fetches metadata including reference numbers and keywords Step 5: Parse & Merge Parses the XML data and merges it with the JSON metadata and batch information into a single data structure. Step 6: Extract Fields Maps the raw API data to clean, structured fields including: Publication ID and date Organization name Tender title and description Reference numbers (kenmerk, TED number) Step 7: Filter Applies your custom filter criteria to focus on relevant tenders only. Step 8: Store Inserts the processed data into your database for storage and future analysis. Customization Tips Modify API Parameters In the "Tenderned Publicaties" node, you can adjust: offset: Starting position for pagination size: Number of results per request (max 100) Add query parameters for date ranges, status filters, etc. Add More Fields Extend the "Splits Alle Velden" node to extract additional fields from the XML/JSON data, such as: Contract value estimates Deadline dates CPV codes (procurement classification) Contact information Integrate Notifications Add a Slack, Email, or Discord node after the filter to get notified about new matching tenders. Incremental Updates Modify the workflow to only fetch new tenders by: Storing the last execution timestamp Adding date filters to the API query Only processing publications newer than the last run Troubleshooting No data returned? Verify your TenderNed API credentials are correct Check that you have setup youre filter proper Need help setting this up or interested in a complete tender analysis solution? Get in touch π LinkedIn β Wessel Bulte
AI-powered code review with linting, red-marked corrections in Google Sheets & Slack
Advanced Code Review Automation (AI + Lint + Slack) Whoβs it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting β all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0β10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your teamβs channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow β reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why itβs valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n β combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your teamβs review history transparent and centralized.