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: 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.

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

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 #
- Open Settings → System → Global automation and choose Create flow → Create from scratch.
- Pick the trigger Incoming webhook.
- 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.
- 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.

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 | |
| Record type | Lead |
{{webhookData.email}} |

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 |

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}} |

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.

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:
- Enrollment trigger: Lifecycle stage is any of Marketing Qualified Lead. Allow re-enrollment if you want every re-qualification to reach the CRM.
- Action: Send a webhook (under Data ops). Method POST, Webhook URL = the URL from step 1.
- 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. - Request body: Customize request body, then add one key per property, named as the flow expects them:
| Key | HubSpot property |
|---|---|
| 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.
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.

6. Make it yours #
- Route by owner. Send HubSpot’s Contact owner email as
owner_emailand 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.
- 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 — how Mria CRM steps work, and the other use cases.
- Automation Actions Reference — every field of Find record, Create lead, Link item and Add note.
- Capture Leads from Web Forms — the same flow fed by a website form.
- HubSpot: Use webhooks in workflows — HubSpot’s own documentation of the Send a webhook action.