Fahmi Oktafian
Hi! I’m Fahmi Oktafian, a developer and automation enthusiast with expertise in n8n, Node.js, and API integrations. I specialize in building smart, scalable workflows — from auto-publishing content to WordPress, sending automated Telegram notifications, to processing AI-based summaries and paraphrase. I’m passionate about helping businesses save time, increase efficiency, and automate their digital processes with clean and user-friendly solutions.
Templates by Fahmi Oktafian
Auto-generate & post AI images to Facebook using Gemini & Pollinations AI
This workflow is designed for content creators or AI artists who want to automate posting unique AI-generated images to their Facebook Page multiple times a day. It uses Google Gemini via LangChain to generate imaginative image prompts, and Pollinations AI to generate the images. Posts are published with hashtags and a clean caption. Who Is It For AI artists Facebook page managers Digital marketers looking for automated creative content What It Does Triggers 3x daily at 7:00, 11:00, and 17:00 (local time) Generates random AI image prompts in a retro-futuristic, cinematic, or surreal style using Google Gemini Fetches images from Pollinations AI using custom prompts Posts images automatically to your Facebook Page with hashtags Requirements n8n self-hosted or desktop (workflow uses schedule trigger) Pollinations API (no auth needed) Facebook Page with Facebook Graph API token: Required scopes: pagesmanageposts, pagesreadengagement, pagesshowlist Google Gemini API Key (used via LangChain node) How to Customize Change the prompt style in the Basic LLM Chain node (promptType: define) to suit your theme. Adjust Set The Generator Image node if you want: Different image sizes (width / height) Different seed randomness Other Pollinations models (&model=kontext) Add Telegram/Twitter nodes if you want cross-posting Use Set node to allow easy user-level configuration of models, hashtags, times, etc.
Generate images with Pollinations & blog articles with Gemini 2.5 from Telegram
This n8n workflow is a Telegram bot that allows users to either: Generate AI images using Pollinations API, or Generate blog articles using Gemini AI Users simply type image your prompt or blog your title, and the bot responds with either an AI-generated image or article. Who's it for This template is ideal for: Content creators and marketers who want to generate visual and written content quickly Telegram bot developers looking for real-world AI integration Educators or students automating content workflows Anyone managing content pipelines using Google Sheets What it does / How it works Telegram Interaction Trigger Telegram Message: Listens for new messages or button clicks via Telegram Classify Telegram Input: JavaScript logic to classify input as /start, /help, normal text, or callback Switch Input Type: Directs the flow based on the classification Menu & Help Send Main Menu to User: Shows "Generate Image", "Blog Article", "Help" options Switch Callback Selection: Routes based on button pressed (image, blog, or help) Send Help Instructions: Sends markdown instructions on how to use the bot Input Validation Validate Command Format: Ensures input starts with image or blog Notify Invalid Input Format: If validation fails, informs user of correct format Image Generator Prompt User for Image Description → When user clicks Generate Image Detect Text-Based Input Type → Detects if text is image or blog Switch Text Command Type → Directs whether to generate image or article Show Typing for Image Generation → Sends "uploading photo..." typing status Build Image Generation URL → Constructs Pollinations API image URL from prompt Download AI Image → Makes HTTP request to get the image Send Image Result to Telegram → Sends image to user via Telegram Log Image Prompt to Google Sheets → Logs prompt, image URL, date, and user ID Upload Image to Google Drive → Saves image to Google Drive folder Blog Article Generator Prompt User for Blog Title → When user clicks Blog Article Store Blog Prompt → Saves prompt for later use Log Blog Prompt to Google Sheets → Writes title + user ID to Google Sheets Send Article Style Options → Offers: Formal, Casual, or News style Store Selected Article Style → Updates row with chosen style in Google Sheets Fetch Last User Prompt → Finds the latest prompt submitted by this user Extract Last Blog Prompt → Extracts row for use in AI request Gemini Chat Wrapper → Handles input into LangChain node for AI processing Generate Article with Gemini → Calls Gemini to create 3-paragraph blog post Parse Gemini Response → Parses JSON string to extract title and content Send Article to Telegram → Sends blog article result back to user Log Final Article to Google Sheets → Updates row with final content and timestamp Requirements Telegram bot (via @BotFather) Pollinations API (free and public endpoint) Google Sheets & Drive (OAuth credential setup in n8n) Google Gemini / PaLM API key via LangChain Self-hosted or cloud n8n setup Setup Instructions Clone the workflow and import it into your n8n instance Set credentials: Telegram API Google Sheets OAuth Google Drive OAuth Gemini (via LangChain) Replace: Sheet ID with your own Google Sheet Folder ID on Google Drive chat_id placeholders if needed (use expressions instead) Deploy and send /start in your Telegram bot 🔧 Customization Tips Edit the Gemini prompt to adjust article length or tone Add extra style buttons like "SEO", "Story", "Academic" Add image post-processing (e.g. compression, renaming) Add error catching logic (e.g. if Pollinations image fails) Store images with filenames based on timestamp/user Security Considerations Use n8n credentials for all tokens (Telegram, Gemini, Sheets, Drive) Never hardcode your token inside HTTP nodes Do not expose real Google Sheet or Drive links in shared version Use Set node to collect all editable variables (like folder ID, sheet name)
Automate daily keyword research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automate keyword research using Google Sheets, Google Suggest, and Google Custom Search. Ideal for those building content pipelines, researching trends, or powering AI content generation with fresh search data. What it does This workflow automates the process of discovering a new keyword daily. It: Rotates through a keyword list in Google Sheets Selects one keyword per day Fetches autocomplete suggestions from Google Suggest Queries the Google Custom Search API for top results Returns structured JSON containing titles, links, and snippets How it works Manual Trigger – Initiates workflow manually Google Sheets – Reads keywords from a sheet (column: Title or Keyword) Code Node – Selects a daily keyword based on the number of days since July 4, 2025 Set Node – Saves the selected keyword as seed_keyword HTTP Request – Fetches autocomplete suggestions from Google Suggest API Function Node – Parses suggestions into usable items HTTP Request – Calls Google Custom Search API for each suggestion Code Node – Formats the search results into JSON How to set up Connect your Google Sheets OAuth2 credentials in n8n Use credential variables for Google Custom Search (⚠️ do not hardcode your key and cx) Replace the sample sheet ID with your own Run the workflow manually or schedule it daily Requirements Google account Enabled Custom Search JSON API on Google Cloud Google Sheet with a column labeled Title or Keyword n8n instance (cloud or self-hosted) How to customize Change the start date to control the keyword rotation cycle Randomize keyword selection instead of rotating Enrich results using tools like Ahrefs or SEMrush Push final output to Telegram, Notion, Slack, or Airtable Add filtering logic based on CPC, volume, or duplicates Example Sheet 📄 Click Here to access the example Google Sheet Sheet must contain a column Title or Keyword in the first row: Title teknologi AI berita viral tren startup
Automate income and expense tracking in Google Sheets via Telegram
Who’s it for This template is perfect for freelancers, small business owners, or financial assistants who want to record and approve financial transactions like income and expenses directly from Telegram, without opening a spreadsheet manually. It’s also useful for teams that require a supervisor to approve expenses before they’re finalized. What it does This workflow allows users to: Start a conversation via Telegram using the /start command. Choose to record an income or expense. Submit transaction data using a structured format. Store the data into Google Sheets in real time. For expenses, automatically notify a supervisor for approval. The supervisor can Approve ✅, Reject ❌, or View Details 👁. Sends feedback to the user based on supervisor action. 🔧 How it works Telegram Bot Trigger: Captures user input via message or inline button callback. Message Detection Logic: Differentiates between text input and button interactions. Switch Node: Routes the message type: /start: Displays income/expense buttons. Input text: Validates formatting and parses data. Callback: Handles approval/rejection process. Google Sheets Integration: Appends or updates entries in different sheets based on the data type. Notifications: User gets feedback (recorded, pending, approved, rejected). Supervisor receives inline button options for approval. Google Sheets Details You will need a Google Sheet with the following two worksheets: Sheet 1: income Sheet 2: Sheet1 (Default tab for expenses) 📱 Telegram Setup Instructions Create a bot using @BotFather. Save the bot token. Go to n8n Credentials → Telegram API and add: Access Token = your bot token In Telegram, send /start to your bot. Make sure your bot has enabled privacy mode (or disabled, if used in a group). 💡 For the approval flow, update the node Send Approval Request with the correct chatId of the supervisor's Telegram account. You can hardcode a static ID (e.g., "123456789") or pull from a variable if dynamic. 🛠 Requirements | Tool | Description | | -------------------------- | ----------------------------------- | | n8n (Cloud or Self-hosted) | Use latest stable version | | Telegram Bot | For user input and notifications | | Google Sheets | To store income and expense records | | Google OAuth2 Credentials | Required for Google Sheets node | ⚙️ How to customize the workflow Change the chat ID for supervisors in the node Send Approval Request. Modify the text or add new buttons in the inline keyboard node. Update Google Sheet ID and tab names if you’re using different sheets. Customize the approval logic, for example, route to different teams. ✅ Setup Steps Import the workflow JSON into your n8n instance. Configure Telegram API credential with your bot token. Connect your Google Sheets OAuth2 credential. Replace Google Sheet document ID and tab names with your own (via UI or “Expression” mode). Deploy and activate the workflow.