---
title: HubSpot Leads to Mria CRM
description: "### Marketing in HubSpot, sales in Jira: every qualified contact becomes a Lead Many teams keep marketing automation in HubSpot and run sales next to delivery in Jira. The hand-off between the two is where contacts get lost. This flow…"
url: "https://mriacrm.com/docs/hubspot-leads-to-mria-crm/"
updated: "2026-11-18"
category: Jira Automation
---

# HubSpot Leads to Mria CRM

### Marketing in HubSpot, sales in Jira: every qualified contact becomes a Lead

Many teams keep marketing automation in HubSpot and run sales next to delivery in Jira. The hand-off between the two is where contacts get lost. This flow closes the gap: when a HubSpot contact reaches a lifecycle stage you choose, HubSpot posts the contact to Jira Automation, and Mria CRM gets a Lead with the person's details, a link back to the HubSpot record and a note saying why it arrived. A contact that is already a Lead gets the note instead of a duplicate.

It is the same shape as [Capture Leads from Web Forms](/docs/capture-leads-from-web-forms/): an Incoming webhook, a Find record, a branch. What is specific to HubSpot is how the webhook is sent, what the payload looks like and which HubSpot properties map to which Lead fields, so this page spends its time there.

## 1. What you get

A HubSpot contact, **Elena Marchetti** of Harborview Dental Group, was marked a Marketing Qualified Lead. Seconds later Mria CRM holds **LEAD - Elena Marchetti** tagged HubSpot and MQL, with a web link to the HubSpot record and a note with the lifecycle stage, the original source and the campaign that brought the contact in. When HubSpot later marked the same contact a Sales Qualified Lead, the existing Lead got the tag SQL and a second note instead of a duplicate.

[![HubSpot Leads to Mria CRM: What you get](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-01.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-01.png)

## 2. The flow at a glance

1. **Incoming webhook** — receives the contact from a HubSpot workflow.
2. **Find record** — looks for a Lead with that email.
3. **If/else** — `{{fetchedMriacrmRecord.found}}` equals false?
4. **If: Create lead**, **Link item** (web link to the HubSpot record) and **Add note**.
5. **Else: Update lead** (adds the new tag) and **Add note** on the Lead that already exists.

[![HubSpot Leads to Mria CRM: The flow at a glance](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-02.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-02.png)

## 3. Build the Jira side

You need permission to create automation flows in Jira, and a Mria CRM role that can create and edit Leads; the steps run as you. Section 4 covers HubSpot.

### Step 1. Create the flow and its trigger

1. Open **Settings → System → Global automation** and choose **Create flow → Create from scratch**.
2. Pick the trigger **Incoming webhook**.
3. Add one action (the Find record below) and save the flow with **Save without enabling**. Jira cannot issue the webhook URL for a flow that is not saved, and it will not save a flow without an action.
4. Back on the trigger, set **Work item criteria** to **No work items from the webhook** and click **Generate secret**. Copy the **Webhook URL** and the secret for section 4.

[![HubSpot Leads to Mria CRM: Step 1. Create the flow and its trigger](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-03.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-03.png)

**The URL and the secret together are a key.** Anyone who has both can create Leads in your CRM. In HubSpot the secret goes into a workflow secret, never into a property or a note. If it leaks, generate a new one; the old one stops working at once.

### Step 2. Find record — is this person already a Lead?

Add **Find record in Mria CRM**. If this is your first Mria CRM step, click **Connect** first.

| Field | Value |
| --- | --- |
| Find by | Email |
| Record type | Lead |
| Email | `{{webhookData.email}}` |

[![HubSpot Leads to Mria CRM: Step 2. Find record  is this person already a Lead](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-04.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-04.png)

### Step 3. Branch on the result

Add an **If/else block**. In the If part choose **Add condition → {{smart values}} condition**: first value `{{fetchedMriacrmRecord.found}}`, condition *equals*, second value `false`.

### Step 4. If not found: create the Lead and link HubSpot

Inside the If part add **Create lead in Mria CRM**:

| Field | Value |
| --- | --- |
| Contact name | `{{webhookData.firstname}} {{webhookData.lastname}}` |
| Contact email | `{{webhookData.email}}` |
| Company name | `{{webhookData.company}}` |
| Lead source | empty, or a source that exists in your workspace (Settings → Lead sources) |
| Tags | `HubSpot, {{webhookData.qualification}}` — the stage name HubSpot sends (MQL, SQL…) becomes a tag; missing tags are created |
| Work item key | **empty** — there is no work item |

[![HubSpot Leads to Mria CRM: Step 4. If not found create the Lead and link HubSpot](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-05.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-05.png)

Then **Link item to Mria CRM record**, tab **Web link**, so the salesperson can jump to HubSpot from the Lead:

| Field | Value |
| --- | --- |
| URL | `{{webhookData.hubspot_url}}` |
| Link text | HubSpot contact |
| Record type | Lead |
| Record id | `{{createdMriacrmLead.id}}` |

[![HubSpot Leads to Mria CRM: Step 4. If not found create the Lead and link HubSpot](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-06.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-06.png)

And **Add note in Mria CRM** with *Add to* = One record by id, Record type Lead, Record id `{{createdMriacrmLead.id}}` and this content:

```
Qualified in HubSpot.
Lifecycle stage: {{webhookData.lifecyclestage}}
Original source: {{webhookData.hs_analytics_source}}
Last campaign: {{webhookData.hs_latest_source_data_1}}
```

### Step 5. Else: tag and note the repeat qualification

In the Else part add **Update lead in Mria CRM** with *Update* = One lead by id, Record id `{{fetchedMriacrmRecord.id}}` and Tags `HubSpot, {{webhookData.qualification}}`. A contact that moves from MQL to SQL therefore carries both tags. Leave Tags mode empty: its default, add, keeps the tags the Lead already has and adds the new ones.

[![HubSpot Leads to Mria CRM: Step 5. Else tag and note the repeat qualification](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-07.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-07.png)

Then another **Add note in Mria CRM** with Record id `{{fetchedMriacrmRecord.id}}` and a content line such as `Qualified in HubSpot again. Lifecycle stage: {{webhookData.lifecyclestage}}`.

### Step 6. Turn it on

Save the flow and switch it on. Until it is on, calls to the URL do nothing.

## 4. Send the contact from HubSpot

HubSpot's **Send a webhook** workflow action (Data Hub, formerly Operations Hub, Professional or Enterprise) posts a JSON body you compose from contact properties. Build a contact-based workflow:

1. **Enrollment trigger**: *Lifecycle stage* is any of *Marketing Qualified Lead*. Allow re-enrollment if you want every re-qualification to reach the CRM.
2. Action: **Send a webhook** (under Data ops). Method **POST**, Webhook URL = the URL from step 1.
3. **Authentication type**: **API key**. API key name `X-Automation-Webhook-Token`, API key location **Request header**, and pick a workflow secret that holds the secret from step 1.
4. **Request body**: **Customize request body**, then add one key per property, named as the flow expects them:

| Key | HubSpot property |
| --- | --- |
| email | Email |
| firstname | First name |
| lastname | Last name |
| company | Company name |
| lifecyclestage | Lifecycle stage |
| hs_analytics_source | Original source |
| hs_latest_source_data_1 | Latest source drill-down 1 |
| qualification | a static value naming the stage this workflow enrolls on, for example `MQL` — a second workflow on Sales Qualified Lead sends `SQL`; it becomes the Lead's tag |
| hubspot_url | a static value: `https://app.hubspot.com/contacts/<portalId>/record/0-1/` followed by the *Record ID* property |

Two alternatives when the webhook action is not available on your HubSpot tier. *Include all contact properties* sends every property instead of a custom body; the smart values then read `{{webhookData.properties.email.value}}` — put a temporary Log action with `{{webhookData}}` at the top of the flow to see the exact shape. Or trigger from Zapier: its HubSpot triggers (New Form Submission, New Contact in List) feed the API Request step on [Zapier: Lead Capture](/docs/rest-api-zapier-lead-capture/).

If a sender cannot set headers at all, Jira also accepts the secret at the end of the URL: `<Webhook URL>/<secret>`. The header is the better place, because URLs end up in logs.

### Test it from a terminal

The same request HubSpot will send, with a sample contact:

```
curl -X POST '<webhook URL from the trigger>' 
  -H 'Content-Type: application/json' 
  -H 'X-Automation-Webhook-Token: <secret from the trigger>' 
  -d '{"email": "elena.marchetti@harborviewdental.com", "firstname": "Elena", "lastname": "Marchetti",
       "company": "Harborview Dental Group", "lifecyclestage": "marketingqualifiedlead",
       "hs_analytics_source": "ORGANIC_SEARCH", "hs_latest_source_data_1": "Webinar: Quotes in Jira",
       "qualification": "MQL", "hubspot_url": "https://app.hubspot.com/contacts/24871930/record/0-1/51820744"}'
```

## 5. Check that it worked

Open the flow's **Audit log**. Every call is a row; expand it to see each step and which branch ran. The Lead itself shows the link and the note on its page.

[![HubSpot Leads to Mria CRM: Check that it worked](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-08.png)](https://mriacrm.com/wp-content/uploads/2026/11/hubspot-leads-to-mria-crm-08.png)

## 6. Make it yours

- **Route by owner.** Send HubSpot's *Contact owner* email as `owner_email` and branch on it to set the Lead's Assignee.
- **Deals instead of Leads.** For Sales Qualified Leads use **Create deal** with the pipeline and stage of your choice; see the [Actions Reference](/docs/automation-actions-reference/).
- **Keep Mria CRM in step with later changes.** A second HubSpot workflow on *Lifecycle stage* = Sales Qualified Lead can call the same URL with `"qualification": "SQL"`; one on Customer can call another flow whose Else branch sets the status to Converted.
- **Other CRMs.** Pipedrive and Zoho CRM workflows have equivalent webhook actions; only the property names in the body change, the Jira flow stays the same.

## 7. Troubleshooting

| What you see | Why, and what to do |
| --- | --- |
| Nothing in the audit log after HubSpot fires | The request never reached the flow: the flow is off, the URL is incomplete, or the token header name is not exactly X-Automation-Webhook-Token. HubSpot retries failed webhooks for up to three days, so fix the flow and wait. |
| The Lead is created but a field is empty | The key in HubSpot's body and the smart value differ, or you chose Include all properties, which nests values. Log {{webhookData}} and compare. |
| Create lead fails on Lead source | The source HubSpot does not exist in the workspace. Add it under Settings, or leave the field empty. |
| The same person became two Leads | Find record must search by the same email the Lead is created with, and HubSpot must send the email in the body. |
| Aborted — Monthly flow executions have been exceeded | The site reached its monthly automation usage. Runs resume next month or on a larger plan; HubSpot keeps retrying meanwhile. |

## Related Pages

- [Jira Automation](/docs/jira-automation/) — how Mria CRM steps work, and the other use cases.
- [Automation Actions Reference](/docs/automation-actions-reference/) — every field of Find record, Create lead, Link item and Add note.
- [Capture Leads from Web Forms](/docs/capture-leads-from-web-forms/) — the same flow fed by a website form.
- [HubSpot: Use webhooks in workflows](https://knowledge.hubspot.com/workflows/how-do-i-use-webhooks-with-hubspot-workflows) — HubSpot's own documentation of the Send a webhook action.

 [https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmriacrm.com%2Fdocs%2Fhubspot-leads-to-mria-crm%2F&linkname=HubSpot%20Leads%20to%20Mria%20CRM](https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmriacrm.com%2Fdocs%2Fhubspot-leads-to-mria-crm%2F&linkname=HubSpot%20Leads%20to%20Mria%20CRM)[https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fmriacrm.com%2Fdocs%2Fhubspot-leads-to-mria-crm%2F&linkname=HubSpot%20Leads%20to%20Mria%20CRM](https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fmriacrm.com%2Fdocs%2Fhubspot-leads-to-mria-crm%2F&linkname=HubSpot%20Leads%20to%20Mria%20CRM)[https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fmriacrm.com%2Fdocs%2Fhubspot-leads-to-mria-crm%2F&linkname=HubSpot%20Leads%20to%20Mria%20CRM](https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fmriacrm.com%2Fdocs%2Fhubspot-leads-to-mria-crm%2F&linkname=HubSpot%20Leads%20to%20Mria%20CRM)
