Send a message to Google Chat when a record is added

Language: English

In this tutorial we set up an automation that posts a message to a Google Chat space each time a new record is added to a form — directly from ActivityInfo, with no intermediary workflow tool. It uses ActivityInfo's built-in webhook step to post the message.

We assume the role of a coordinator whose team works in a Google Chat space. The team tracks projects in a Projects form, and wants each newly submitted project announced in the space as it arrives.

What you need

  • A form to watch. Ours is a Projects form with a text field Project Name with the code NAME and a reference field Partner with the code PARTNER, but any form will do — adjust the field references to yours.
  • Permission to design the database in ActivityInfo.
  • A Google Chat space in which you can add webhooks. Incoming webhooks are a Google Workspace feature; a space administrator may need to allow them.

Step 1: Create an incoming webhook in Google Chat

  1. In Google Chat, open the space that should receive the messages, or create a new one.

    Create a Google Chat Space
    Create a Google Chat Space
  2. Click the space name, then Apps & integrations.

    Apps & integrations
    Apps & integrations
  3. Under Webhooks, select Add webhooks.

    Add webhooks
    Add webhooks
  4. Name the webhook, for example "ActivityInfo", and save.

    Webhook
    Webhook
  5. Copy the webhook URL — it begins with https://chat.googleapis.com/v1/spaces/....

    Copy webhook URL
    Copy webhook URL

Step 2: Add the automation

  1. In ActivityInfo, open the database, select the Database Settings.

    Database settings
    Database settings
  2. Select Projects form, and then select Automations in the form's detail pane.

    Automations
    Automations
  3. Select Add automation and name it "Announce new projects in Chat".

    Add automation
    Add automation
  4. Select Click here to get started and choose the On record added trigger.

    On record added trigger
    On record added trigger
  5. Label the trigger and Select form.

    Label the trigger
    Label the trigger
  6. Choose the Projects form and Select form.

    Select Projects form
    Select Projects form
  7. Select Done.

    Done
    Done

Step 3: Add the webhook step

  1. Select Add a new step.

    Add new step
    Add new step
  2. Select Action.

    Action
    Action
  3. Select Fire webhook.

    Fire webhook
    Fire webhook
  4. Give the step a label, for example "Post to Chat space".

  5. Paste the Google Chat webhook URL into the Webhook URL field.

  6. Set the Payload format to Custom.

    Label, webhook and payload format
    Label, webhook and payload format

Step 4: Write the message

  1. Select Edit payload.

    Edit payload
    Edit payload
  2. Enter the message body Google Chat expects — a JSON object with a single text property. The ${...} references are filled in from the record that fired the automation; the field list on the right inserts them for you:

    {"text": "📋 New project submitted: *${NAME}* by ${PARTNER.NAME}, added by ${_user.name}"}
    
    Custom payload edidor
    Custom payload edidor
  1. Select Done to close the payload editor, and Done again to close the step.

    Complete configuration
    Complete configuration
  2. Select Save. The automation is now active.

    Save automation
    Save automation

Step 5: Test

  1. Add a test record to the Projects form.

    Add record
    Add record
  2. Within moments, the message appears in the Google Chat space with the project's details filled in.

    ActivityInfo notification received
    ActivityInfo notification received

Going further

  • Announce only some projects: add a filter step between the trigger and the webhook — for example CONTAINS(SECTORS, "Health") to announce only health-sector projects.
  • Announce status changes instead: use the On record edited trigger with the filter STATUS != _previous.STATUS, and include both values in the message: ${_previous.STATUS} → ${STATUS}.
  • Any formula works inside ${...}: ${IF(BUDGET >= 100000, '🔴 large', 'standard')}.
Next item
Send a message to Microsoft Teams when a record is added