Code workflows
147 results — all source-linked n8n references
Create KSeF invoices from completed Sellf purchases via KSeF Gateway
Quick overview This workflow receives signed Sellf purchase webhooks, validates the HMAC signature, and when the buyer requests an invoice with a NIP it builds a KSeF-ready invoice and submits it to a self-hosted KSeF Gateway, capturing the returned KSeF number or an error. How it works Receives a POST webhook from Sellf with the raw request body and the X-Sellf-Signature header. Verifies the webhook signature using HMAC-SHA256 and rejects the request with a 401 response if the signature is invalid. Responds immediately with a JSON OK response and continues processing in the background. Filters the event to purchase.completed and extracts the customer, order, and invoice details from the webhook payload. Continues only if the customer requested an invoice and provided a non-empty NIP. Builds a KSeF invoice payload using your seller details and the purchase data, then posts it to your KSeF Gateway /ksef/invoice endpoint with an X-Api-Key header. Stores the KSeF submission result by extracting the ksefNumber and status on success, or capturing the returned error details on failure. Setup Set up Sellf webhooks to send purchase.completed events to this workflow’s production webhook URL
Poll and download received invoice PDFs with KSeF Gateway to disk storage
Quick overview This workflow runs every 20 minutes to poll a self-hosted KSeF Gateway for newly received KSeF invoices, maintains a cursor checkpoint in n8n static data, downloads each new invoice PDF via the gateway API, and saves the files to local disk. How it works Runs every 20 minutes on a schedule. Reads the last successful polling checkpoint from the workflow’s static data and calls the KSeF Gateway /ksef/invoices/received/new endpoint with the since cursor. If the gateway response is unsuccessful, records the error details for alerting and leaves the checkpoint unchanged so the next run retries the same window. If the response is successful, stores the returned nextSince value as the new checkpoint. If new invoices are returned, processes each invoice summary individually. Downloads each invoice PDF from the KSeF Gateway /ksef/invoice/{ksefNumber}/pdf endpoint and saves it to the configured local folder. Outputs invoice metadata (number, seller, amount, and saved file path) as a placeholder where you can plug in notifications (Slack, email, or Discord). Setup Deploy and configure a self-hosted KSeF Gateway (https://github.com/jurczykpawel/ksef-gateway) with a token or cert
Upload CSV test cases to Qase and send completion alerts to Slack
Quick overview This workflow upload test cases from a CSV file into Qase App and sends a confirmation message to your Slack channel. How it works Receives a form submission containing a public CSV URL and a selected Qase project option. Downloads the CSV file from the provided URL and extracts its rows into individual test-case items. Maps each row into the JSON payload Qase expects (including project code, fields like severity/priority/type, and optional parsed steps). Creates the test cases in Qase by sending a POST request per item to the Qase Cases API for the mapped project. Aggregates the upload responses into a single result. Sends a Slack incoming-webhook message confirming the test case upload is complete. Setup Create a Qase API token and add it to the Qase HTTP Header Auth credentials used for the Qase API request. Create a Slack Incoming Webhook, paste the webhook URL into the Slack notification HTTP request node, and customize the message text if needed. Ensure the uploaded CSV is publicly accessible via URL and uses the expected columns (for example: title, description, preconditions, postconditions, severity, priority, type, layer, behavior, automation, and optional
Rank resumes by job description similarity using Gemini embeddings
Quick overview This workflow collects resume PDFs and a job description via an n8n form, generates embeddings with Google Gemini, calculates cosine similarity between each resume and the job description, and returns a CSV-style ranked list of filenames. How it works Receives resume PDF uploads and a job description text through an n8n Form trigger. Creates a semantic embedding for the job description using the Google Gemini Embeddings API (gemini-embedding-2). Splits the uploaded files into individual resume items and converts each PDF binary to a Base64 string. Sends each Base64-encoded PDF to the Google Gemini Embeddings API to generate a multimodal embedding for the resume. Calculates cosine similarity between the job description embedding and each resume embedding, then sorts resumes from most similar to least similar. Returns a CSV-formatted ranking (Rank, File Name) in the form completion response. Setup Create and add a Google Gemini (PaLM) API credential in n8n with an API key that can access the gemini-embedding-2 model. Ensure the Google Gemini credential is selected on both HTTP requests that create the job description embedding and the resume embeddings. Use the workflo
Rank resumes by job description similarity using OpenRouter embeddings
Quick overview This workflow collects resume PDFs and a job description through an n8n form, extracts text (with OCR for scanned PDFs), generates embeddings via OpenRouter, and ranks the resumes by cosine similarity to the job description, returning a CSV-style list of ranked filenames. How it works Receives resume PDFs and a job description from an n8n form submission. Creates an embedding for the job description using OpenRouter’s embeddings endpoint with openai/text-embedding-3-large. Processes each uploaded resume one at a time, converting the PDF to text using built-in PDF extraction. If the extracted text is too short (likely scanned), sends the PDF to OpenRouter chat completions with the file-parser plugin (mistral-ocr) to OCR the document and return plain text. Creates an embedding for each resume’s extracted text (from direct extraction or OCR) using openai/text-embedding-3-large. Computes cosine similarity between each resume embedding and the job description embedding, then sorts resumes from most similar to least similar. Returns a completion page containing a CSV-style list of rank and filename. Setup Add an OpenRouter API credential in n8n and select it on the embeddi
Sync Etsy customers with Meta custom audiences using hashed emails
Quick overview This workflow runs daily to fetch recent Etsy receipt emails via an Etsy Shop Operations sub-workflow, normalizes and SHA-256 hashes the emails, and either previews the hashed payload or uploads it to a Meta Custom Audience using the Meta Graph API. How it works Runs every day on a schedule. Sets sync parameters (lookback window, maximum receipts, dry-run mode, Meta audience ID, and API version). Requests recent Etsy receipt records from a connected Etsy Shop Operations workflow and extracts buyer/payment email addresses. Normalizes, deduplicates, and SHA-256 hashes the email addresses to build a Meta Custom Audience upload payload. If dry-run is enabled, returns counts and a small sample of hashes for verification. If dry-run is disabled, sends the hashed EMAIL payload to the Meta Graph API endpoint for the specified Custom Audience. Setup Configure and connect the “Get Etsy customer receipts” execute-workflow step to an Etsy Shop Operations (PRO) workflow that returns receipt records including buyer/payment emails. Create or choose a Meta Custom Audience and paste its ID into the configuration values. Add a Meta access token to the HTTP header auth for the upload r
Generate daily Etsy sales and ledger reports via Shop Operations API
Quick overview This workflow runs daily to pull recent Etsy receipts and payment-account ledger entries via a linked sub-workflow, then aggregates sales metrics by currency and fee totals by ledger type and outputs a consolidated report object for downstream accounting or BI tools. How it works Runs every day on a schedule. Sets the reporting window and maximum record count used for all Etsy queries. Calls a separate Etsy Shop Operations workflow to fetch receipts for the configured date range. Calls the same Etsy Shop Operations workflow to fetch payment-account ledger entries for the same date range. Aggregates receipts into per-currency totals (orders, revenue, shipping, tax, discounts, and average order value) and groups ledger amounts by ledger type. Outputs the final report payload (including summaries plus the raw receipts and ledger entries) for use in other steps like saving to a database or sending by email. Setup Set up Etsy OAuth credentials in the workflow that performs the Etsy API calls (the Etsy Shop Operations sub-workflow). In both Execute Workflow steps, select the Etsy Shop Operations workflow to run by filling in the referenced workflow ID. Update the reporting
Manage Etsy OAuth 2.0 tokens and API headers between workflows
Quick Overview This workflow manages Etsy OAuth 2.0 (PKCE) authorization in n8n, stores access and refresh tokens in workflow static data, refreshes tokens when needed, and returns ready-to-use Etsy API request headers to other workflows via an Execute Workflow call. How it works Runs either manually to start authorization, via a webhook callback from Etsy after consent, or when another workflow requests a token. Loads the Etsy app configuration (client ID, shared secret, redirect URI, scopes) and routes the run to start authorization, handle the callback, or return an access token. When starting authorization, generates a PKCE verifier/challenge and returns an Etsy authorization URL while storing the pending state for validation. When Etsy redirects to the callback webhook, validates the returned state and authorization code and then exchanges the code for tokens using the Etsy OAuth token endpoint. Stores the authorized access and refresh tokens (with expiry timestamps) in n8n workflow static data and returns a confirmation response to the callback request. When another workflow requests a token, loads the stored refresh token, refreshes the access token with Etsy if it is missin
Run LDXhub document jobs from one form with StructFlow, RefineLoop, RenderOCR, CastDoc, and ExtractDoc
Quick overview This workflow provides a single n8n form that routes to six LDXhub services (StructFlow, AnalyzeDoc, RefineLoop, RenderOCR, CastDoc, and ExtractDoc) to run one-off document processing jobs and return the generated output file directly to the user. How it works Receives a submission from an n8n Form that collects an LDXhub API key, API host, and the target service. Routes the request to the selected service and fetches available models or engines from the LDXhub gateway using an HTTP request. Collects the remaining service-specific inputs via follow-up forms (for example model/engine selection, prompts/options, file upload, output format, and OCR language where applicable). Filters the available output formats based on the uploaded file’s extension for the conversion-style services. Submits the job to LDXhub (StructFlow, AnalyzeDoc, RefineLoop, RenderOCR, CastDoc, or ExtractDoc) and polls until the result is ready. Returns the processed file as a direct download in the form completion step, or shows an error page if the job fails. Setup Create an LDXhub API key in the LDXhub portal and add an LDXhub API credential in n8n for the LDXhub node. Confirm the LDXhub gateway
Send SAP Business One order and invoice alerts via WhatsApp Cloud API
Quick overview This workflow polls SAP Business One every 15 minutes for newly updated Sales Orders and AR Invoices and sends a formatted alert for each document via the WhatsApp Cloud API, using an n8n Data Table timestamp to prevent duplicate notifications between runs. How it works Runs every 15 minutes on a schedule. Reads the last-checked timestamp from an n8n Data Table and falls back to 15 minutes ago if no value exists. Logs in to the SAP Business One Service Layer and queries the Orders and Invoices OData endpoints for documents updated after the last-checked date. Normalizes the returned records, labels each one as a Sales Order or AR Invoice, and combines them into a single stream. For each new document found, formats a WhatsApp text message with key fields like document number, date, customer, total, currency, and comments. Sends the message through the WhatsApp Cloud API (Meta Graph) and then logs out of SAP Business One. Upserts the current timestamp back into the Data Table so the next run only alerts on newer documents. Setup Provide your SAP Business One Service Layer URL and credentials (CompanyDB, UserName, Password) in the SAP login request and ensure the Orders
Proxy OpenAI-style chat completions to Gemini with async webhooks
Quick overview This workflow exposes an OpenAI-compatible /v1/chat/completions endpoint in n8n that forwards requests (including optional file attachments) to a configurable LLM HTTP provider, supporting both synchronous replies and asynchronous processing via a callback URL. How it works Receives a POST request on /v1/chat/completions via a webhook, accepting JSON or multipart form-data with optional binary file uploads. Converts any uploaded files into OpenAI-style message content (images as image_url data URLs and other files as text entries) and merges them into the last user message. Prepares a job ID, extracts optional callback and provider override settings (URL and headers), and keeps the original request body for later use. If a callback URL is provided, immediately returns HTTP 202 with the job ID, then sends the request (without callback/provider fields) to the configured LLM provider endpoint. Formats the provider response (or error) into a completion payload with a status code and posts the result to the callback URL with job metadata. If no callback URL is provided, sends the request to the LLM provider synchronously and returns the provider response (or error) to the
Solve image CAPTCHAs via webhook using CaptchaSonic
Quick overview This workflow exposes a POST webhook that accepts base64 CAPTCHA images and uses the CaptchaSonic community node to solve multiple CAPTCHA types (OCR, reCAPTCHA v2, AWS WAF, TikTok, Binance, and more), returning a standardized JSON response. How it works Receives a POST request on the captchasonic-solve webhook containing a JSON body with a type and required fields like image (base64) and sometimes question. Validates the request payload, checks required fields for the requested CAPTCHA type, and routes the request to the matching solver. Sends the image challenge to CaptchaSonic using the appropriate recognition operation for the selected type. Normalizes the CaptchaSonic result into a consistent JSON structure with success, type, solution, and a solvedAt timestamp. Returns the formatted solution to the original webhook caller, or responds with HTTP 400 and an error message if validation fails. Setup Self-host n8n and install the n8n-nodes-captchasonic community node. Create and select a CaptchaSonic API credential (API key from https://my.captchasonic.com) for the CaptchaSonic nodes. Activate the workflow, copy the production webhook URL for captchasonic-solve, and
Sync Shopify customers with Cegid Y2 on create or update
Quick overview This workflow receives Shopify customer create/update webhooks and syncs the customer record to CEGID Y2 by creating the customer when missing or updating the existing customer when CEGID reports a duplicate. How it works Receives a POST webhook from Shopify when a customer is created or updated. Builds a CEGID Y2 customer payload with identifiers, tax/currency details, and the default store/workspace settings. Formats the customer address and chooses whether to send individual or company contact details based on whether a company name is present. Sends the assembled payload to CEGID Y2 to create the customer. If CEGID returns a “customer already exists” error, extracts the existing CEGID customer ID from the error message and sends a PATCH request to update that customer in CEGID. If the create request fails for any other reason, stops the workflow and surfaces the CEGID error. Setup In Shopify, create a customer webhook for create/update events and point it to this workflow’s webhook URL, matching the allowed shop domain. Add CEGID Y2 HTTP Basic Auth credentials and ensure the API user has permission to create and update customers. Update the CEGID API base URL, wo
Collect and structure Kuaishou video comments with JustOneAPI
Quick overview Use this n8n workflow template to collect Kuaishou video comments with JustOneAPI. This template is for content researchers, marketing teams, community operations teams, analysts, and automation builders who want to collect structured comment data from a Kuaishou video inside n8n. How it works The workflow starts with a single configuration node where you add your JustOneAPI token, the Kuaishou video ID, and an optional pcursor value. It then requests the Kuaishou video comment endpoint, reads the returned root comments and sub-comment groups, and formats them into a structured comment collection. The final output includes comment counts, pagination information, normalized root comments, sub-comments grouped by root comment, debug information, and raw API responses for inspection and troubleshooting. The workflow leaves pcursor empty by default for the first request. You can use the returned nextPcursor value to continue from another page when supported by the API response. Setup Import the workflow into n8n. Open the Set API Request Parameters node. Add your JustOneAPI token. Replace the placeholder value for videoId. Leave pcursor empty for the first request, or ad
Get Douyin user published videos and first video details with JustOneAPI
Use this n8n workflow to get published videos from a Douyin user and fetch details for the first video with JustOneAPI. Who’s it for This template is for creator research teams, marketing teams, creator operations teams, analysts, and automation builders who want to inspect a Douyin account’s published videos and collect the first video’s detail data in a reusable n8n workflow. What this workflow does The workflow starts from a Douyin secUid and sends a request to the User Published Videos V3 endpoint. It keeps the raw video list response, extracts video IDs from data.aweme_list, selects the first unique aweme_id by default, then requests video details with the Video Details V2 endpoint. The workflow returns both the selected video from the list and the detailed video data in a structured format, while also keeping raw outputs for inspection and troubleshooting. This makes it useful for account monitoring, video research, content archiving, creator analysis, and building downstream reporting workflows. What you need A JustOneAPI token A Douyin user secUid An n8n environment with HTTP Request node support Set up Import the workflow into n8n. Open the Prepare API and User Data node.
Search Douyin videos by keyword and get the first video detail with JustOneAPI
Use this n8n workflow to search Douyin videos by keyword and get the first video detail with JustOneAPI. Who’s it for This template is for creator research teams, content operations teams, marketing teams, analysts, and automation builders who want to search Douyin video content and collect the first matched video detail in a reusable format. What this workflow does The workflow starts from a Douyin search keyword and sends a request to the Douyin Video Search V4 endpoint. It keeps the raw search response, extracts the first available video ID from the returned search results, then sends a second request to the Douyin Video Details V2 endpoint. The workflow keeps both raw API responses for inspection and troubleshooting, and also converts the selected video detail into a cleaner structured output for downstream use. This makes it useful for content discovery, video research, creator analysis, campaign monitoring, competitor research, content archiving, and automated reporting workflows. What you need A JustOneAPI token A Douyin search keyword An n8n environment with HTTP Request node support Set up Import the workflow into n8n. Open the Prepare / Config node. Add your JustOneAPI to
Get Taobao and Tmall product reviews with JustOneAPI
Get Taobao and Tmall product reviews with JustOneAPI Use this workflow to fetch product reviews for a specified Taobao or Tmall item and turn the review response into a structured output inside n8n. Who’s it for This template is for ecommerce researchers, marketplace operators, product analysts, customer feedback teams, and automation builders who want to review buyer feedback for a specific Taobao or Tmall product. What this workflow does The workflow starts manually and prepares all API and review parameters in one configuration node. It then sends a request to the Taobao/Tmall product review endpoint through JustOneAPI, stores the raw review response for debugging, and builds a structured review output from the returned data.comments array. The final output includes request metadata, page information, review summary counts, cleaned review records, review photos, appended reviews, buyer display information, SKU information from the reviewed item, sharing metadata, and the raw API response for review. How to set up Open Set API and Review Parameters Add your JustOneAPI token Replace TARGET_TAOBAO_ITEM_ID with the product item ID you want to inspect Optionally adjust orderType and
Search Taobao and Tmall products and get the first product detail with JustOneAPI
Search Taobao and Tmall products and get first product detail with JustOneAPI Use this workflow to search Taobao and Tmall products by keyword, extract product IDs from the returned search results, and fetch product detail data for the first selected product with JustOneAPI. Who’s it for This template is for ecommerce researchers, marketplace operators, product analysts, and automation builders who want to quickly inspect Taobao or Tmall product search results and retrieve one structured product detail record inside n8n. What this workflow does The workflow starts with a manual trigger and prepares all search inputs in one configuration node. It then searches Taobao and Tmall products by keyword, stores the raw search response for debugging, extracts item IDs from data.model.itemList, and uses the first selected itemId to fetch product details. The final output includes cleaned product information, image URLs, SKU summary data, SKU details, SKU property values, the original search source product, and the raw product detail response for review. How to set up Open Set API and Search Parameters Add your JustOneAPI token Update keyword Optionally adjust sort, tmall, startPrice, endPric
Get Xiaohongshu keyword suggestions with JustOneAPI
Use this workflow to expand one Xiaohongshu keyword into structured keyword suggestions with JustOneAPI. It is useful for topic research, content planning, creator operations, search trend discovery, and downstream Xiaohongshu automations. How it works The workflow starts from one config node where you add your JustOneAPI token and the keyword you want to expand. It then: sends the keyword to the Xiaohongshu Keyword Suggestions endpoint returns the raw API response for debugging extracts structured suggestion items from the response separates note suggestions and goods suggestions outputs a cleaned result that can be reused in other workflows What you can do with it You can use this template to: discover related Xiaohongshu note search keywords identify goods-oriented suggestion terms collect keyword ideas before note search or note detail workflows send cleaned keyword suggestions into Sheets, Airtable, Notion, databases, or AI enrichment steps Setup Import the workflow into n8n Open the Prepare API and Keyword Inputs node Paste your JustOneAPI token Replace the sample keyword with your own query Run the workflow Output The workflow returns: the raw JustOneAPI response a cleaned s
Resolve Xiaohongshu share links to final URLs with JustOneAPI
This workflow resolves Xiaohongshu share links into their final redirect URLs so you can extract the real destination before sending it to later steps in your automation. It is useful for content research, link normalization, note routing, and building workflows that depend on the final Xiaohongshu page URL instead of the original short share link. How it works Open the Config node and paste a Xiaohongshu share link. Add your JustOneAPI token in the authentication field. Run the Share Link Resolution request node. The workflow returns the resolved redirect URL, which you can pass to downstream steps for parsing, storage, or further analysis. What you can do with it Expand Xiaohongshu short share links into final destination URLs Normalize inbound links before saving them to databases or sheets Route resolved URLs into note analysis or scraping workflows Build automations that start from copied share links Setup Import this workflow into n8n Open the Config node Paste your Xiaohongshu share link Add your JustOneAPI token Execute the workflow to get the final redirect URL
Get Xiaohongshu user published notes with JustOneAPI
Use this n8n workflow to get published notes from a Xiaohongshu user profile with JustOneAPI. Who’s it for This template is for creator research teams, marketing teams, creator operations teams, analysts, and automation builders who want to monitor a Xiaohongshu account and collect published note data in a reusable format. What this workflow does The workflow starts from a Xiaohongshu user ID and sends a request to the User Published Notes V4 endpoint. It keeps the raw API response, then converts the returned notes into a cleaner structured list for downstream use. This makes it useful for account monitoring, publishing analysis, content archiving, competitor research, and building automated reporting workflows. What you need A JustOneAPI token A Xiaohongshu user ID An n8n environment with HTTP Request node support Set up Import the workflow into n8n. Open the Set API Request Parameters node. Add your JustOneAPI token. Enter the Xiaohongshu user ID you want to inspect. Leave lastCursor empty for the first request, or set it if you want to continue from a previous page. Run the workflow. How it works Prepare the API inputs. Request the published notes list from Xiaohongshu User Publ
Generate AI images using Havis AI Seedream 5 Lite
Havis AI - Seedream 5 Lite n8n Workflow Summary This n8n workflow submits an image generation job to Havis AI Seedream 5 Lite, waits for processing, polls task status, and returns result data when the job completes. Who is this for? Creators who want a reusable no-code generation form. Agencies building client-facing AI automation. Developers who want an importable API test workflow. n8n users connecting Havis AI output to storage, Slack, Sheets, Airtable, webhooks, or a CMS. What this workflow does Opens an n8n Form Trigger for Seedream 5 Lite inputs. Builds a clean JSON payload and removes empty optional fields. Sends a POST request to https://havis.ai/api/seedream-5. Waits 8 seconds, then polls https://havis.ai/api/task/{task_id}. Loops while the task is processing. Returns task ID, status, result URLs, credits used, and submitted payload. Returns a clean error object if the task fails. Setup Import the JSON workflow into n8n. Open the Form Trigger URL. Enter your Havis API key in api_key. Use only the key value; the workflow adds Bearer automatically. Fill in the model inputs and submit. For production, store the API key in n8n credentials or environment variables instead of ty
Generate and edit images using Havis AI GPT Image 2
Havis AI - GPT Image 2 n8n Workflow Summary This n8n workflow submits an image generation job to Havis AI GPT Image 2, waits for processing, polls task status, and returns result data when the job completes. Who is this for? Creators who want a reusable no-code generation form. Agencies building client-facing AI automation. Developers who want an importable API test workflow. n8n users connecting Havis AI output to storage, Slack, Sheets, Airtable, webhooks, or a CMS. What this workflow does Opens an n8n Form Trigger for GPT Image 2 inputs. Builds a clean JSON payload and removes empty optional fields. Sends a POST request to https://havis.ai/api/gpt-image-2. Waits 8 seconds, then polls https://havis.ai/api/task/{task_id}. Loops while the task is processing. Returns task ID, status, result URLs, credits used, and submitted payload. Returns a clean error object if the task fails. Setup Import the JSON workflow into n8n. Open the Form Trigger URL. Enter your Havis API key in api_key. Use only the key value; the workflow adds Bearer automatically. Fill in the model inputs and submit. For production, store the API key in n8n credentials or environment variables instead of typing it int
Search Xiaohongshu users by keyword and get profile details with JustOneAPI
Use this n8n workflow to search Xiaohongshu users from a keyword and get profile details with JustOneAPI. Who’s it for This template is for creator research teams, marketing teams, creator operations teams, and automation builders who want to turn a Xiaohongshu keyword into structured user profile data inside n8n. What this workflow does The workflow starts from one keyword and searches Xiaohongshu users with the V2 user search endpoint. It extracts unique user IDs from the returned results, keeps the first unique user ID by default, fetches user profile details with the user profile endpoint, and returns a structured output for downstream use. This makes it useful for creator discovery, account research, brand research, and competitor monitoring workflows. How to set up Import the workflow into n8n. Open the Prepare API and Research Inputs node. Add your JustOneAPI token. Update keyword. Optionally adjust page and maxUsers. Leave maxUsers at 1 if you want to fetch only the first unique user result by default. Run the workflow and review the final output node. Requirements A JustOneAPI token An n8n environment with HTTP Request support How to customize the workflow You can increase