Example of creating an automation with Google Calendar web trigger

Create an automation with Google Calendar web trigger to display the description of the event in a message box.

先决条件

Ensure that you meet the prerequisites mentioned in Google Calendar web triggers.

Google Calendar web trigger monitors the Google Calendar for newly created events. When you add an event to the calendar, the trigger initiates the Message Box action to display the event description.

过程

  1. 在左侧窗格中,单击自动化
  2. 单击 创建 > 任务机器人
    创建任务机器人向导已显示。
  3. 名称字段中为机器人输入一个合适的名称。
    默认情况下,所有机器人都存储在 \Bots 文件夹中。
  4. 可选: 您可以在描述字段中为机器人添加描述。
  5. 可选: 您可以使用选择按钮将机器人保存在不同的文件夹中。
  6. 单击创建和编辑
    机器人已创建,并显示编辑任务机器人
  7. Click Triggers > Google Calendar , and then double-click or drag Web trigger to add the web trigger to Triggers section.
  8. Select Created from the Listen to event drop-down.
  9. Enter the email address associated with Google Calendar in the Email Address field.
  10. Click Pick to choose the pre-configured OAuth connection from the Pick an OAuth connection modal.
  11. Click Create variable to create a record variable to save the trigger response data.
    The trigger response data contains all the information about the event in which the change occurred and is saved in key-value pair format. You can also select an existing record variable from the drop-down list.
  12. Enter TriggerData in the Create variable modal to create a new record variable.
    By default, the Use as input check box is enabled.
  13. Click Actions > Message Box , and then double-click or drag Message Box action to add it to the Actions section.
  14. Configure the Message Box action as per steps mentioned in 使用消息框 action.
    Enter $TriggerData{description}$ in Enter the message to display to display the description of the created event in the message box. The description key from the trigger response data contains the body of the created event as the corresponding value.
  15. Click Save to save the automation.
Click Run > Run with triggers to activate the trigger. The trigger then listens for Created event in the monitored Google Calendar instance. When an event is created, the trigger starts the Message Box action. The automation displays the description of the created event in the message box.