Générer des images IA avec APImage et les téléverser sur Google Drive

Intermédiaire

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 8 nœuds.Utilise principalement des nœuds comme FormTrigger, GoogleDrive, HttpRequest. Générer des images IA et les téléverser sur Google Drive avec APImage

Prérequis
  • Informations d'identification Google Drive API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "cba9e349b601c19a1409b9fd06680aff0a77829be13c8aad9a858d4cea7ff290",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e67847ce-f519-45a3-bba6-380af6cdd648",
      "name": "Télécharger l'image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        96,
        64
      ],
      "parameters": {
        "url": "={{ $json.images[0] }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "generated_image"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e380ad74-2cc6-4d1e-ae30-d1fca03cb39e",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -208
      ],
      "parameters": {
        "width": 976,
        "height": 252,
        "content": "## ✨ How To Get Started\n\n1. Double-click the **APImage API** node to open it.  \n2. Replace `YOUR_API_KEY` with your actual API Key (keep the `\"Bearer\"` prefix).  \n3. Use the **Generate Image** node to submit a request.\n\n> ℹ️ You can find your API Key inside the Dashboard of your APImage account.\n\n🔗 [Open the Dashboard 🡥](https://apimage.org/dashboard)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9ea17920-9c28-4d21-9f48-e64193fec34e",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        256
      ],
      "parameters": {
        "width": 480,
        "height": 304,
        "content": "### 📤 Choose Your Destination\n\nYou can replace the **\"Upload to Google Drive\"** node with any other service where you'd like to upload the AI-generated image — such as **Dropbox**, **WordPress**, **Shopify**, or **Notion**.\n\nJust make sure to use the correct **file name**, as defined in the **\"Download Image\"** node (Put Output in Field).\n\n\n\n\n\n\n\n\n[How to set up Google Drive credentials 🡥](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.googleDrive)"
      },
      "typeVersion": 1
    },
    {
      "id": "82a45985-c85e-404e-b202-6344d34c933c",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        256
      ],
      "parameters": {
        "width": 480,
        "height": 304,
        "content": "### 🧩 Choose Your Input\n\nYou can replace the **\"Generate Image\"** node with any other node that sends data to the **\"APImage API\"** node.  \nJust make sure the following parameters are set:\n\n- **`prompt`** – any text, up to **1000 characters**\n- **`dimensions`** – choose one of:  \n  `Square`, `Landscape`, `Portrait`\n- **`model`** – choose one of:  \n  `Basic`, `Premium` *(available for APImage Pro and business customers)*\n\n[View API Documentation 🡥](https://apimage.org/docs)"
      },
      "typeVersion": 1
    },
    {
      "id": "b48797c6-7c96-4e9a-827b-d05c435dbe13",
      "name": "APImage API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -128,
        64
      ],
      "parameters": {
        "url": "https://apimage.org/api/ai-image-generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"prompt\": \"{{ $json['Describe the image you want'] }}\",\n  \"dimensions\": \"{{ $json['Dimensions'] }}\",\n  \"model\": \"{{ $json['AI Model'] }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3d77e24e-cf80-4ace-9a58-faa4dd3a4f09",
      "name": "Générer l'image",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -352,
        64
      ],
      "webhookId": "b7487db2-4581-4fd6-b4e0-afac3d8466fb",
      "parameters": {
        "options": {},
        "formTitle": "APImage AI Image Generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Describe the image you want",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Dimensions",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Square"
                  },
                  {
                    "option": "Landscape"
                  },
                  {
                    "option": "Portrait"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "AI Model",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Basic"
                  },
                  {
                    "option": "Premium"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Generate images in seconds"
      },
      "typeVersion": 2.2
    },
    {
      "id": "1a9c4e5a-b223-4c71-98b6-d88306cc974a",
      "name": "Télécharger le fichier",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        320,
        64
      ],
      "parameters": {
        "name": "generated_image",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "inputDataFieldName": "generated_image"
      },
      "typeVersion": 3
    },
    {
      "id": "358d7fe8-6e82-4e77-a7e4-788e94b79e40",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        640
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 352,
        "content": "### 🐞 Debug Support\n\n**504 Gateway Timeout Error**  \nThis error typically occurs when n8n reaches its maximum wait time for a job to complete. To resolve it, increase the value of the **Timeout** setting (in milliseconds). For example, setting it to `180000` allows up to 3 minutes.\n\nThis issue is most common on the cloud-hosted version of n8n, where stricter limits apply. On self-hosted instances, the error rarely occurs, as you have full control over execution settings.\n\nBut no worries, even if this error occurs, APImage is still able to generate the image, you will find every image inside your APImage Dashboard → Usage Data → Image Generations\n\nIf you experience any issues regarding the APImage API itself, contact: \n\n✉ [ask@support@apimage.org](mailto:ask@support@apimage.org)"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "b48797c6-7c96-4e9a-827b-d05c435dbe13": {
      "main": [
        [
          {
            "node": "e67847ce-f519-45a3-bba6-380af6cdd648",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e67847ce-f519-45a3-bba6-380af6cdd648": {
      "main": [
        [
          {
            "node": "1a9c4e5a-b223-4c71-98b6-d88306cc974a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3d77e24e-cf80-4ace-9a58-faa4dd3a4f09": {
      "main": [
        [
          {
            "node": "b48797c6-7c96-4e9a-827b-d05c435dbe13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Workflows recommandés

Remplacer et éclairer automatiquement l'arrière-plan de n'importe quelle image avec APImage
Remplacer et rééclairer automatiquement l'arrière-plan de n'importe quelle image avec APImage
Form Trigger
Google Drive
Http Request
+
Form Trigger
Google Drive
Http Request
10 NœudsGegenfeld
Divers
Version professionnelle de l'automatisation de blog WordPress (recherche approfondie) v2.1 sur le marché
Automatisation de la création de blog optimisé pour le SEO avec GPT-4o, Perplexity AI et support multilingue
If
Set
Xml
+
If
Set
Xml
125 NœudsDaniel Ng
Création de contenu
Automatisation de la création de contenu viral avec OpenAI, ElevenLabs et Fal.ai pour les vidéos, les podcasts et l'ASMR
Automatiser la création de contenu viral pour la vidéo, les podcasts et l'ASMR avec OpenAI, ElevenLabs et Fal.ai
Set
Code
Wait
+
Set
Code
Wait
97 NœudsAdam Crafts
Création de contenu
Téléchargeur automatique de vidéos IMDB (avec téléversement Google Drive et alertes par e-mail)
Téléchargeur automatique de vidéos IMDB (avec téléchargement Google Drive et alerte par e-mail)
If
Wait
Email Send
+
If
Wait
Email Send
19 NœudsSk developer
Création de contenu
Convertisseur et améliorateur groupé de photos d'identité avec Google Drive et Nano Banana API
Convertisseur et améliorateur groupé de photos d'identité avec Google Drive et l'API Nano Banana
If
Set
Code
+
If
Set
Code
16 Nœudspanyanyany
Création de contenu
Génération automatique de vidéos et de sons de niveau cinématographique pour animaux à partir de formuliers avec Dumpling AI
Convertir des saisies de formulaires en vidéo de qualité cinématographique avec GPT-4, Dumpling AI et audio ElevenLabs
Set
Code
Wait
+
Set
Code
Wait
23 NœudsYang
Création de contenu
Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds8
Catégorie2
Types de nœuds4
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Gegenfeld

Gegenfeld

@gegenfeld

We at Gegenfeld are an EdTech platform dedicated to delivering high-quality on-demand courses and interactive training sessions for professional development at all skill levels. With our commitment to "Accelerate your future," we empower professionals to enhance their expertise through engaging, industry-focused learning experiences. On n8n, we share some of the workflows used in our interactive training to provide deeper insights and practical applications.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34