# n8n

[**n8n**](https://n8n.io/) is an open-source workflow automation platform that lets you connect services, trigger actions, and build logic using a visual interface. \
You can use it to integrate MadKudu into custom workflows — like enriching leads, scoring accounts, or syncing insights across your stack, prepping meeting....

If you are new to n8n, find below in this article an example of workflow &#x20;

## To Add MadKudu MCP Tools to any workflow

#### Pre-requisite&#x20;

* You have a MadKudu API key. Refer to [this article](https://developers.madkudu.com/getting-started/quickstart) to get your API key.&#x20;
* You are a n8n admin

1. Log into **n8n** (local or Cloud)
2. In a project create an AI agent&#x20;
3. For **Tool**, add **MCP Client Tool**
   1. in **Parameters:**&#x20;

      1. **SSE Endpoint:** enter the following URL replacing your API key
      2. **Authenticaiton**: None&#x20;
      3. **Tools**: All

      `https://mcp.madkudu.com/{YOUR_MADKUDU_API_KEY}/sse`&#x20;

/!\ note that the end of the url is `/sse` and not `/mcp` like you may have used in other tools

## Create your first workflow powered by MadKudu in n8n

Let's create a simple agent on n8n that researches external meeting attendees, powered by MadKudu intelligence&#x20;

### Pre-requisites&#x20;

You'll need&#x20;

* Generate an API for Google Calendar in your Google Console&#x20;
* An OpenAI API key, or other supported LLM&#x20;
* Your MadKudu API Key&#x20;

This is the flow you'll import&#x20;

<figure><img src="https://1835787252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8CtRF59w8oxkhPMGwwB%2Fuploads%2Fxgt5qqQktkwNL6jn96rZ%2Fimage.png?alt=media&#x26;token=d4abe40a-239e-4263-ae88-df08fd1a6cbf" alt=""><figcaption></figcaption></figure>

1. Download this JSON file that is the template of the workflow

{% file src="<https://1835787252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8CtRF59w8oxkhPMGwwB%2Fuploads%2FO57nrlBr44MN2QA0VR1c%2Fmeeting-prep.json?alt=media&token=40823f10-c42f-4313-9fba-6d4c5178c21b>" %}

1. Log into n8n (cloud or local)&#x20;
2. Create a new Workflow (click **+** then **Worfklow**)&#x20;
3. On the top right corner click **Import from File..** and import the JSON file you downloaded in 1. &#x20;

<figure><img src="https://1835787252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FV8CtRF59w8oxkhPMGwwB%2Fuploads%2FPW9oH8K2K9quMU8ckjPs%2Fimage.png?alt=media&#x26;token=482cd684-d0ce-4ce3-8ea7-35a3a1a1ba25" alt=""><figcaption></figcaption></figure>

5. Edit each node to connect to your Calendar, OpenAI and MadKudu MCP&#x20;
   1. Node Google Calendar: follow n8n docs to connect your Google account&#x20;
   2. Node "Keep Meeting with external attendees" change "@example.com" into "@yourdomain.com" with your company domain to filter out internal meetings
   3. Node AI Agent
      1. Add your OpenAI API key&#x20;
      2. In the Ai Agent prompt replace "example.com" with "yourdomain.com" with your company domain to filter out internal attendees
      3. in the  MCP tool,  enter this URL replacing your MadKudu API key and removing the { } :  `https://mcp.madkudu.com/{YOUR_MADKUDU_API_KEY}/sse`&#x20;
6. Test your workflow !&#x20;
