feat: add flow import/export - #1
Merged
Merged
Conversation
Export flows as JSON from the flows list or the editor toolbar. Import flows from JSON files using the existing POST /api/v1/flows endpoint.
|
@pablocaeg is attempting to deploy a commit to the Zernio Team on Vercel. A member of the Team first needs to authorize it. |
aleclezio
referenced
this pull request
in aleclezio/zernflow
Jun 11, 2026
… routes Profile scoping (upstreamable set B — brief findings #1-#3): - 00011: workspaces.zernio_profile_id/_name + partial UNIQUE (profile <-> workspace 1:1) + global UNIQUE on active channels(late_account_id) — the same Zernio account can never fire flows in two workspaces - lib/zernio-scope.ts: getBoundProfileId (throws ProfileUnboundError), 412 PROFILE_UNBOUND response helper, accountProfileId normalizer (API returns string OR populated Profile object — both handled) - connect: profiles[0] fallback DELETED; always the bound profile, 412 when unbound - sync: listAccounts filtered by bound profileId + defensive post-filter with anomaly log; deactivation pass moved BEFORE inserts (plays nice with the new active-account uniqueness) - test-key binding (never guess): bound -> key must see that profile else 409 PROFILE_MISMATCH; unbound + 1 profile -> auto-bind; unbound + many -> 422 PROFILE_CHOICE_REQUIRED with the list (key NOT saved), explicit profileId on retry; multi-profile key -> loud isolation warning - settings UI: profile picker on 422, bound-profile + warning display TDD: 10 integration tests red first (constraint violations, 412s, binding matrix, defensive filter incl. populated-Profile variant). Suite: 41 passing. Test infra: retry on Docker clock-skew ('JWT issued at future') in createTestUser; per-test unique fixture ids (global uniqueness constraints). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
|
Really nice feature, @pablocaeg — clean implementation and good instincts. What stood out on review:
Two small notes (non-blocking):
This branch is from a while back and |
khilta
added a commit
to khilta/zernflow
that referenced
this pull request
Aug 14, 2026
…ers, dm_sent verification Bug zernio-dev#1 (Phantom DM Lockout): - comment-processor.ts: Pre-write dm_sent=false (not true) before flow runs - After executeFlow, query messages table to verify DM actually sent - Dedup now blocks only on dm_sent=true (not reply_sent=true) - Failed DMs no longer permanently lock users out Bug zernio-dev#2 (Wrong API for Returning Users): - engine.ts: Comment-triggered flows ALWAYS use sendPrivateReplyToComment (7-day window) instead of falling back to sendInboxMessage (24h window) - This was the root cause of Bhashkar's DM failure on Post zernio-dev#5 - sendFirstMessageAsPrivateReply now re-throws on failure Data fixes: - Reset Bhashkar dm_sent=false on Post zernio-dev#5 (Follow) - Reset Trupti dm_sent=false (Crack)
khilta
added a commit
to khilta/zernflow
that referenced
this pull request
Aug 14, 2026
…rsation_id from overwrite Bug zernio-dev#1 (engine.ts): executePrivateReply swallowed errors — caught the exception but never re-threw, so the flow continued as if the DM succeeded. Now logs message_failed analytics event and re-throws, matching the pattern already used in sendFirstMessageAsPrivateReply. Bug zernio-dev#2 (webhook late/route.ts): upsert unconditionally set late_conversation_id on every incoming message, which could overwrite a valid conversation ID for existing contacts. Now uses two-step insert- then-update: INSERT for new contacts (sets conv.id), UPDATE for existing contacts (leaves late_conversation_id untouched).
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.
hey! Added flow import/export. You can export any flow as a JSON file from the flows list or from inside the editor, and import one back with the Import button. It uses the existing POST /api/v1/flows endpoint so no backend changes needed.