Get startedGet started for free

External apps and credentials

1. External apps and credentials

In this video, we'll explore how n8n connects with external apps and why credentials are key to making those connections work.

2. Power up with Apps

n8n's real power lies in connecting with the tools you already use, like Gmail, Slack, Notion, or OpenAI. These external apps let your workflows communicate across different platforms, sending emails, updating spreadsheets or posting messages automatically. By integrating these apps seamlessly, you save time, reduce repetitive tasks, and keep your data in sync. To make all of this possible, you'll need credentials, which we'll cover next.

3. Credentials 101

In most scenarios, we need credentials to connect to an external app. These are secure login details that let n8n access our external accounts. Think of them as passwords, but they are reusable for automation.

4. Credentials 101

For example, connecting to Gmail to send automated emails requires storing a Gmail OAuth credential.

5. Credentials 101

Using Slack to post a message to a channel requires Slack API credentials.

6. Credentials 101

Calling OpenAI for text generation means storing and using an OpenAI API key.

7. Credentials 101

Most apps or tools we connect to require some sort of authentication.

8. Credentials 101

Once we set up credentials, though, n8n can safely reuse them for any action without us having to log in every time. For instance, we might connect Google Drive to automatically pull files into our workflows,

9. Credentials 101

or Notion to fetch content from our knowledge base. Similarly, connecting Airtable or Trello lets us move project data into n8n and sync it with other apps. These examples show that credentials don't just let us send data out; they also enable us to bring valuable data into our automations.

10. Ways to create credentials

Let's see how this can be done with an OpenAI node. The first way is to do this inside a node. While setting up an action, choose "Create New" credentials. In this course, we won't need to create credentials manually, since they've already been set up for us. However, it's important to understand how this works in real projects, so we'll walk through the process from scratch. Here, we will have to add an API Key, which we can grab from OpenAI's API section in our account. Then, we can paste it under the API Key Input in n8n. This will grant us access to their services. The second one is to go to the Credentials Manager in the dashboard, where we will essentially pre-create them before building any workflow. Most users set them up directly in the node, since it's quicker to do so.

11. Common credential types

There are two main approaches to creating credentials in n8n, and the one we use depends on the type of service: Adding a simple API key works for tools like OpenAI or weather APIs. Just paste the key into the field. Then we have App-based credentials, which are a bit trickier to set up but are needed for some actions in apps like Google Sheets or Slack. In these, we grant n8n access securely via login and tokens. Setting up credentials can be tricky and, therefore, is not within the scope of this course.

12. Let's practice!

Let's get straight on to building the workflow!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.