n8n

How to Automate MongoDB Swift Code Collection?

Collect bank code records from public pages by country and load them into MongoDB. Great for ops and data teams that need a clean reference table for payouts, compliance checks, or data enrichment.

The run starts on manual execute. It pulls a list of country links, splits them into single country batches, and normalizes each country to an ISO code using uProc. For each page, it builds the URL, stores the HTML in a local cache, and waits one second to avoid rate limits. The parser reads names, city, branch, and swift code fields, follows next page links, and keeps inserting documents in MongoDB with timestamps. Caching cuts repeat downloads, and pagination ensures full coverage across all pages.

You only need a MongoDB connection and a uProc API key. Point the MongoDB node to your database and confirm the collection name. Expect big time savings if you currently copy and paste data. Use it to build a central bank code dataset, enrich customer bank profiles, or back office checks before sending payments.

What are the key features?

  • Manual start for full control over when data collection runs
  • Country list scraping and batching to process one country at a time
  • uProc country normalization to add consistent ISO codes
  • URL building and HTML caching to avoid repeat downloads
  • One second throttle to respect remote servers
  • HTML parsing for names, city, branch, and swift code fields
  • Pagination follow using next page detection to capture all results
  • Direct MongoDB inserts with createdAt and updatedAt timestamps

What are the benefits?

  • Reduce manual web research from 8 hours to 20 minutes
  • Automate up to 95% of data entry with parsing and pagination
  • Improve data accuracy by 30% with ISO code normalization
  • Handle thousands of records using batching and caching
  • Connect website data to MongoDB for instant access by your team

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with MongoDB and uProc. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a MongoDB credential. Enter your connection string, database name, username, and password if required. Name the credential clearly, for example mongo-prod.
  4. In the n8n credentials manager, create a uProc credential. Visit the uProc website to create an API key, then paste it into the credential. Name it clearly, for example uproc-main.
  5. Open the MongoDB insert node and select your MongoDB credential. Confirm the target collection name and review the mapped fields for iso_code, country, page, name, branch, city, swift_code, createdAt, and updatedAt.
  6. Review the HTML Extract nodes. If the target site structure changes, update the CSS selectors for countries, table fields, and the next page link.
  7. Check the file cache path in the Read and Write Binary File nodes. If you run self hosted, ensure the directory exists and has write permissions. The Create Directory node can help initialize the folder.
  8. Open the uProc node and confirm it uses your uProc credential. Make sure your account has enough quota to normalize all countries.
  9. Click Execute to run a test. Watch the logs to see batch progress, caching behavior, and pagination. Wait until documents appear in your MongoDB collection.
  10. Run it a second time to confirm caching works. You should see fewer HTTP downloads and faster execution if the files already exist.
  11. If no data appears, check credentials, database firewall rules, and the selectors in HTML Extract. Increase the wait time if you see rate limits, and adjust batch size if you need faster or slower runs.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

MongoDB

Sign up

Atlas Free (M0): $0 / mo (free forever)

uProc

Sign up

Pay-as-you-go: from €1 per 1,000 rows via API (price varies by tool)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.