fix(typebot-connector): make file-upload steps complete, and promote to stable - #53
Merged
Merged
Conversation
…age.text
Typebot rejects {type:'text', text:'', attachedFileUrls:[url]} for a file
input block with "Invalid message. Please, try again." and re-asks forever
— verified against a live Typebot v3.17.2 instance. A file input block's
answer IS the file, so it wants the URL in message.text. attachedFileUrls
is only correct for a text input with attachments enabled, where the typed
text is the answer and the file rides along separately.
reply-map.ts collapses both constructs into the same 'file' ReplyIntent,
so turn.ts now branches on state.awaiting.kind at the point the continueChat
message is built, choosing the right shape for each construct.
Patch release for da9f94e: file-upload steps no longer get stuck re-asking for the same file after a successful upload.
Smoke-tested end-to-end on 2026-07-31 against a self-hosted Typebot v3.17.2 install over live WhatsApp through OpenWA 0.12.1: an uploaded file-upload answer now advances the flow as fixed in 0.2.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a defect that made
typebot-connector's file-upload support unusable, then promotes the plugin tostableon the strength of a live verification.The defect
When a Typebot flow reached a file-upload block, the plugin uploaded the contact's photo or document successfully — the bytes reached storage every time — and then the flow never moved on. Typebot answered
Invalid message. Please, try again.and asked for the same file again, indefinitely. A contact could never complete a flow containing a file step.The cause is that two different Typebot constructs were being answered the same way:
The plugin sent the second form for both, so a file-upload block never accepted what it was given.
turn.tsnow selects the form from the block being answered.Why the tests did not catch it
upload-e2e.test.tsasserted the attachments form for a file-upload flow and passed, because its fake fetch accepts whatever it is handed — it pinned an assumption about Typebot rather than Typebot's actual behaviour. Both of its assertions are corrected here, and a third case is added covering a text input with attachments enabled, so the two constructs cannot be swapped again without a test failing. Inverting the branch turns all three red.Live verification
Run on 2026-07-31 against OpenWA 0.12.1 and a self-hosted Typebot v3.17.2 with MinIO storage, using two connected WhatsApp sessions so a real inbound photo could be driven end to end.
@lidsender and WhatsApp's own JPEG transcode — reached the plugin with usable media data, was uploaded, and the flow advanced from the file-upload block to the next block.Cache-Controlheader the plugin sets, confirming the upload was performed by the plugin rather than by anything else in the path.Scope of that run, stated precisely: Typebot v3.17.2 returns no form data from its upload-URL endpoint, so the same-origin signed-
PUTbranch was exercised. The S3 presigned-POSTbranch, which only older self-hosted installs use, was not reached, and Typebot Cloud was not covered.Status
typebot-connectormoves frombetatostableat 0.2.1.testedOpenWAVersionremains 0.12.1, which is the host the verification ran against. No other plugin changes.