π¬ Generate AI images with APImage and upload to Google Drive
β‘ 1,169 views Β· π¬ Content Creation & Video
Description
AI Image Generator Workflow
This workflow lets you automatically generate AI images with the APImage API π‘₯, download the generated image, and upload it to any serivce you want (e.g., Google Drive, Notion, Social Media, etc.).
AI Image Generate APImage.jpg
π§© Nodes Overview
1. Generate Image (Trigger)
This node contains the following fields:
- Image Prompt: (text input)
- Dimensions:
Square,Landscape,Portrait - AI Model:
Basic,Premium
This acts as the entry point to your workflow.
It collects input and sends it to the APImage API node.
Note: You can swap this node with any other node that lets you define the parameters shown above.
2. APImage API (HTTP Request)
This node sends a POST request to:
https://apimage.org/api/ai-image-generate
The request body is dynamically filled with values from the first node:
{
"prompt": "{{ $json['Describe the image you want'] }}",
"dimensions": "{{ $json['Dimensions'] }}",
"model": "{{ $json['AI Model'] }}"
}
β
Make sure to set your API Key in the Authorization header like this:
Bearer YOUR_API_KEY
π You can find your API Key in your APImage Dashboard π‘₯
3. Download Image (HTTP Request)
Once the image is generated, this node downloads the image file using the URL returned by the API:
{{ $json.images[0] }}
The image is stored in the output field: generated_image
4. Upload to Google Drive
This node takes the image from the generated_image field and uploads it to your connected Google Drive.
π You can configure a different target folder or replace this node with:
- Dropbox
- WordPress
- Notion
- Shopify
- Any other destination
Make sure to pass the correct filename and file field, as defined in the βDownload Imageβ node.
Set up Google Drive credentials π‘₯
β¨ How To Get Started
- Double-click the APImage API node.
- Replace
YOUR_API_KEYwith your actual key (keepBearerprefix). - Open the Generate Image node and test the form.
π§ How to Customize
- Replace the Form Trigger with another node if youβre collecting data elsewhere (e.g., via Airtable, Notion, Webhook, Database, etc.)
- Modify the Upload node if youβd like to send the image to other tools like Slack, Notion, Email, or an S3 bucket.
π API Docs & Resources
ποΈ Node Connections
Generate Image β APImage API β Download Image β Upload to Google Drive
β This template is ideal for:
- Content creators automating media generation
- SaaS integrations for AI tools
- Text-to-image pipelines
π Nodes Used
HTTP Request, Google Drive, n8n Form Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File