Fetch Any Content Directly from an IPFS Hash

This Dify workflow provides a robust tool to fetch any content directly from the InterPlanetary File System (IPFS). It intelligently handles various input formats, whether it's a full 'ipfs://' URL or a bare CID hash, by automatically converting it into a valid API request to The Graph's IPFS gateway. The workflow then retrieves the content, smartly parsing JSON or returning raw text, delivering a streamlined solution for integrating decentralized storage into your applications.

    image for Fetch Any Content Directly from an IPFS Hash

    Workflow Overview

    What is this?

    What is this?

    This is an automated workflow that retrieves content directly from the InterPlanetary File System (IPFS). It takes any IPFS hash or full `ipfs://` URL as input, converts it into a proper API request for The Graph's IPFS gateway, and returns the fetched data, whether it's structured JSON or raw text.
    What problem does it solve?

    What problem does it solve?

    Struggling with the complexity of interacting with decentralized storage? This workflow removes the need to manually format IPFS URLs or write custom API request logic, saving you from the tedious task of handling different input formats and ensuring reliable data retrieval from the decentralized web.
    What will you get?

    What will you get?

    You will get a streamlined and reliable method to access IPFS content, enabling you to build applications that can effortlessly pull data from decentralized sources. This automation saves development time, reduces potential errors in URL formatting, and provides a direct bridge to the content stored on the InterPlanetary File System.

    Apps Included

    • Code
    • HTTP Request
    • Start

    How to Use

    Prerequisites

    Setup Steps

    1

    Install the Workflow

    Click the 'Install' button on this page to add the IPFS Content Fetcher workflow to your Dify workspace.

    2

    Run the Workflow

    Navigate to the workflow within your Dify app. In the 'Start' node's input field, paste the IPFS hash (e.g., 'Qm..._46_chars_long') or the full IPFS URL (e.g., 'ipfs://...').

    3

    Execute and View Results

    Click the 'Run' button. The workflow will execute, and the final output from the 'Return IPFS Content' node will contain the data fetched from the provided IPFS address.

    Pro Tips

    1
    To build a more robust application, you can chain this workflow's output into another Dify node. For example, parse the returned JSON content for specific keys or use an LLM node to analyze the raw text.
    2
    Consider implementing an error handling mechanism within your Dify app to manage cases where the IPFS content is not found or the API request fails.

    Information

    • Published date8/15/2025
    • Last updated8/15/2025

    Platform