Skip to content

Steps

Gmail

Send an email from your own Gmail account when something happens in the chat, for example a new lead for your team.

What it does#

The Gmail step sends email from the Gmail account you connect, in the background: the customer doesn't see it.

ActionWhat it doesSaved as
Send an emailSends an email from the connected Gmail account.email
Reply in a threadReplies inside a thread this chatbot started (use the thread id saved by Send an email).email
Search emailsSearches the mailbox with Gmail's search words.emails

Sending only asks Google to let Officely send email as you: Officely can't read your mailbox. Search emails needs a separate read permission and appears only in accounts where it's enabled.

The Gmail step

Email your team about a new lead#

  1. 1

    Add the Gmail step

    Drag Gmail from the Google group and connect it after the steps that collect the lead's details.

  2. 2

    Connect Gmail

    Under Google account, click Connect Google (or pick an account) and allow Officely to send email as you.

  3. 3

    Pick the action

    Under Action, choose Send an email.

  4. 4

    Address it

    To: one or more addresses, separated by commas. Optionally add Cc, Bcc and Reply-to (optional).

  5. 5

    Write it

    Subject: for example New lead: {{@name}}. Format: Plain text (line breaks are kept) or Simple HTML. Text: for example Hi, {{@name}} left details: {{#cphone}}.

  6. 6

    Connect both outputs

    Connect Success to the next step and Error to a fallback.

  7. 7

    Try it

    Try it really sends the email, so it asks "Run it for real?" first. Send it to yourself.

Simple HTML allows basic tags only (p, b, i, a, br, ul, li). Scripts and styles are removed.

Replies and results#

  • Send an email saves {{#email.id}} and {{#email.threadId}}.
  • Reply in a thread: write the Thread id, usually {{#email.threadId}} from an earlier Send an email step. Replies only work in threads this chatbot started.
  • Search emails: write Search for as you would in Gmail's search box, for example from:orders@shop.com newer_than:2d. It saves {{#emails.count}}, {{#emails.first.subject}} and {{#emails.first.from}}.

If Google fails, the chat continues on the Error output with {{#google_error.message}} and {{#google_error.code}}. If Error isn't connected, the chat stops and you get an alert.

Common mistakes#

ProblemFix
"Check the email addresses: separate them with commas."Use commas between addresses in To, Cc and Bcc.
"Write the thread id, ..."A reply needs {{#email.threadId}} from a Send an email step earlier in the flow.
"you@gmail.com isn't allowed to use Gmail (send) yet."Click Allow and approve the permission once in Google's window.
The account shows (sign in again).Click Reconnect and sign in to Google again.