Automate Swift Code Extraction and Database Population
detail.loadingPreview
This n8n workflow automates the extraction of SWIFT codes from a dedicated website and populates them into a MongoDB database. It efficiently navigates country pages, scrapes code details, and manages pagination for comprehensive data collection.
About This Workflow
This n8n workflow is designed to streamline the process of gathering SWIFT (Society for Worldwide Interbank Financial Telecommunication) codes from the website theswiftcodes.com. It begins by fetching a list of countries from the site's browse page. For each country, it iteratively scrapes SWIFT code information, including bank name, SWIFT code, city, and branch details. The workflow intelligently handles pagination within country pages and utilizes a uProc tool to normalize country data. Extracted data is then transformed into a structured format and inserted into a MongoDB database, ensuring that the collected SWIFT codes are up-to-date and organized for further use. The process also includes logic to avoid re-scraping previously processed pages, optimizing efficiency.
Key Features
- Automated SWIFT Code Scraping: Extracts SWIFT codes, bank names, cities, and branches directly from web pages.
- Country-Specific Data Collection: Iterates through all available countries to gather comprehensive data.
- Intelligent Pagination Handling: Automatically navigates through multiple pages of SWIFT codes for each country.
- Data Normalization: Leverages the
uProctool to normalize country information. - MongoDB Integration: Seamlessly inserts extracted data into a MongoDB database for organized storage.
- Efficient Caching: Avoids re-processing already scraped data to save resources.
How To Use
- Trigger Workflow: Click the 'execute' button on the manual trigger node to initiate the process.
- Fetch Country List: The workflow first fetches the list of countries from
https://www.theswiftcodes.com/browse-by-country/. - Normalize Country Names: Each country's name is normalized using the
uProctool for consistent data processing. - Iterate and Scrape: The workflow enters a loop to process each country:
a. Set Page URL: Determines the correct URL for the current country's SWIFT code page, potentially using previous pagination data.
b. Download HTML: Downloads the HTML content of the SWIFT code page.
c. Read Binary File (Optional Cache Check): Checks if the file has already been processed.
d. Extract SWIFT Data: Parses the HTML to extract SWIFT codes, bank names, cities, and branch details.
e. Prepare Data for Database: Formats the extracted data into structured documents for MongoDB.
f. Insert into MongoDB: Inserts the processed data into the
swifts.meetupcollection. g. Check for More Pages: Identifies if there are more pages of SWIFT codes for the current country. h. Loop Continuation: If more pages exist, the workflow continues to scrape them; otherwise, it moves to the next country. - Database Population: All extracted and transformed data is stored in your configured MongoDB instance.
Apps Used
Workflow JSON
{
"id": "9f495e24-e8d8-4343-81dc-a53b7fefc563",
"name": "Automate Swift Code Extraction and Database Population",
"nodes": 23,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 9f495e24-e8d8...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.