receive schedule events and google sheets and chain LLM
Configured with Chain LLM, Facebook Graph Api, Google Sheets, HTTP Request, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Data store
- Transform
- AI & models
- Web / API
- Integration
- Wait
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Scheduled Start: Check for New Posts | Trigger | Schedule Trigger | See node parameters |
| 1. Get Next Post Idea from Sheet | Data store | Google Sheets | See node parameters |
| 2. Prepare Input Variables (Topic, Audience, etc.) | Transform | Edit Fields | See node parameters |
| 3a. Generate Content Concept (Gemini) | AI & models | Chain LLM | See node parameters |
| (LLM Model for Concept) | AI & models | LM Chat Google Gemini | See node parameters |
| (Parse Concept JSON) | Transform | Output Parser Structured | See node parameters |
| 3b. Generate Image Prompt Options (Gemini) | AI & models | Chain LLM | See node parameters |
| (LLM Model for Prompts) | AI & models | LM Chat Google Gemini | See node parameters |
| (Parse Prompts JSON) | Transform | Output Parser Structured | See node parameters |
| 3c. Generate Post Caption (Gemini) | AI & models | Chain LLM | See node parameters |
| (LLM Model for Caption) | AI & models | LM Chat Google Gemini | See node parameters |
| (Parse Caption JSON) | Transform | Output Parser Structured | See node parameters |
| 4. Generate Image using Prompt 1 (Replicate Flux) | Web / API | HTTP Request | POST |
| 5. Prepare Data for Instagram API | Transform | Edit Fields | See node parameters |
| 6a. Create Instagram Media Container | Integration | Facebook Graph Api | See node parameters |
| 6b. Wait for Container Processing | Wait | Wait | See node parameters |
| 6c. Publish Post to Instagram | Integration | Facebook Graph Api | See node parameters |
| 7. Update Post Status in Sheet | Data store | Google Sheets | update |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
facebookGraphApigooglePalmApigoogleSheetsOAuth2ApihttpHeaderAuth
Workflow notes
01. Content Concept Generation
01. Content Concept Generation
Purpose: This step uses Google Gemini to generate one unique content concept tailored for the specified platform (Instagram/LinkedIn), based on the input topic, audience, and brand voice. The format is fixed to "Single Image".
Input (from Node '2. Prepare Input Variables'):
Topic(string)TargetAudience(string)BrandVoice(string)Platform(string: 'Instagram' )
Output (JSON):
{"ideas": [{"concept": "Generated concept text...", "suggested_format": "Single Image"}]}
03b. Image Generation
03b. Image Generation
Purpose: Generates the actual image using the first detailed prompt created in step 3b. It sends this prompt to the Replicate API, specifically using the 'Flux 1.1 Pro Ultra' model.
Input (from Node '3b. Generate Image Prompt Options'):
prompt(string: The first prompt string fromprompt_options[0].prompts[0])
Output (from Replicate API):
- JSON containing the
outputURL of the generated image (e.g.,{"output": "https://replicate.delivery/..."})
02. Image Prompt Elaboration & Options
02. Image Prompt Elaboration & Options
Purpose: Takes the generated content concept and expands on it to create two distinct, detailed image generation prompts. These prompts are optimized for the target platform and suitable for AI image generators like Replicate Flux.
Input (from Nodes '2. Prepare Input Variables' & '3a. Generate Content Concept'):
ChosenIdea(string: Concept from step 3a)OriginalTopic(string)TargetAudience(string)BrandVoice(string)Platform(string: 'Instagram')
Output (JSON):
{"expanded_post_concept": "Elaborated concept description...", "prompt_options": [{"option_description": "Option 1: ...", "prompts": ["Detailed prompt 1..."]}, {"option_description": "Option 2: ...", "prompts": ["Detailed prompt 2..."]}]}
03a. Caption Generation
03a. Caption Generation
Purpose: Uses Google Gemini to write a short, engaging social media caption specifically tailored for the target platform. The caption complements the image (represented by the first generated prompt) and aligns with the overall content strategy. Includes relevant hashtags.
Input (from Nodes '1. Get Next Post Idea', '3a. Generate Content Concept', '3b. Generate Image Prompt Options'):
ImagePrompt(string: The first prompt from step 3b)ChosenIdea(string: Concept from step 3a)OriginalTopic(string)TargetAudience(string)BrandVoice(string)Platform(string: 'Instagram' or 'LinkedIn')
Output (JSON):
{"Caption": "Generated caption text with #hashtags..."}
04. Instagram Publishing
04. Instagram Publishing
Purpose: This block takes the final image URL and caption, prepares them for the Instagram Graph API, uploads the media to create a container, waits for Instagram to process it, and finally publishes the container as a post to the connected Instagram account.
Input (from Nodes '3c. Generate Post Caption (Gemini)' & '4. Generate Image using Prompt 1 (Replicate Flux)'):
ImageURL(string: URL of the generated image from Replicate)Caption(string: Generated post text with hashtags from Gemini)
Process:
- Format Data (
5. Prepare Data...): Organizes the ImageURL and Caption into the required structure. - Create Media Container (
6a. Create...): Sends theimage_urlandcaptionto the Instagram Graph API (mediaedge) to initiate the upload. Receives a containerid. - Wait for Processing (
6b. Wait...): Pauses the workflow to allow Instagram's servers time to process the uploaded media. Note: Wait time might need adjustment depending on media size and API responsiveness. - Publish Media (
6c. Publish...): Sends the containerid(ascreation_id) to the Instagram Graph API (media_publishedge) to make the post live.
Output: The content is published as a new post on the target Instagram profile. The final node (6c. Publish Post...) returns the id of the successfully published media object on Instagram.
05. Finalize: Update Sheet Status
05. Finalize: Update Sheet Status
Purpose: Marks the processed post idea as completed in the Google Sheet.
Action: Finds the corresponding row in the sheet (using the 'Topic' to match) and updates its 'Status' column to '1'. This prevents the same idea from being processed again by the workflow in future runs.
00. Scheduled Start & Input Preparation
00. Scheduled Start & Input Preparation
Purpose: Initiates the workflow automatically based on the user-defined schedule. Fetches the next available post idea (Status=0) from Google Sheets and prepares the necessary input variables (Topic, Audience, Voice, Platform) for the content generation steps.
receive schedule events and google sheets and chain llm
receive schedule events and google sheets and chain llm
Purpose and structure
This folder contains the receive schedule events and google sheets and chain llm workflow. Its executable nodes use chainLlm, facebookGraphApi, googleSheets, httpRequest, lmChatGoogleGemini, outputParserStructured, scheduleTrigger, set, wait. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Scheduled Start: Check for New Posts
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Wait/0905_Wait_Schedule_Create_Webhook.json MIT; preserve source notices.