Skip to main content

Fetch random dog images from Dog CEO API via webhook

Workflow preview

Workflow preview
100%
Fetch random dog images from Dog CEO API via webhook preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n template allows you to instantly fetch a random dog image from the Dog CEO API by simply sending a webhook request. It's a fun and simple way to integrate random dog photos into your proje...

Best for

  • Content Creation automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.httprequest, n8n-nodes-base.webhook, n8n-nodes-base.respondtowebhook

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ist00dent.

Original n8n.io source

1.1 Workflow description

Title
Fetch random dog images from Dog CEO API via webhook
Workflow name
Fetch random dog images from Dog CEO API via webhook

This n8n template allows you to instantly fetch a random dog image from the Dog CEO API by simply sending a webhook request. It's a fun and simple way to integrate random dog photos into your projects, whether for websites, applications, or playful automations.


๐Ÿ”ง How it works

  • Trigger Webhook: This node acts as the entry point for the workflow. It listens for any incoming POST request. No specific data is required in the webhook body, as the workflow fetches a random image.
  • Fetch Random Dog Image: This node makes an HTTP GET request to https://dog.ceo/api/breeds/image/random. The API responds with a JSON object containing the URL of a random dog image.
  • Respond with Image URL: This node sends the URL of the random dog image back to the service that initiated the webhook.

๐Ÿ‘ค Who is it for?

This workflow is ideal for:

  • Developers: Quickly integrate random dog images into web applications, bots, or prototypes.
  • Content Creators: Get fresh, random dog photos for social media, blogs, or presentations.
  • Learning n8n: A straightforward example of using a webhook to trigger an API call and return data.

Anyone who loves dogs!


๐Ÿ“‘ Data Structure

When you trigger the webhook, you can send an empty POST request body.

The workflow will return a JSON response similar to this (the message URL will vary):

{
  "message": "https://images.dog.ceo/breeds/hound-walker/n02089867_2626.jpg",
  "status": "success"
}

โš™๏ธ Setup Instructions

  • Import Workflow: In your n8n editor, click "Import from JSON" and paste the provided workflow JSON.
  • Configure Webhook Path:
    • Double-click the Trigger Webhook node.
    • In the 'Path' field, set a unique and descriptive path (e.g., /get-dog-image).
  • Activate Workflow: Save and activate the workflow.

๐Ÿ“ Tips

  • Download the Image: Instead of just returning the URL, you can download the image and then process it. Insert another HTTP Request node after Fetch Random Dog Image to download the image binary.
    • Set the HTTP Request node's 'Response Format' to 'Binary'.
    • Use the expression ={{ $json.message }} for the URL.
  • Save to Cloud Storage: After downloading the image (as described above), you can save it to various cloud storage services:
    • Google Drive: Add a Google Drive node. Connect it to the output of the image download node. Configure it to upload the binary data to a specific folder.
    • Amazon S3: Add an AWS S3 node. Configure it to upload the binary data, specifying your bucket and desired filename.
  • Dropbox: Use the Dropbox node to upload the image file.
  • Send as a Message: Share the dog image directly in a chat or email:
    • Slack/Discord/Telegram: Use the respective integration node to send the image URL or the downloaded image as an attachment.
    • Email: Attach the downloaded image to an email using an Email or Gmail node.
  • Display on a Web Page: If you're embedding this into a web application, you can simply use the returned URL in an tag to display the image.
  • Error Handling: You can add an Error Trigger node to catch any issues during the image fetching process (e.g., if the Dog CEO API is down) and send notifications.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Note for Webhook Trigger

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Note for Fetch Dog Image

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Note for Webhook Response

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Fetch Random Dog Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Trigger Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 6 - Respond with Image URL

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.2

3. Summary Table

Workflow Fetch random dog images from Dog CEO API via webhook
Complexity intermediate
Nodes 6
Categories Content Creation
Author ist00dent
Published 02 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4598/4598.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Fetch random dog images from Dog CEO API via webhook do?

This n8n template allows you to instantly fetch a random dog image from the Dog CEO API by simply sending a webhook request. It's a fun and simple way to integrate random dog photos into your proje...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation use case.