Fetch & Save Random CocktailDB Data as JSON File

Manually triggers an HTTP request to CocktailDB API for random cocktail data, converts it to binary, and saves as 'cocktail.json' file.

n8n
Fetch & Save Random CocktailDB Data as JSON File

This workflow demonstrates a simple yet effective automation for extracting data from the CocktailDB API and persisting it locally as a JSON file. It begins with a manual trigger, allowing users to execute it on demand. The core functionality involves an HTTP Request node fetching a random cocktail recipe from 'https://www.thecocktaildb.com/api/json/v1/1/random.php', which returns structured JSON data including ingredients, instructions, and images.

Following the API call, the Move Binary Data node converts the JSON response into a binary format suitable for file operations. Finally, the Write Binary File node saves this data as 'cocktail.json' in the specified directory. This setup is ideal for quick data snapshots without complex configurations.

Benefits include effortless API-to-file automation, reducing manual copy-pasting and enabling repeatable data collection. It's perfect for prototyping, testing API integrations, or building datasets for apps, reports, or machine learning. Use cases span hobby projects like recipe collectors, educational demos on n8n file handling, or starters for broader data pipelines in food/beverage apps, ensuring reliable JSON exports every time.

$4.99
Last updated October 3, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related File & Document Management workflows

More from Samir Steiner

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.