AI-Powered Fictional Country Capitals Helper

somdn_product_page

This n8n workflow enables interactive conversations about the capitals of fictional countries, combining manual triggers, AI assistance, data mapping, and conditional logic. It allows users to either get a list of known countries or request the capital of a specific country. The workflow integrates OpenAI’s language model to facilitate dynamic, conversational responses while maintaining a predefined list of fictional countries such as Wakanda, Narnia, and Mordor.

The process starts with a manual trigger, where a user can initiate a chat message that is processed by the OpenAI Assistant node, which is configured with an API key for OpenAI. The workflow includes a secondary trigger that responds to external workflow calls, allowing other processes to query country data.

A dedicated node maps the list of fictional countries and their capitals. When a user requests information, the workflow checks if the request is to list all countries or to get the capital of a specific country. For listing, it concatenates country names and returns the list. For specific requests, it uses a custom tool to search for the country, and then retrieves and returns the corresponding capital.

This setup is practical for creating an interactive, AI-assisted FAQ about fictional countries, educational tools for learning capitals, or engaging chatbots for entertainment. It combines AI language processing with structured data, providing a seamless user experience for exploring fictional geography.

Node Count

11 – 20 Nodes

Nodes Used

@n8n/n8n-nodes-langchain.manualChatTrigger, @n8n/n8n-nodes-langchain.openAiAssistant, @n8n/n8n-nodes-langchain.toolCode, @n8n/n8n-nodes-langchain.toolWorkflow, code, executeWorkflowTrigger, if, merge, set, stickyNote, summarize

Reviews

There are no reviews yet.

Be the first to review “AI-Powered Fictional Country Capitals Helper”

Your email address will not be published. Required fields are marked *