Gmail to amoCRM: a deal with a contact for every lead email

To move Gmail leads into amoCRM, nana800 uses three blocks: gmail incoming email checks your Inbox once a minute, Open AI request pulls the name, phone and request out of the email, and amoCRM request creates a deal with a contact. You need a Google app password, your own OpenAI key and a long-lived amoCRM token, no code. Your nana800 balance is topped up to $3.50 for free every month.

Build it in the builder

What you can automate

  • Website form emails that land in Gmail become deals: the client name and phone go into the contact instead of staying in the email text
  • Send only leads to amoCRM: put from:forms@mysite.com or subject:(request) into the trigger search, and newsletters or invoices do not start the scheme
  • Put deals from email into a separate pipeline: its pipeline_id is written into the ChatGPT task and lands in every deal
  • Set the deal budget when the client names an amount or picks a plan in the form: ChatGPT puts it into price
  • Add a note with a short summary of the email to the deal, so the manager does not have to look for it in the mailbox
  • Collect leads from several websites in one Gmail inbox and tell them apart by the deal name that ChatGPT builds from the subject

How to set it up

  1. 1

    Prepare three kinds of access

    For the mailbox, create an app password: Google account, Security, App passwords. In amoCRM, open your integration in the marketplace section and generate a long-lived token on its keys tab, valid from 1 day to 5 years and shown only once. An OpenAI key that starts with sk-... is created under API keys in your OpenAI account.

  2. 2

    Add the Gmail trigger and pick the lead emails

    Create a scheme and add gmail incoming email: the Gmail address, the APP_PASSWORD_IMAP sign-in method and the app password. In search query, describe how to spot a lead, for example from:forms@mysite.com or subject:(New request). With an empty search every email becomes a deal, newsletters included.

  3. 3

    Ask ChatGPT to build the deal

    Add Open AI request in TEXT_COMPLETION mode with the json_object response format. Put the from, subject and body_text fields of the email into the prompt and describe the answer: name is the request, price is an amount as a number or 0, and _embedded.contacts holds one contact with first_name and custom_fields_values, phone with field_code PHONE and email with EMAIL.

  4. 4

    Create the deal in amoCRM

    Add amoCRM request: the account address such as mycompany.amocrm.ru, the token, request type POST and section leads/complex. Put only the json_response of the ChatGPT block into the JSON data, without brackets or quotes of your own. The object goes in as ready JSON, so quotes or line breaks from the email cannot break it.

  5. 5

    Turn the scheme on and send a test lead

    Turn the scheme on: the first check only remembers the emails already in the Inbox. Send an email with a name and phone to the mailbox, and after the next check a deal appears in amoCRM, with its ID in item of the block result. If not, the reason is in error_message of the amoCRM block or error_text of the ChatGPT block. An enabled scheme costs $0.0042 per hour.

Pricing

A run of a Gmail block costs $0.002, a run of a amoCRM block costs $0.002. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Gmail

    Start a scheme on every new Gmail email: send an alert to Telegram, save it to a spreadsheet or let an AI read it. No code, free balance every month.

  • amoCRM

    Automate amoCRM without code: website and Telegram leads become deals, and tasks and notes are added for you. Free balance every month, no card needed.

Similar integrations

  • Gmail + Discord

    New Gmail emails arrive as messages from your bot in a Discord channel, with the sender, subject and start of the text. Gmail search filter, no code, free balance.

  • Gmail + Google Sheets

    Every new Gmail email becomes a row in Google Sheets, with the sender, subject, date and start of the text in their own columns. Free balance monthly, no card needed.

  • Gmail + Notion

    Every new Gmail email becomes a row in a Notion database: subject as the title, sender and date in columns, the text on the row page. No code, free balance monthly.

  • Gmail + OpenAI (ChatGPT)

    ChatGPT reads every new Gmail email: writes a summary, sets a category or drafts a reply and sends the result to Telegram or a sheet. No code, free balance monthly.

  • Gmail + Slack

    Every new Gmail email arrives as a message in a Slack channel, with the sender, subject and start of the text. Gmail search filter, no code, free balance monthly.

  • Gmail + Telegram

    Get new Gmail emails as Telegram messages: sender, subject and text in your private chat or a team group. Free balance every month, no card needed.

Frequently asked questions

One email takes six basic block runs: two each for the Gmail trigger, the ChatGPT block and the amoCRM request. 1,000 runs cost $1. Emails that do not match the search cost nothing, and a failed block run is not charged. OpenAI bills the model tokens to your OpenAI account. An enabled scheme costs $0.0042 per hour, so a scheme kept on around the clock spends most of the free $3.50 a month on scheme hours.

Yes, if a deal named after the email subject is enough: POST to the leads section with subject put into name, which is four runs per email. The name and phone cannot be parsed this way. The JSON data field takes the email text as it is, and the first line break or quote breaks the JSON, so the block fails. If you know JavaScript, the free run custom script block can parse the text.

Ask ChatGPT for an object with two parts: deal is the deal itself and note is an object with a text field holding the summary. Put deal into the first amoCRM request. Add a second one after it: POST to leads/notes, entity_id is the deal ID from item of the first block, note_type is common, and params gets the note object. The second request costs two more runs.

If the model does not return JSON, the ChatGPT block fails with the reason in error_text. If amoCRM rejects a field, its answer with the field name is in error_message and no deal is created. A failed block is not charged, but that email does not start the scheme again, so create the deal by hand. Errors usually go away once the task describes the fields and gives a sample answer.

Kommo works: enter the full account address, for example mycompany.kommo.com. For Yandex Mail, Zoho Mail or company mail, use the IMAP incoming email trigger instead of Gmail. It returns the same from, subject and body_text fields, and the ChatGPT and amoCRM blocks stay as they are.

Not instantly. The trigger checks the Inbox once a minute, and the email enters the scheme with the first check after Gmail shows it. Then ChatGPT answers: a fast model within seconds, models that think first take longer. The block does not wait for an answer longer than three minutes and fails, so the fast gpt-6-luna suits lead parsing well.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder