WhatsApp live with a single link
You build a flow that serves as a template and pick it once. The channels it needs (WhatsApp, Gmail…) are detected automatically: they are the WhatsApp, Gmail, Google Calendar or Jira nodes, whether or not you have your own resource set on them. From then on, every customer who connects those channels gets their own copy of the flow, with all their channels assigned, and the copy turns on by itself once it has them all. The first message it receives already runs it. No customer chooses or sees anything: the connection links are the usual ones.
When to use it
When you want each customer to connect their channels and be served right away with their own flow, without assigning resources or turning anything on by hand.
Steps
- 1Build and test the flow that will be the template, with whatever channels it needs: for example a WhatsApp trigger and a node that sends through Gmail. You can leave your own WhatsApp or Gmail set (it is your test): each customer replaces it with theirs and yours is never copied. If the flow uses other resources of yours that the customer does not connect (for example your OpenRouter), leave them assigned: they are copied as-is to every replica and are not asked of the customer. The template is never turned on: it is only copied.
- 2Copy the template id. Get it with GET https://api.pulbot.com/api/v1/flows/ (X-API-Key header); it is the id field of your flow.
- 3Check your balance and your plan. Turning a flow on in production requires wallet balance, and each replica counts as an active flow in your plan.
- 4Pick the template, once. In the dashboard: Resources → «Template for new resources», pick the flow and press Save: it shows the channels it detected («Each customer will connect: WhatsApp, Gmail») and marks it «Active»; there you also see what happened with the last customer. Through the API: PUT https://api.pulbot.com/api/v1/flows/auto-connect/ with the X-API-Key header and the body {"flow_id": "TEMPLATE_ID"} (you don't list channels: they come from the flow); GET /api/v1/flows/auto-connect/ lists it. To change it, pick another flow; to remove it, «Remove template» or DELETE /api/v1/flows/auto-connect/TEMPLATE_ID/.
- 5Create one link per channel of the customer, as usual and with no flow, and send the SAME external_ref (your customer id) in ALL of them: that is how their channels land in the same copy. For WhatsApp: POST /api/v1/connection-links/ with {"provider": "whatsapp", "external_ref": "customer-123", "customer_email": "ana@business.com", "customer_name": "Ana"}; for Gmail: the same with {"provider": "google", "external_ref": "customer-123"}. customer_email and customer_name are optional: with them, Pulbot emails Ana when she finishes. Each returns 201 with data.connect_url; give them to your customer. They expire after 10 minutes and work for a single connection.
- 6Your customer opens each link, taps connect and authorizes in Meta or Google. They don't need a Pulbot account, don't type their email and don't choose anything: they only see that they're connected. If they connect one channel and not the other yet, their copy waits; when the last one arrives, it turns on by itself.
- 7Check the result: GET /api/v1/flows/auto-connect/ returns the template with last_result: that customer's replica flow_id, assigned, activated, pending_platforms (the channels still missing) and, if something failed, reason. Open that replica in the dashboard to confirm it is active.
- 8Test for real: send a message to the connected channel (for example, a WhatsApp to the number) and confirm its replica replies. Check the run in that replica's history before calling the integration done.
Reference
- What Pulbot does when a number connects
- In this order, each time a customer connects one of the template's channels: 1) the resource is created; 2) the template is replicated into a new flow for that customer (only the first time; their other channels reuse the same replica); 3) the resource is assigned as the channel on that platform's nodes; 4) if the replica already has all its channels, its triggers are turned on; if any is missing, it waits. Each step only runs if the previous one succeeded.
- The template
- One per account; a platform belongs to a single template. Pick it in the dashboard (Resources → «Template for new resources») or with PUT /api/v1/flows/auto-connect/ and {"flow_id": "…"}. You must be able to edit that flow and it must have at least one channel the customer connects (a WhatsApp, Gmail, Google Calendar or Jira node).
- Template and replicas
- The template is never assigned or turned on. Each customer (their external_ref) gets ONE replica of their own, with its own name, independent from the others, and all their channels land in it. If your customer connects again with the same external_ref the same resource is updated and no new replica is created.
- Shared resources
- Your own resources that the template uses and that aren't the customer's WhatsApp (for example OpenRouter) are copied to every replica as-is.
- One customer = their external_ref
- Replicas are one per customer, and the customer is their external_ref. With the same external_ref, their WhatsApp and their Gmail go to the same replica. Without external_ref each resource counts as a separate customer: fine for single-channel flows, but a flow with several channels needs the external_ref in every link.
- Several channels
- The replica waits until it has ALL its channels: while any is missing, last_result carries reason = waiting_for_channels and pending_platforms with the missing ones; the last resource to arrive turns it on. It is not an error.
- Where it applies
- To every new resource of the template's platforms: through the connection link (WhatsApp, Google…), your own button, the dashboard or POST /api/v1/resource-connectors/. A resource that starts pending and becomes active follows it too. Resources that already existed are not touched.
- Email notice to the customer
- If you sent customer_email when creating the link, when the customer finishes Pulbot emails them: «your assistant is already answering» if their replica went live, or «your WhatsApp is connected, we're finishing activating it» if not (balance, plan or another cause; the customer doesn't see the reason, you do in last_result). Without customer_email nothing is sent. The email is sent by a Pulbot system flow, so the text and channels are changed from the orchestrator. Today the notice is email only.
- Editing the template
- A replica is a separate flow: if you edit the template afterwards, the replicas that already exist do NOT change. New ones are born from the current version.
- Secrets
- A key typed by hand in a node's configuration does not travel to the replica (it is redacted when copying). Connect the key as a resource and assign it in the template.
- If something fails
- The connection is NOT undone: the resource is created and your customer doesn't need to authorize again. The reason is stored in last_result.reason and, if the replica was created, its id in last_result.flow_id. Fix the cause and turn that replica on from the dashboard.
- insufficient_funds
- There is no wallet balance to turn the replica on. Top up and turn it on from the dashboard.
- plan_limit
- Your plan reached its maximum of active flows (each replica counts as one). Turn another flow off or change plan.
- channel_in_use
- There is already a flow in production for that number and trigger. Only one is allowed.
- clone_failed
- The template couldn't be replicated (for example, it doesn't pass flow validation). Open the template and fix it; the resource was created.
- flow_without_channel / flow_without_trigger
- The template has no node for that resource's channel to assign it to, or no trigger to turn on. Review it.
- flow_missing / connector_not_ready
- The rule's template no longer exists, or the resource isn't active yet. In the second case, the rule applies when the resource becomes active.
- assign_failed / activation_failed / rule_failed
- The channel couldn't be assigned or the replica couldn't be turned on for another reason. Open the replica in the dashboard: it shows what is missing.
- Meta templates
- When the number connects, Pulbot asks Meta for the notice templates your flow needs. Meta approves them separately and it can take a while: template notices start once Meta approves them.
Common errors
- 401
- The API key is missing, revoked or expired.
- «This link no longer works»
- The link expired or was already used. Request a new one.
- The replica stayed off
- Check last_result.reason in GET /api/v1/flows/auto-connect/ and the table above. It is almost always balance or the plan limit.
- The customer doesn't get the email
- Check that you sent customer_email when creating the link (an invalid email returns 422) and that the system flow «Pulbot · Customer connection completed notice» is active with Pulbot's mailbox assigned. If it isn't active, the notice is dropped without an error.
- 404 when picking the template
- The flow_id doesn't exist or your user can't edit that flow.
- 422 when picking the template
- The flow has no channels to connect: add a WhatsApp, Gmail, Google Calendar or Jira node.
Next step
Continue with API → Build flows via API to build the template, or with Connect resources with a link for the other providers.