# Chatfuel

Connecting Chatfuel to PYLO, what it brings and how to tell it is working.

Chatfuel connects to PYLO so that:

- DM funnel opt-ins from a Chatfuel bot arrive as leads on the DM funnel, matched to the person PYLO already has.
- Application to booking for the bot's opt-ins, beside every other form.

## Connecting

Chatfuel connects by an address PYLO gives you, which the tool posts to. Open Settings, then Integrations, then Chatfuel.

1. Create the address below and copy it.
2. In the Chatfuel flow, save the user's email to the email attribute before this step. PYLO files a person by email, so a user with none is refused rather than filed twice.
3. Add a JSON API (or Send Request) block: POST to the address, sending first name, last name, email, phone and any UTM attributes.
4. Leads land on the DM funnel unless you map the form key elsewhere under Website form. Run the flow once; this page says connected when it arrives.

## What PYLO reads

- The user attributes the block sends: name, email, phone, and any attribute such as UTMs and pylo_form
- The Chatfuel user id and Instagram handle, when sent

It does not read:

- The conversation itself
- Users who never reach the block that posts to PYLO

Chatfuel's own documentation: https://docs.chatfuel.com/en/articles/4230883-json-api
