Fact-Checking Automation with n8n & Ollama Models

This n8n workflow automates detailed fact-checking of text by splitting content into sentences, analyzing each with AI models, and aggregating results to identify inaccuracies efficiently. It helps researchers and writers validate factual information quickly, saving hours of manual review.
code
splitOut
chainLlm
+7
Workflow Identifier: 1723
NODES in Use: code, splitOut, chainLlm, lmChatOllama, manualTrigger, set, merge, filter, aggregate, executeWorkflowTrigger
Automate fact-checking with n8n and Ollama

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow breaks down long articles into sentences, checks each sentence against known facts using an AI model, and finds which sentences are wrong.
It helps editors save time and avoid mistakes by showing incorrect parts clearly.

The workflow outputs a list of sentences that are false and a summary of errors, so users can fix articles faster.


Who should use this workflow

Editors who must verify many facts quickly in long texts can use this workflow.
People who want less human error and faster review in magazines or online media will find it helpful.


Tools and services used


Inputs, processing steps, and outputs

Inputs

  • Full article text to check.
  • Verified fact document to compare claims.

Processing steps

  1. Split text into clean sentences using code node.
  2. Separate sentences to process each individually.
  3. Combine each sentence with the same facts context.
  4. Use AI in the Ollama node to mark sentences as true or false.
  5. Filter out sentences marked true, keep only incorrect ones.
  6. Aggregate wrong sentences together.
  7. Run a summary via a language model to explain errors.

Outputs

  • List of incorrect sentences.
  • Summary report of errors found.

Beginner step-by-step: How to use this workflow in n8n production

Download and import

  1. Click the Download button to get the workflow file.
  2. Inside the n8n editor, choose “Import from File.”
  3. Select the downloaded workflow file to load it.

Configure credentials and settings

  1. Add Ollama API Key credentials in n8n’s Credential Manager.
  2. Check if the Edit Fields node has your article text and facts filled.
  3. Update any IDs, emails, or folder names if your use case needs them.
  4. Make sure the Ollama AI model “bespoke-minicheck” is installed locally if running self-hosted (see linked self-host n8n).

Test and activate

  1. Run the workflow once manually to check everything works.
  2. Verify the output shows incorrect sentences clearly.
  3. Activate the workflow to run automatically or by trigger as fits your editor’s process.
  4. Adjust input text and facts as needed for new articles.

Details on sentence splitting code

The Code node uses JavaScript that splits on sentence ends (like “.” or “?”) but protects dates such as “12. März 2023” not to split inside these.

This splitting creates smaller chunks that AI checks better and faster.

// Get the input text
const text = $input.item.json.text;

if (!text) {
 throw new Error('Input text is empty');
}

function splitIntoSentences(text) {
 const monthNames = '(?:Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember)';
 const datePattern = `(?:\d{1,2}\.\s*(?:${monthNames}|\d{1,2}\.)\s*\d{2,4})`;
 const regex = new RegExp(`(?<=[.!?])\s+(?=[A-ZÄÖÜ]|$)(?!${datePattern}|\s*[-•]\s)`, 'g');
 return text.split(regex).map(sentence => sentence.trim()).filter(sentence => sentence !== '');
}

const sentences = splitIntoSentences(text);
return { json: { sentences: sentences } };

Customizations and typical fixes

  • Change the facts in Edit Fields node to suit other topics like health or finance.
  • Adjust the month names regex to handle other languages requests in the Code node.
  • Try different AI models by updating the credentials and model name in the Ollama Chat Model node.
  • If seeing “Input text is empty” error, check the facts and text inputs are not blank in Edit Fields node.
  • For API errors, verify the Ollama API Key is correctly added in n8n credentials.

Best practices before production

  • Use trusted, accurate facts data to compare against.
  • Run a single sentence test with Ollama node to confirm API access.
  • Validate the sentence splitting works without errors on sample texts.
  • Check that only sentences marked “No” (wrong) pass the filter node.
  • Test entire workflow using manual trigger before scheduling or deploying.

Deployment

Activate the workflow in n8n after confirming tests pass.

Run it on new articles before publishing for faster, automated fact-checking.

Monitor logs for errors especially from AI responses.


Summary of results

Saves hours of manual review

✓ Highlights only wrong sentences

✓ Produces clear error summaries

→ Faster, safer publishing decisions


Automate fact-checking with n8n and Ollama

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The error occurs when the ‘text’ field in the Edit Fields node is blank or missing. Always fill the ‘text’ input before running.
Check the API Key stored in n8n credentials is correct and current. Also confirm the AI model ‘bespoke-minicheck’ is installed if using self-hosted.
Yes, any model compatible with the workflow prompt format can be used. Update credentials and model name in the Ollama Chat Model node.
Download the workflow file, then Import from File in n8n editor. Configure API keys and inputs, test once, then activate for production.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.