Notion-Gmail integration: Automated workflow (+ Free Template)
8:51

Notion-Gmail integration: Automated workflow (+ Free Template)

n8n 12.02.2024 10 140 просмотров 140 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
In this video we connect Notion and Gmail into a powerful workflow that sends the contents of an email to a Notion database. The email subject will be the title of the Notion page, and a snippet of the email body will be the content of the Notion page. The email link will be added to the Notion page as a property. Get the workflow template for free: https://bit.ly/3uCzkxx More workflows and documentation for Notion and Gmail integration: https://bit.ly/3UBIvJq About n8n n8n is a source-available workflow automation tool designed for technical users, and with over 300 pre-built integrations and a general connector for anything with an API, n8n enables you to connect anything to everything. With n8n you can move beyond simple one step integrations to build multi-step workflows that integrate your tools exactly the way you want. Thanks to its fair-code distribution model, n8n will always have visible source code, be available to self-host, is free to use. Get n8n for free: https://bit.ly/3UCuzi3 Join the community forum and ask your questions: https://community.n8n.io/ Timestamps: 00:00 - Introduction 00:22 - What this workflow achieves 00:54 - Copy workflow 01:05 - Setup Gmail credentials 02:45 - Setup Notion credentials 03:55 - Explaining the workflow

Оглавление (6 сегментов)

Introduction

in this video we'll be setting up this na10 workflow enabling us to view our emails from notion in the process we will learn some key functionality of na10 if you'd like to follow along click on the link in the description to use this

What this workflow achieves

this workflow let's now take a look at what this workflow achieves in Gmail select the emails you'd like to send to notion and label them with a special tag now in notion after a short moment they will show up and be available to view once you are done with the email you can mark it as complete triggering your automation to remove the label from Gmail now let's take a look at the workflow in detail if you haven't

Copy workflow

already let's start by copying this workflow template and pasting it into our editor we'll now go through the process of setting up the Gmail and notion credentials let's start with

Setup Gmail credentials

Gmail open the node and create new credential in this dialogue we'll open the docs and we'll scroll down until we see Google Cloud console apis and services now let's head to create credentials or Cent ID and choose the application type web application change the name to na10 or another name that suits we don't need to worry about authorized JavaScript orgins and we will add our authorized redirect URI now that we are done we can click create and we can copy the client ID and client secret into our account if you're finding this video helpful so far let us know by leaving a like and subscribing to the channel now we can sign into Gmail and that's it we're connected the next thing we want to make sure is that we have enabled the correct apis and services in this case we'll be using the G Gmail node so we need to use the Gmail API and as you can see there's a tick here so we already have API enabled for

Setup Notion credentials

Gmail now let's set up our notion credentials once again let's open the docs and scroll down until we see notion integration guide we will scroll further down in the actual notion documentation and open up the developer portal for notion here we will create a new integration and call it na1 demo but you can call it anything you like now I can copy this secret and paste it back into notion as our API key let's hit save and just do one more thing back in notion let's give our new integration access to our Target notion page and that's it we've got everything connected let's change the workflow title and now our workflow is

Explaining the workflow

complete let's make sure we have all the necessary prerequisites to be able to run the workflow to begin with let's ensure that we have created our special label and in notion ensure that we have at least three Fields the title email thread and thread ID if you have an existing to-do list ensure that you have these three Fields by creating them if required now let's take a look at the actual workflow step by step one big thing you will notice is two trigger nodes na10 allows this type of flexibility essentially making this workflow a two in one the schedule node will trigger every minute and the next node will determine the previous time the workflow was triggered in this case we simply subtract one minute away from the current time of course if you decide to change the schedule trigger node you will need to change this node to match now we get into the meid of the workflow this is where we make our first query into Gmail obtaining any emails from our specific label we actually have no output data returned here since we don't have any emails marked with our Target label so let's tag an email real quick now that is done let us trigger the Gmail node again and this time we will return one item awesome in the next node we will attempt to find the email in our Target notion database called to-dos if we cannot find the email on this page then it means it is the first time this email was processed we use the email thread ID to determine if the email exists executing the node returns no emails from no allowing us to proceed to the next step we use the merge node here to do two things firstly it allows us to merge output data from the two previous nodes by a specific field in this case we merge the ID field in Gmail and the property thread ID field in notion secondly this merge node allows us to ensure that we have all the required Data before moving on to the next piece of logic if the database is not found then we create the new row in notion this node is really simple if the thread ID property from notion doesn't exist in our merge data then our notion database does not have the thread yet we have this extra step here that finds the currently connected Google accounts email address through a custom HTTP node which connects to the Gmail API and finally we create the new page to show our email again change the database to our Target database and ensure that all the properties are correctly mapped let's execute this node and see it available in notion so our final database page will look something like this but you can of course customize the looks to suit your needs we like the Simplicity of this one once we are happy with the email let's Market is done going back to n8n this should have triggered our notion node but looking closer ah we forgot to change the database fetching the test event again we get the page that we just updated now we should expect the next note to Output true since we just checked off the to-do but it looks like it's not correctly processing through looking closer into the node it seems that Json complete is not a valid field so let's remap this field to the correct property from the previous node let's run this node once again and this time we output into the true branch finally this last node will remove the label from the email that was just marked as complete and we are done if you found this tutorial helpful come and explore more Integrations and unlock the full potential of na1

Другие видео автора — n8n

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник