- Access the Alexa Developer Console: Go to https://developer.amazon.com/alexa/console/ask.
- Create a New Skill: Click on Create Skill, give it a name, and choose your preferred language.
- Choose a Template: Select the "Start from Scratch" template and leave the rest as the default.
Once your skill is created, you will be taken to the dashboard. Here's what you need to configure:
-
Skill Invocation Name: This is the word or phrase you'll use to open your skill. It's what you say to your Echo device (e.g., "Alexa, open my awesome assistant"). This command launches the skill, which in turn runs your n8n workflow and starts a conversation with Gemini.
-
Interaction Model -> Intents: This is where you define what actions your skill can perform.
- You can delete the default
HelloWorldIntent
. - Click Add intent to create a new one.
- Name the new intent
LLMIntent
and click Create custom intent.
- You can delete the default
-
Configure the Intent Slot: A slot is a variable that captures information from the user's request.
- In the
LLMIntent
settings, scroll down to the Intent Slots section and click the plus icon to add a new slot. - Name this slot
question
. - Set the Slot Type to
AMAZON.SearchQuery
. This type is perfect for capturing open-ended questions. - Click Edit Dialog and enable the "Is this slot required to fulfill the intent?" selector. This ensures Alexa will prompt the user if they don't provide a question.
- In the
-
Add Utterances: Utterances are the phrases that trigger your intent.
- In the
LLMIntent
settings, go to the Sample Utterances section. - Add a simple utterance like
gemini {question}
. - This setup means that when your skill is active, you'll need to start your questions with "gemini." For example: "Alexa, open my awesome assistant... Gemini, what's the largest planet in the solar system?"
- Pro-Tip: If you want to avoid saying "gemini" for every question, you'll need to add more utterances to cover various conversation starters, like
tell me {question}
,ask {question}
,what {question}
, and so on.
- In the
To handle the conversation and interface with Gemini, you will need to import a pre-made n8n workflow.
- Download the Workflow: Download the workflow JSON below.
- Import to n8n: In your n8n instance, click the New button in the top-left corner, and then select Import from File. Upload the JSON file you just downloaded.
- Configure Credentials: The imported workflow will require you to add your Gemini API key. Double-click the Gemini node to open its settings and add your credentials.
- More Customizations: Optionally, you can customize the SearXNG, Calendar and Telegram tools to integrate them within the workflow, but that's not strictly required (although it can be very useful for your AI Agent to have Internet, calendar and Telegram to interact with).
The last step is to connect your Alexa skill to your n8n workflow.
- In the left-hand sidebar of the Alexa developer console, click on Endpoint.
- Select the HTTPS radio button.
- In the Default Region field, paste the production webhook URL from your n8n instance. Make sure you've activated the workflow in n8n first!
- Select the option "My development endpoint has a certificate from a trusted certificate authority" (this is the standard for most n8n setups).
- Finally, click Save and then Build at the top of the page.