Quick overview
This workflow collects scheduled social post details via an n8n form and creates a Google Drive package containing a tweet.txt file and 1–4 numbered images, while validating inputs, preventing duplicate package folders, and cleaning up incomplete uploads.
How it works
- Receives a submission from an n8n Form Trigger with a scheduled date/time, post text, an optional label, and 1–4 uploaded PNG/JPG images.
- Validates the date and time format, ensures the post text is not empty, verifies the image count and file types, and generates a canonical package folder name.
- If the submission is invalid, returns a form completion message listing the corrections needed.
- If valid, checks Google Drive in the configured parent folder to see whether a folder with the generated package name already exists.
- If a duplicate exists, returns a form completion message indicating nothing was created.
- If no duplicate exists, creates a new Google Drive folder, writes the post text to tweet.txt, renames images to 01–04 with their original extensions, and uploads all files to the folder.
- If any upload fails, deletes the newly created folder and returns an error message; otherwise, returns a success message confirming the package was created.
Setup
- Create a Google Drive OAuth credential in n8n and connect it to the Google Drive nodes.
- Set the destination parent folder by replacing PASTE_GOOGLE_DRIVE_PARENT_FOLDER_ID_HERE in the workflow with your Google Drive folder ID.
- Activate the workflow and use the generated form URL to submit scheduled post packages.