> For the complete documentation index, see [llms.txt](https://developer.gyfti.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gyfti.fr/hubspot-integration-v2/migrating-from-the-legacy-integration.md).

# Migrating from the legacy integration

This page is for clients who already used Gyfti in HubSpot on the previous Gyfti platform. **You don't need to reinstall anything**: the v2 actions and triggers are in the same Gyfti-App, with the same permissions. Your legacy workflows keep working while you migrate.

***

#### **Step 1: Connect your workspaces**

Connect each new Gyfti workspace to HubSpot. See Setting up HubSpot.

***

#### **Step 2: Swap each action**

In every workflow, replace each Gyfti action with its v2 twin:

| Legacy action                 | v2 action                                |
| ----------------------------- | ---------------------------------------- |
| Send a digital gyfti          | Send a digital gyfti (Gyfti v2)          |
| Send a postal gyfti           | Send a postal gyfti (Gyfti v2)           |
| Validate challenge submission | Validate challenge submission (Gyfti v2) |
| Edit a Gyfti user             | Edit a Gyfti user (Gyfti v2)             |

> **Replace, don't add.** A workflow that holds both the legacy action and the v2 one runs both: the contact gets two gifts.

***

#### **Step 3: Swap each trigger**

If a workflow is enrolled by a Gyfti event, switch its trigger too:

| Legacy trigger            | v2 trigger                     |
| ------------------------- | ------------------------------ |
| User Signed Up            | Espace joined (Gyfti v2)       |
| User Logged In            | Espace signed in (Gyfti v2)    |
| Challenge Form Submission | Challenge submitted (Gyfti v2) |
| Challenge Form Validated  | Challenge validated (Gyfti v2) |

The property names changed too (for example `userEmail` / `date` → `joinedAt`, `challengeFormAnswersId` → `participationId`). Update any branch or filter that reads them. The full list is in the Triggers and Actions reference.

***

#### **What changed**

* **Campaign and challenge are dropdowns**, not IDs to copy. A typo or a renamed campaign can no longer break a workflow silently.
* **`user_email` is gone**: Gyfti knows which workspace acts from the connection.
* **Validate challenge submission** no longer takes `challenges_form_answers_id`. You pick the challenge, and the participant is the workflow's contact.
* **Edit a Gyfti user** now asks for the **espace**, and for a **mode** beside the points: *Add points* or *Set balance to*. `cagnotte` is replaced by `Points` + `Points value`.
* **New segments** are typed in **Or new segment**; **Segment** is a dropdown of existing ones.
* **First and last names are optional** on every action.
* **Challenge submitted lands on the participant's own contact**, no longer on an email found in the form answers.
* **Failures are visible**: an action that fails shows red in the workflow history, with the reason.

***

#### **Your history**

Legacy events already on your contacts' timeline stay there. v2 events show next to them, under their own names.
