This n8n workflow automates the process of generating, editing, and sharing images using OpenAI’s image APIs, integrated with Google Drive, imgbb, and Telegram for seamless distribution. It is triggered by a form submission where users specify prompts, quality, and optionally upload an initial image. The workflow then either creates a new image from a prompt or edits an existing one, converts the image into a file, and uploads it to Google Drive or imgbb. The final image link is shared via Telegram and stored for easy access.
Here’s a step-by-step breakdown:
1. The workflow begins with a form trigger where users input a prompt, select quality, and upload or specify an image URL.
2. Based on the input, a switch node determines if a new image should be generated from a prompt or an existing image should be edited.
3. If generating a new image, the OpenAI API’s image generation endpoint creates a 1024×1024 image based on the prompt, with specified quality.
4. If editing, the image is sent to OpenAI’s image editing endpoint along with a prompt, resulting in an edited version.
5. The generated or edited image in base64 format is converted into a binary PNG file.
6. The image file is uploaded to Google Drive for storage, with access permissions set to share with anyone.
7. The image is also uploaded to imgbb for online hosting, and a direct link is generated.
8. Links to the image on Google Drive and imgbb are saved and prepared for sharing.
9. Finally, the image is sent via Telegram to a specified chat, with a caption including the prompt, quality, and view link.
This workflow is ideal for creative teams, content creators, or AI enthusiasts who wish to automate image creation and sharing, ensuring quick dissemination of AI-generated visuals across multiple platforms.
Reviews
There are no reviews yet.