首页 / 实操指南 / add-google-calendar-to-outlook

add-google-calendar-to-outlook

综合教程 建议阅读时间: 5-8 分钟

19 de out. de 2023

Como Adicionar o Google Calendar ao Outlook Calendar [Tutorial]

Neste tutorial, vamos mostrar como sincronizar o Google Calendar com o Outlook Calendar sempre que um novo evento for adicionado, atualizado ou excluído no Google Calendar. ![How to sync Google Calendar and Outlook Calendar](__CODE_BLOCK_0__ Syncing Google Calendar and Outlook Calendar automatically is a solution that anyone keeping track of events in both platforms (usually due to work-related reasons) já pensou em algo que poucos conseguiram realizar. Claro, integrar o Google Calendar e o Outlook Calendar parece simples o bastante, mas nenhuma das plataformas possui funcionalidades nativas para esse caso de uso. Como resultado, a maioria dos usuários fica com a opção de atualizar manualmente o Outlook Calendar sempre que atualiza o Google Calendar (ou vice-versa), o que dá bastante trabalho. Felizmente, isso não é um beco sem saída para quem busca mais eficiência. Com o Make, você pode criar uma automação que sincroniza os dois aplicativos de calendário sempre que um evento é adicionado, atualizado ou excluído. Em outras palavras, o Make executará automaticamente uma destas ações no Outlook Calendar sempre que fizermos o mesmo no Google Calendar: * Adicionar novos eventos. * Atualizar eventos existentes. * Excluir eventos.

Além de um Google Calendar e de um Outlook Calendar, você só vai precisar de uma conta no Make para configurar essa automação — e você pode conseguir uma aqui. Antes de mergulharmos no tutorial para sincronizar o Outlook Calendar e o Google Calendar, aqui vai um contexto rápido para entender como a integração funciona.

Como funciona a integração entre Google Calendar e Outlook Calendar

Neste tutorial, vamos criar uma automação para atualizar eventos do Outlook Calendar com base no que acontece com os eventos do Google Calendar. Para conseguir isso, o Make precisa identificar o evento do Outlook Calendar que corresponde ao evento do Google Calendar (se houver um). Vamos configurar isso marcando os eventos do Google Calendar com o ID do evento correspondente no Outlook Calendar, que é único para cada evento do Outlook Calendar: ![Outlook Calendar event ID sample](__CODE_BLOCK_2__ Then, whenever the automation runs, it will check our Google Calendar event for the event ID of a corresponding Outlook Calendar event. The automation then uses the event ID’s presence (or absence) para determinar se deve criar um novo evento no Outlook Calendar ou atualizar um evento existente. Se o ID do evento estiver presente na descrição do evento do Google Calendar, isso significa que já existe um evento correspondente no Outlook Calendar para o nosso evento do Google Calendar. A automação então atualizará ou excluirá o evento no Outlook Calendar, dependendo da ação realizada no Google Calendar. Mas se o ID do evento não estiver presente na descrição do evento do Google Calendar, isso significa que não temos um evento correspondente no Outlook Calendar para o nosso evento do Google Calendar. Nesse caso, a automação criará um novo evento no Outlook Calendar para ele. Depois disso, ela atualizará o nosso evento do Google Calendar com o novo ID do evento do Outlook Calendar. Fazer isso ajuda a automação a localizar e atualizar esse evento do Outlook Calendar se atualizarmos ou excluirmos mais tarde o equivalente dele no Google Calendar. Então, aqui estão os passos detalhados para tornar essa sincronização entre Google Calendar e Outlook Calendar uma realidade!

1. Crie um novo cenário no Make que monitore eventos do Google Calendar

Entre na sua conta do Make e crie um novo cenário. Adicione o módulo Google Calendar > Watch Events ao cenário e conecte sua conta do Google a ele. Em seguida, configure o módulo da seguinte forma: * Use o menu suspenso Calendar para selecionar o Google Calendar que você deseja sincronizar com o Outlook Calendar. * Defina a opção do menu suspenso Watch Events como By Updated Date. Isso ajudará a automação a rastrear tanto novos eventos quanto eventos atualizados do Google Calendar. * Altere a configuração Show deleted events para Yes para sincronizar as exclusões de eventos do Google Calendar com o Outlook Calendar. * Deixe o campo Query em branco, a menos que você queira sincronizar apenas eventos contendo certas palavras-chave. * Preencha o campo Limit com o número máximo de eventos que a automação deve encontrar sempre que for executada. Usaremos “10” para fins de demonstração, mas você deve escolher um número adequado com base na quantidade típica de eventos que precisa sincronizar com o Outlook Calendar em um determinado momento.

Veja a imagem abaixo para referência: ![Watch Events in Google Calendar](__CODE_BLOCK_5__ Click OK to finish configuring the module.

2. Add a module to create new Outlook Calendar events for new Google Calendar ones

Now, we’ll add the Microsoft 365 Calendar > Create an Event module, which will create new Outlook Calendar events for new Google Calendar ones. Note: You can add modules by hovering your cursor over the right handle of an existing module, and then clicking the Add another module option that pops up. [Connect the module to your Microsoft account](__CODE_BLOCK_6__ and use the Calendar ID dropdown menu to select the calendar on which new Outlook Calendar events should be created. Then, map the Google Calendar > Watch Events module’s data items to the various Outlook Calendar event fields so that your new Outlook Calendar event will contain the same data as its Google Calendar counterpart. For example: * Map the Summary item to the Subject field. * Map the Start item to the Start Date field. * Map the End item to the End Date field. * Map the Description item to the Body Content field. * Map the Location item to the Location field.

See this image for reference: ![Create an Event in Outlook Calendar](__CODE_BLOCK_7__ Doing this will allow you to keep the same information in both calendars, avoiding potential problems associated with the lack of key data. Click OK when you’re done.

3. Add a module to update the original Google Calendar event with its corresponding Outlook Calendar event’s ID

As mentioned, the automation checks our Google Calendar event for the event ID of its corresponding Outlook Calendar event to determine the appropriate action to take in Outlook Calendar. So, we’ll use the Google Calendar > Update an Event module to add the Outlook Calendar event’s ID to our Google Calendar event’s description. Add this module after the Microsoft 365 Calendar > Create an Event one and connect your Google account to it. Click the Map switch next to the Calendar ID field so you can select the same calendar you selected in Step 1 of this tutorial. However, enable the Map switch next to the Event ID field so you can map the Event ID item from the Google Calendar > Watch Events module to it. Check this image for reference: ![Update an Event in Google Calendar](__CODE_BLOCK_8__ Enable the Show advanced settings switch at the bottom of the module to display the Description field. Then copy and paste this function into it: {{if(1.description != null; 1.description + newline + newline + "(Outlook Calendar Event ID: " + 2.id + ")"; "(Outlook Calendar Event ID: " + 2.id + ")")}} O campo Description deve ficar assim: ![Update an Event in Google Calendar - Description field](__CODE_BLOCK_9__ This function checks if our Google Calendar event has an existing description, then adds the event’s corresponding Outlook Calendar event ID to it in an appropriate manner: * If the Google Calendar event has a description, the function recreates the description and appends “(Outlook Calendar Event ID: The _Outlook Calendar event ID goes here_)” ao final dele. * Mas se a descrição do evento estiver vazia, a função simplesmente adiciona o texto “(Outlook Calendar Event ID: O _ID do evento do Outlook Calendar vai aqui_)” a ela.

Por exemplo, veja como a descrição do nosso evento do Google Calendar ficará com o ID do evento do Outlook Calendar acrescentado ao final do conteúdo inicial: ![Outlook Calendar event ID sample - 2](__CODE_BLOCK_10__ Click OK to move to the next step.

4. Add a text parser module to identify a Google Calendar event’s corresponding Outlook Calendar event ID

Next, we’ll use the Text parser > Match pattern module to search our Google Calendar events for an Outlook Calendar event ID. Add this module between the Google Calendar > Watch Events module and the Microsoft 365 Calendar > Create an Event one. The text parser will: * Look for the “(Outlook Calendar Event ID: The _Outlook Calendar event ID goes here_)” texto na descrição do nosso evento do Google Calendar. * Se esse texto existir, o módulo extrairá dele o ID correspondente do evento do Outlook Calendar.

E vamos configurar o analisador de texto assim: Pattern : Digite \\(Outlook Calendar Event ID: (.)\\) nele. * Continue the execution of the route even if the module finds no matches : Altere essa configuração para Yes, porque queremos que a automação continue tomando certas ações mesmo se não conseguir encontrar um ID de evento do Outlook Calendar na descrição do nosso evento do Google Calendar. * Text : Mapeie aqui o item Description do módulo Google Calendar > Watch Events.

Veja a imagem abaixo para referência: ![Text parser Google Calendar Outlook Calendar sync](__CODE_BLOCK_11__ Click OK to finish configuring the text parser.

5. Add a module to match existing Outlook Calendar events with updated Google Calendar events

Through steps 2 and 3 above we’ve set up our scenario to create new Outlook Calendar events for new Google Calendar ones. Now, let’s build the functionality for updating existing Outlook Calendar events when we update their Google Calendar counterparts. Add a new Microsoft 365 Calendar > Update an Event module to your scenario. But instead of connecting it at the end of the scenario, click and drag the module’s left handle toward the Text parser module. Doing so will automatically create a [router](__CODE_BLOCK_12__ that splits your scenario into two routes: ![Connect OCal Update an Event module](__CODE_BLOCK_13__ We’ll configure the scenario routes later. For now, let’s set up our new module. Connect your Microsoft account to it and map the Text parser module’s $1 string element to the Event ID field (this string element will contain the event ID for our Google Calendar’s corresponding Outlook Calendar event if there is one). Depois mapeie os itens de dados do módulo Google Calendar > Watch Events para os vários campos de evento do Outlook Calendar — como fizemos para o módulo Microsoft 365 Calendar > Create an Event no Passo 2 acima. Fazer isso ajuda a atualizar nosso evento existente do Outlook Calendar com os dados atualizados de seu equivalente no Google Calendar. Veja esta imagem para referência: ![Update an Event in Outlook Calendar](__CODE_BLOCK_14__ Click OK to finish configuring the module.

6. Add a module to delete Outlook Calendar events when they’re deleted in Google Calendar

To sync Google Calendar event deletions to Outlook Calendar, we’ll add the Microsoft 365 Calendar > Delete an Event module next. Connect this module to the router to create a third scenario route, like so: ![Connect OCal Delete an Event module](__CODE_BLOCK_15__ Then click the module to: * Connect it to your Microsoft account. * Map the Text parser module’s $1 string element to the Event ID field.

See the image below for reference: ![Delete an Event in Outlook Calendar](__CODE_BLOCK_16__ Click OK to finish configuring the module.

7. Add route filters that determine whether to create a new Outlook Calendar event or update or delete an existing one

We’ve set up three separate routes for creating, updating, and deleting Outlook Calendar events. Now, we need to tell the automation when it should take a certain action over another. We’ll do so by adding a [filter](__CODE_BLOCK_17__ to each route, which will allow the automation to proceed down the route only if certain conditions are met. Click the wrench icon between the router module and the Microsoft 365 Calendar > Create an Event one > click Set up a filter. Give your filter a descriptive label like “Outlook Calendar event doesn’t exist”, and then map the Text parser module’s $1 string element to the condition’s first operator. Click the Text operators: Equal to setting and change it to Basic operators > Does not exist. This way, our automation will create a new Outlook Calendar event if our Google Calendar event doesn’t contain an Outlook Calendar event ID (which it would if there was a matching Outlook Calendar event for it). Veja esta imagem para referência: ![Filter - OCal event doesnt exist](__CODE_BLOCK_18__ Click OK to finish setting up this filter. Then click the wrench icon between the router module and the Microsoft 365 Calendar > Update an Event one to add a second filter. Set this filter’s first condition to $1 string element > Basic operators: Exists. After that, click Add AND rule to add a second condition. Map the Status item from the Google Calendar > Watch Events module to this condition’s first operator. Change the Text operators: Equal to setting to Text operators: Not equal to , then type “cancelled” in lowercase - and with two l’s - into the second operator. See this image for reference: ![Filter - OCal event exists and is to be updated](__CODE_BLOCK_19__ Here, our automation will update our Outlook Calendar event if: * It can find the event’s event ID in our Google Calendar event description. * That Google Calendar event doesn’t have the “cancelled” status (in other words, it hasn’t been deleted).

Clique em OK para continuar configurando o filtro para a rota Microsoft 365 Calendar > Delete an Event. Configure este último filtro da mesma forma que você configurou o segundo filtro para a rota Microsoft 365 Calendar > Update an Event. Desta vez, porém, altere o operador de texto da segunda condição para Text operators: Equal to — para que a automação exclua eventos com status “cancelled”. Veja esta imagem para referência: !Filter - OCal event exists and is to be deleted Clique em OK e pronto, seu cenário está configurado! Ele deve ficar assim: !Sync Google Calendar with Outlook Calendar automatically

8. Ative e execute seu cenário para começar a sincronizar seus calendários do Google e do Outlook

Agora, vamos colocar a automação para funcionar. Se você tiver eventos existentes no Google Calendar para sincronizar com o Outlook Calendar, identifique o evento com a data de início mais antiga. Depois, clique com o botão direito no módulo Google Calendar > Watch Events, selecione Choose where to start, selecione Since specific date e preencha o campo de data com essa data de início. Clique em OK quando terminar. !Choose where to start - Since specific date Clique no botão Run once no canto inferior esquerdo para começar a sincronizar esses eventos do Google Calendar com o Outlook Calendar. Observação: Dependendo do número de eventos do Google Calendar que você precisa sincronizar com o Outlook Calendar e do limite de eventos definido para o módulo Google Calendar > Watch Events, talvez seja necessário executar o cenário várias vezes até que todos os eventos do Google Calendar tenham sido sincronizados. Aumentar temporariamente o limite de eventos pode ajudar a reduzir o número de vezes que você precisará reexecutar o cenário. E, com os eventos existentes do Google Calendar sincronizados, podemos ativar o cenário para sincronizar todos os eventos futuros que criarmos, atualizarmos ou excluirmos. Clique com o botão direito no módulo Google Calendar > Watch Events > selecione Choose where to start > selecione From now on > clique em OK. !Choose where to start - From now on Em seguida, use a configuração de agendamento na parte inferior do editor visual para definir com que frequência você quer sincronizar o Google Calendar com o Outlook Calendar. Por fim, ative seu cenário. Pronto!

E quanto a adicionar um Outlook Calendar ao Google Calendar em vez disso?

Sim, isso é possível! Configurar essa sincronização reversa envolve trocar os módulos do Google Calendar do seu cenário pelos do Outlook Calendar e vice-versa, e ajustar o mapeamento dos itens de dados dos seus módulos para que correspondam. Aqui está uma prévia de como esse cenário deve ficar: !Sync Outlook Calendar with Google Calendar automatically Então, você está pronto para sincronizar os eventos do seu Google Calendar com o Outlook Calendar? Ou até mesmo tentar configurar uma sincronização bidirecional? Então crie sua conta gratuita no Make aqui, e mãos à obra!

⭐ 核心工具推荐

执行本指南:你需要 Make.com 账户

本指南中的自动化流程均基于 Make 平台构建。注册免费账户即可直接复刻我们测试过的场景。

  • 即刻获得 1,000 免费额度
  • 完全还原文章中的可视化体验
  • 通过右侧按钮可直接绑定官网注册
  • 无需懂代码即可跑通流程
★★★★★
4.6/5 (G2 评分, 2,400+ 评价)
* 通过上述链接注册不产生额外费用
/>