← All N8N workflows
AI & researchChain LLMFacebook Graph ApiGoogle SheetsHTTP RequestLM Chat Google Gemini

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.

Workflow preview
TriggerScheduled Start: Checkfor New PostsSchedule TriggerData store1. Get Next Post Ideafrom SheetGoogle SheetsTransform2. Prepare InputVariables (Topic,…Edit FieldsAI & models3a. Generate ContentConcept (Gemini)Chain LLMAI & models(LLM Model for Concept)LM Chat Google GeminiTransform(Parse Concept JSON)Output Parser StructuredAI & models3b. Generate ImagePrompt Options (Gemini)Chain LLMAI & models(LLM Model for Prompts)LM Chat Google GeminiTransform(Parse Prompts JSON)Output Parser StructuredAI & models3c. Generate PostCaption (Gemini)Chain LLMAI & models(LLM Model for Caption)LM Chat Google GeminiTransform(Parse Caption JSON)Output Parser StructuredWeb / API4. Generate Image usingPrompt 1 (Replicate…HTTP RequestTransform5. Prepare Data forInstagram APIEdit FieldsIntegration6a. Create InstagramMedia ContainerFacebook Graph ApiWait6b. Wait for ContainerProcessingWaitIntegration6c. Publish Post toInstagramFacebook Graph ApiData store7. Update Post Statusin SheetGoogle Sheets

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Scheduled Start: Check for New PostsTriggerSchedule TriggerSee node parameters
1. Get Next Post Idea from SheetData storeGoogle SheetsSee node parameters
2. Prepare Input Variables (Topic, Audience, etc.)TransformEdit FieldsSee node parameters
3a. Generate Content Concept (Gemini)AI & modelsChain LLMSee node parameters
(LLM Model for Concept)AI & modelsLM Chat Google GeminiSee node parameters
(Parse Concept JSON)TransformOutput Parser StructuredSee node parameters
3b. Generate Image Prompt Options (Gemini)AI & modelsChain LLMSee node parameters
(LLM Model for Prompts)AI & modelsLM Chat Google GeminiSee node parameters
(Parse Prompts JSON)TransformOutput Parser StructuredSee node parameters
3c. Generate Post Caption (Gemini)AI & modelsChain LLMSee node parameters
(LLM Model for Caption)AI & modelsLM Chat Google GeminiSee node parameters
(Parse Caption JSON)TransformOutput Parser StructuredSee node parameters
4. Generate Image using Prompt 1 (Replicate Flux)Web / APIHTTP RequestPOST
5. Prepare Data for Instagram APITransformEdit FieldsSee node parameters
6a. Create Instagram Media ContainerIntegrationFacebook Graph ApiSee node parameters
6b. Wait for Container ProcessingWaitWaitSee node parameters
6c. Publish Post to InstagramIntegrationFacebook Graph ApiSee node parameters
7. Update Post Status in SheetData storeGoogle Sheetsupdate

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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

  • facebookGraphApi
  • googlePalmApi
  • googleSheetsOAuth2Api
  • httpHeaderAuth

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 from prompt_options[0].prompts[0])

Output (from Replicate API):

  • JSON containing the output URL 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:

  1. Format Data (5. Prepare Data...): Organizes the ImageURL and Caption into the required structure.
  2. Create Media Container (6a. Create...): Sends the image_url and caption to the Instagram Graph API (media edge) to initiate the upload. Receives a container id.
  3. 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.
  4. Publish Media (6c. Publish...): Sends the container id (as creation_id) to the Instagram Graph API (media_publish edge) 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.

More in AI & research