Log inStart Free Trial
easyCoexistence Official APIs

Send Instagram DM leads to Google Sheets or your CRM

To send Instagram DM leads to Google Sheets or a CRM, collect the details in the chat, since Instagram's API gives a username and name but no email or phone, then post them to n8n, Make, Zapier or your CRM's API. easyCoexistence does it in one automation built from Claude or ChatGPT: questions or AI save the answers, and a Call an API step sends them.

Name and username

Profile fields Instagram's User Profile API returns, with picture and follower count, once the person has messaged the account.

Turned off

Instagram disabled its email and phone-number quick replies, so people type those answers instead.

10 fields

Most values one AI saves details step pulls from the conversation into contact fields, on your own AI key.

20 s

How long a Call an API step waits for your endpoint; the answer and its HTTP status are kept for later steps.

Once

How many times the DM webhook relays each event to your URL; a failed delivery is not retried.

What does Instagram tell you about a lead?

Less than a form would. When someone DMs the account, Instagram's User Profile API can return their name, username, profile picture and follower count, and whether they follow you; it lists no email or phone field, and Instagram has turned off the quick replies that would share them. So the details that make a lead, such as what they want, an email, a city or a budget, have to come from the conversation. In easyCoexistence each person is a contact with fields and tags, and each later step can use the answers as {{contact.email}} or {{contact.interest}}.

How do you collect the details in the DM?

Two steps fill the fields, and an agent can too:

  • Ask a question sends a question, waits for the answer, up to 1,380 minutes by default, and saves it in a field. Expect can be Any text, An email, A number, A phone number or One of the buttons.
  • An answer that does not fit, such as an email without @, gets the question again; after three wrong answers the flow goes on without it.
  • AI saves details has your model read the latest 12 messages and save up to 10 values, such as need, budget, city or email, keeping only what the person said.
  • An agent saves fields with its own tool while it chats, as the Qualify leads starter does with interest, budget and timing.

How do the details reach Google Sheets or a CRM?

Three routes, by who should do the writing. easyCoexistence does not write into Google Sheets itself: a workflow tool or your own endpoint holds the Google sign-in and adds the row. Call an API carries the fields, Call my webhook carries the chat, and the DM webhook carries Meta's raw events.

Call an API (http_request)POSTs the fields you choose, as {{contact.email}}-style tokens, to an n8n, Make or Zapier webhook or to a CRM's API; one attempt, 20 seconds
Call my webhook (call_webhook)POSTs the DM, the person's id and name and up to 10 recent messages, signed; your answer can become the reply
DM webhook (set_social_webhook_destination)Relays the account's comment, mention and DM events as Meta sent them, signed, with or without automations

What does the automation look like?

Built by your AI through the connector, a lead flow on the Instagram account is one create_automation call: a First message trigger, two questions, a tag, the request to your workflow and a thank-you. A JSON body fills its tokens with escaping, so quotes in an answer cannot break it, and save_as keeps the answer as {{vars.sheet}} and its status as {{vars.sheet_status}}, which a Split into paths step can check, since a 4xx or 5xx answer does not stop the flow.

A lead flow that ends in a POST to an n8n workflow
create_automation {
  "connection_id": "…Instagram channel_id from list_social_accounts…",
  "name": "Instagram leads to Sheets",
  "trigger": { "type": "dm_received", "match": "first_message" },
  "steps": [
    { "type": "ask", "text": "Hi! What are you looking for?", "save_to": "interest", "expect": "text" },
    { "type": "ask", "text": "Great! What is the best email to send you the details?",
      "save_to": "email", "expect": "email",
      "retry_text": "That does not look like an email. Could you type it again?" },
    { "type": "tag", "action": "add", "tag": "lead" },
    { "type": "http_request", "method": "POST",
      "url": "https://n8n.example.com/webhook/instagram-leads",
      "body": "{\"username\": \"{{name}}\", \"interest\": \"{{contact.interest}}\", \"email\": \"{{contact.email}}\"}",
      "save_as": "sheet" },
    { "type": "reply_text", "text": "Thanks! Someone from our team will get back to you soon." }
  ]
}

How do you keep the sheet clean?

Decide the columns before the first lead: the username from {{name}}, each field you ask for, and the first DM from {{message}}; let the workflow stamp the date, since the step sends no time of its own. Match rows on the email or the username, so a person who runs the flow twice updates their row; a contact counts as new again after 30 days of silence. Each run calls your URL once, and tests call it for real, so send test runs to a test tab.

When is the DM webhook the better route?

When you want a log of the conversations rather than a lead form. set_social_webhook_destination relays the account's comment, mention and DM events to your HTTPS endpoint as Meta sent them, signed with X-EC-Signature and a secret shown once, whether or not an automation is on, and your n8n or Make workflow pulls out what it needs. Each event is relayed once with no retries, and the relay keeps no copy, so answer with a 2xx quickly and store what you need.

How to set it up

  1. Prepare the receiverIn n8n, Make or Zapier, start a workflow with a webhook that accepts a POST, add a Google Sheets or CRM step, and copy the webhook's URL.
  2. Ask your AI for the flowTell Claude or ChatGPT which details to ask for and where to send them; it builds the automation on your Instagram account with create_automation.
  3. Or build it in the editorClick New automation, choose Manual, open the Instagram tab, pick Start from scratch and set First message, then add Ask a question, Tag and Call an API steps.
  4. Map the fieldsIn Call an API, choose POST, paste the URL and write a JSON body with tokens such as {{contact.email}}; fill in Save the answer as.
  5. Test with a real DMRun test calls your URL for real with empty answers, so check that a row appears, then DM the account from another profile to see a full one.

Common mistakes

  • Treating test runs as harmless. Run test and test_automation really call your URL, with empty answers because a test does not wait for them, so a blank row lands in the sheet.
  • Sending fields with Call my webhook. It carries the DM and recent messages, not contact fields; use Call an API with {{contact.email}}-style tokens.
  • Putting a {{token}} in the URL's host. It is refused on save: tokens go in the path or the query, and their values are encoded so an answer cannot change the address.
  • Expecting the email from Instagram's profile. The API has no such field, and email quick replies are off on Instagram, so ask with Expect set to An email.
Doing this with EasyCoexistence

easyCoexistence collects leads in your Instagram DMs with questions, an AI that saves the details into contact fields, or an agent, then sends them to n8n, Make, Zapier or your CRM's API with a Call an API step, or relays the raw DM events to your own endpoint, signed. Claude or ChatGPT can build the flow through the connector. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook, Google Business Profile and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Connect Instagram to ChatGPT and Claude

Frequently asked questions

Can the lead go straight into HubSpot or another CRM?

Yes, when the CRM has an HTTPS API: Call an API posts the fields to it, with your API key in a header. Use a key that can only create or update contacts, and put n8n, Make or Zapier in between for a CRM without a simple API.

Do I need n8n, Make or Zapier for Google Sheets?

In practice yes, or a small endpoint of your own. Writing to a private sheet needs Google's sign-in, which a workflow tool's Google Sheets step keeps for you; Call an API then posts each lead to that workflow.

Can I export DM conversations from before?

Not through easyCoexistence. Conversations are kept only from the moment an automation is switched on for the account, for your retention period, and the DM webhook relays new events only.

What does easyCoexistence keep along the way?

With an automation on, DM conversations stay for the period you choose, 30, 90 or 365 days, 90 by default, incoming events 7 days and run logs 30 days. The DM webhook keeps no copy. The sheet or CRM is your permanent record.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on