Repository navigation
feat(skills): move Loops sends to PostHog #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Silthus
wants to merge
409
commits into
main
Choose a base branch
from
feat/migrate-email-loops
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+517
−1
Draft
Changes from all commits
Commits
Show all changes
409 commits
Select commit
Hold shift + click to select a range
aadd19f
fix(migrate-email): import only the suppression lists of the Mailgun …
Silthus ec8b487
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus fd82c65
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus c48ef83
fix(migrate-email): a mirrored suppression removal also clears entrie…
Silthus e03e7fc
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus 027b2ee
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus 1141f1e
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus 9baece4
fix(migrate-email): a template value counts as its declared type, and…
Silthus d19dd05
fix(migrate-email): a PHP PostmarkMessage sends TrackOpens false unle…
Silthus 8f6c098
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus b813f6f
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus 39c82d6
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus 926c9ce
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus 127bc07
fix(migrate-email): a template value from unchecked input keeps the s…
Silthus 8bc3253
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus af08b2b
fix(migrate-email): a Loops rate-limit branch leaves a used-up quota …
Silthus 8667a82
fix(migrate-email): a Python Mailgun client with dry_run sends nothin…
Silthus f8f2565
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus eed16c6
fix(migrate-email): record the PostHog key as set only after a check …
Silthus 2d91936
fix(migrate-email): accept spaces around = in the key check
Silthus f37c460
Merge remote-tracking branch 'origin/feat/migrate-email-resend-cutove…
Silthus ff46281
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus dd2a3f1
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus d641e08
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus 074130e
fix(migrate-email): check the last assignment of the PostHog key
Silthus 9a0f03c
Merge remote-tracking branch 'origin/feat/migrate-email-resend-cutove…
Silthus 5ce31eb
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus cdf2aeb
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus 8d32b5d
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus 5c92245
docs(migrate-email): ask for the transactional_email:write scope
Silthus f5080a7
Merge remote-tracking branch 'origin/feat/migrate-email-resend' into …
Silthus eae6399
Merge #451 at f5080a7 (key scope transactional_email:write) into feat…
Silthus 8d6fb39
Merge feat/migrate-email-sendgrid into feat/migrate-email-postmark
Silthus 026ca5f
Merge feat/migrate-email-mailgun into feat/migrate-email-loops
Silthus 1e8f550
Merge feat/migrate-email-postmark into feat/migrate-email-mailgun
Silthus 254dbb9
fix(migrate-email): name the transactional email scope in the preflight
Silthus 464644f
Merge branch 'feat/migrate-email-resend' into feat/migrate-email-rese…
Silthus 4b0f257
feat(migrate-email): move Resend sends in every PostHog SDK's language
Silthus c4ed38c
fix(migrate-email): keep the app booting and check the whole project …
Silthus a658c75
fix(migrate-email): use the one Rust client the app's features build
Silthus cffc009
feat(migrate-email): carry posthog-sdks.md's rules into the rewrite f…
Silthus 6ab1cc2
Merge the migration lane's per-SDK rules into feat/migrate-email-all-…
Silthus f6b6af8
fix(migrate-email): check the merged SDK rules against the SDK heads
Silthus ef2c2e9
fix(migrate-email): give Elixir email its own instance when the app u…
Silthus fbd1e83
fix(migrate-email): never pass nil for Elixir's host or token
Silthus c53e0ad
Merge #472 at fbd1e83 (a rewrite file per SDK) into feat/migrate-emai…
Silthus 04e34c1
Merge #472 at fbd1e83 (a rewrite file per SDK) into feat/migrate-emai…
Silthus cfae0e9
Merge #472 at fbd1e83 (a rewrite file per SDK) into feat/migrate-emai…
Silthus 74f7f94
Merge #472 at fbd1e83 (a rewrite file per SDK) into feat/migrate-emai…
Silthus 78d56ce
fix(migrate-email): fall back past a nil :posthog host in Elixir
Silthus 74f1efd
docs(migrate-email): point the postmark mapping at the rewrite file
Silthus 775384b
docs(migrate-email): point the loops mapping at the rewrite file
Silthus 7a4a8a6
docs(migrate-email): point the mailgun mapping at the rewrite file
Silthus 317a9cb
Merge #472 at 78d56ce (Elixir falls back past a nil host) into feat/m…
Silthus 182ba7a
Merge #472 at 78d56ce and the layers below into feat/migrate-email-po…
Silthus 8cffa50
Merge #472 at 78d56ce and the layers below into feat/migrate-email-ma…
Silthus cb5c03c
Merge #472 at 78d56ce and the layers below into feat/migrate-email-loops
Silthus bb711c5
fix(migrate-email): list the error names once and state reply-to per SDK
Silthus 0f6d4f0
Merge #472 at bb711c5 (error names listed once, reply-to per SDK) int…
Silthus ab933ea
Merge #472 at bb711c5 into feat/migrate-email-postmark
Silthus 4260cda
Merge #472 at bb711c5 into feat/migrate-email-mailgun
Silthus 48d65b9
Merge #472 at bb711c5 into feat/migrate-email-loops
Silthus 5398fd9
fix(migrate-email): give email its own client behind a reverse proxy
Silthus 78a308c
Merge #472 at 5398fd9 (own email client behind a reverse proxy) into …
Silthus 09dd9ed
Merge #472 at 5398fd9 into feat/migrate-email-postmark
Silthus c81fa46
Merge #472 at 5398fd9 into feat/migrate-email-mailgun
Silthus 4e443a5
Merge #472 at 5398fd9 into feat/migrate-email-loops
Silthus 6924d48
test(migrate-email): pin keeping the secret key off the proxied client
Silthus a8d0023
Merge #472 at 6924d48 (proxy test also checks the app client keeps no…
Silthus fdb4671
Merge #472 at 6924d48 into feat/migrate-email-postmark
Silthus 9f1773e
Merge #472 at 6924d48 into feat/migrate-email-mailgun
Silthus b02e1b0
Merge #472 at 6924d48 into feat/migrate-email-loops
Silthus 4b15d2e
feat(migrate-email): bring stored templates into the code
Silthus 7a4c994
Merge #459 at 4b15d2e (stored templates move into the code) into feat…
Silthus f5c5217
Merge #459 at 7a4c994 (stored templates move into the code) into feat…
Silthus c24df79
Merge #459 at f5c5217 (stored templates move into the code) into feat…
Silthus 735bd63
feat(migrate-email): fill SendGrid substitutions in the code
Silthus 7989fd7
Merge sendgrid at 735bd63a (SendGrid substitutions in the code) into …
Silthus c4fe6dc
Merge postmark at 7989fd7a (SendGrid substitutions in the code) into …
Silthus 10917bf
Merge mailgun at c4fe6dca (SendGrid substitutions in the code) into f…
Silthus 54a6b78
feat(migrate-email): bring Postmark templates into the code
Silthus caab467
feat(migrate-email): bring Mailgun templates into the code
Silthus 06f7a81
feat(migrate-email): bring Loops emails into the code
Silthus 275cd58
Merge postmark at 54a6b784 (templates into the code) into feat/migrat…
Silthus a07c14a
Merge mailgun at 275cd581 (templates into the code) into feat/migrate…
Silthus 2ebcce0
feat(migrate-email): bring Resend templates into the code
Silthus 4ce6c2d
docs(migrate-email): record engagement events only when engagement ca…
Silthus 62d1116
fix(migrate-email): keep SendGrid sites with opens untracked instead …
Silthus 2ad4e9c
fix(migrate-email): keep Postmark sites with opens untracked instead …
Silthus 2e786d2
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus 62d96d1
fix(migrate-email): keep Mailgun sites with opens untracked instead o…
Silthus ad32d65
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus 49cf3a6
docs(migrate-email): record Loops events only when engagement capture…
Silthus 7c84b75
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus 7761f99
fix(migrate-email): list no PostHog click event for SendGrid clicks, …
Silthus 43ae9bd
fix(migrate-email): list no PostHog click event for Postmark clicks
Silthus 54a1c10
Merge branch 'feat/migrate-email-sendgrid' into feat/migrate-email-po…
Silthus 0d64b18
fix(migrate-email): name the conflicting Mailgun open tracking reason…
Silthus 280cd8d
Merge branch 'feat/migrate-email-postmark' into feat/migrate-email-ma…
Silthus 1886e47
fix(migrate-email): ask once before Loops sends move with PostHog's o…
Silthus dd7cd0b
Merge branch 'feat/migrate-email-mailgun' into feat/migrate-email-loops
Silthus 0192a3d
fix(migrate-email): keep an app's PostHog key, and a Resend HTTP call…
Silthus d2e2848
Merge #451 at 0192a3d (keep an app's PostHog key, and an HTTP call's …
Silthus 5c996de
fix(migrate-email): keep email off a disabled client, and pass numeri…
Silthus 20036d6
Merge #451 at 5c996de (no email on a disabled client, numeric IDs as …
Silthus dddd616
fix(migrate-email): keep undeadlined HTTP sites on Resend and keep im…
Silthus 8234d71
fix(migrate-email): record the send's own sender, replace markers in …
Silthus e9953c0
fix(migrate-email): map Go's other Resend error checks and keep Outlo…
Silthus ecd0366
fix(migrate-email): render variables in Go's Outlook blocks and scope…
Silthus 7e5a468
fix(migrate-email): keep encoded URL values as they are in Go templates
Silthus e22fa6c
Merge branch 'main' into feat/migrate-email-resend
Silthus 7afab6e
Merge branch 'feat/migrate-email-resend-cutover' into feat/migrate-em…
Silthus ae88e6e
Merge branch 'feat/migrate-email-resend' into feat/migrate-email-rese…
Silthus 6b41f33
feat(migrate-email): move the shared step changes from the SendGrid l…
Silthus 32acdca
Merge the core skill into feat/migrate-email-loops, keeping only the …
Silthus a366b71
fix(migrate-email): list Resend webhook handlers, keep ignored argume…
Silthus f279e43
fix(migrate-email): keep provider content inert in code literals, and…
Silthus e1b440f
Merge remote-tracking branch 'origin/feat/migrate-email-all-sdks' int…
Silthus 46a4546
fix(migrate-email): hide a Loops section in a PostHog template when i…
Silthus c5ca16f
fix(migrate-email): keep Loops sends failing on a missing variable, a…
Silthus 21b5a8c
fix(migrate-email): route a missing Loops variable to the site's 400 …
Silthus 975cc3b
fix(migrate-email): check required Loops variables before a PostHog t…
Silthus 358d594
fix(migrate-email): keep Loops error handling for calls that stay in …
Silthus 0f38780
fix(migrate-email): let a Loops HTTP send move with its transport hea…
Silthus 487262b
fix(skills): close the migrate-email preparation gaps the QA swarm found
Silthus 00b9aa3
fix(skills): tighten the migrate-email key check and template rules
Silthus bde5bb6
Merge branch 'feat/migrate-email-resend' into feat/migrate-email-rese…
Silthus 708f7f1
fix(migrate-email): keep each site's own HTTP deadline
Silthus 56158d1
fix(migrate-email): keep marketing sends on the provider
Silthus 04e7c84
fix(migrate-email): read the provider's report notes without the impo…
Silthus 7c388d1
Merge branch 'feat/migrate-email-resend' into feat/migrate-email-rese…
Silthus 0186ee2
fix(migrate-email): answer the round 1 review of the rewrite and veri…
Silthus 30f3873
fix(migrate-email): match baseline typecheck errors without their line
Silthus dc18f5d
fix(migrate-email): count each baseline typecheck error
Silthus c33bf45
Merge branch 'feat/migrate-email-resend-cutover' into feat/migrate-em…
Silthus a2994e9
fix(migrate-email): keep a named recipient on Resend
Silthus bde40bc
Merge remote-tracking branch 'origin/feat/migrate-email-resend' into …
Silthus e4221d8
Merge remote-tracking branch 'origin/feat/migrate-email-resend-cutove…
Silthus 82d6ebf
fix(migrate-email): settle deadlines, attribute quoting, and suppress…
Silthus 497d017
fix(migrate-email): keep a site on Resend when it needs a suppressed …
Silthus 69edcdd
fix(migrate-email): keep a Resend SDK send with an abortable signal o…
Silthus 22df812
Merge remote-tracking branch 'origin/feat/migrate-email-resend-cutove…
Silthus e36fd64
fix(migrate-email): own email clients, long deadlines, clicks and tem…
Silthus 08c9d15
test(migrate-email): drop the tests that match the skill's own wording
Silthus bb14da9
fix(migrate-email): blank .NET host, long .NET deadlines, shared temp…
Silthus eeeb620
fix(migrate-email): keep a Go site whose template fills CSS from a value
Silthus 64bb2a2
fix(migrate-email): count brought-in templates as code content, stop …
Silthus 8ead8e1
fix(migrate-email): keep enable_local_evaluation off the Python async…
Silthus 7ac28b4
Merge origin/feat/migrate-email-all-sdks (8ead8e1) into feat/migrate-…
Silthus 78120fc
fix(migrate-email): converge the Loops variant with the core
Silthus d6fd798
fix(migrate-email): keep Loops sites whose connect and read limits di…
Silthus 66be7b9
fix(migrate-email): map Loops bounces and rate-limit reads exactly
Silthus 0158aef
fix(migrate-email): keep sites that branch on one kind of network fai…
Silthus c86868e
fix(migrate-email): map Loops bounces by PostHog's $bounce_type
Silthus f6978e7
fix(migrate-email): keep separate connect limits, require ext-curl fo…
Silthus ad23a92
fix(migrate-email): keep a Go request's transport limits
Silthus 7ccc0ee
fix(migrate-email): keep a Python whole-request limit on the provider
Silthus 25b9a81
Merge remote-tracking branch 'origin/feat/migrate-email-all-sdks' int…
Silthus 2300bbf
fix(migrate-email): defer Loops connect limits and network kinds to S…
Silthus eef1481
fix(migrate-email): settle untracked clicks, timeout kinds, and the m…
Silthus efb8451
fix(migrate-email): read Faraday's timeout by its adapter
Silthus f658354
fix(migrate-email): keep a site whose handler needs an event PostHog …
Silthus 8331162
Merge remote-tracking branch 'origin/feat/migrate-email-all-sdks' int…
Silthus 0c19afd
fix(migrate-email): align Loops clicks and timeouts with the core
Silthus a66e15b
fix(migrate-email): upgrade mocked send tests to the HTTP boundary
Silthus 18ab351
fix(migrate-email): fake fetch instead of keeping a send mock
Silthus ced460c
Merge commit '18ab3510a0b5cb457fab6a6b3d6079d8078bbc2d' into HEAD
Silthus e14c1fc
fix(migrate-email): keep a Ruby site with a partial Net::HTTP timeout
Silthus a943460
fix(migrate-email): note a must-be-sensitive template in its plan row
Silthus 45c5716
fix(migrate-email): keep network failures off Resend's 503 branch
Silthus d51979c
fix(migrate-email): allow a loopback app host in Go and .NET tests
Silthus 17c6ca1
feat(migrate-email): ask before adding an open pixel to untracked email
Silthus 1e7127f
Merge remote-tracking branch 'origin/feat/migrate-email-all-sdks' int…
Silthus 4a210b6
fix(migrate-email): hand the Loops open-pixel ask to Step 3
Silthus cff58f5
fix(migrate-email): route a network failure the way Resend's code did
Silthus 96e10a2
Merge commit 'cff58f516b33b2fe5eb3c0a5d2704f874f7c3d85' into HEAD
Silthus 6f7abcb
fix(migrate-email): test with a standard-library server, never a mock…
Silthus 8776c81
fix(migrate-email): ask about a test dependency only where one is needed
Silthus 63c3dfe
fix(migrate-email): ask before adding any test tool, in every language
Silthus 21e1d27
feat(migrate-email): re-import the suppression list weekly while site…
Silthus a65bb90
fix(migrate-email): check the project before a suppression re-import
Silthus b28e13b
fix(migrate-email): write the re-import's project check out in Step 5
Silthus b2dfe53
fix(migrate-email): confirm the production project before a re-import
Silthus 731b092
fix(migrate-email): read the project token with project-get
Silthus 8929f93
fix(migrate-email): switch the MCP back after a re-import
Silthus e5735c8
fix(migrate-email): name the production project in a by-hand re-import
Silthus 8b9757e
fix(migrate-email): let a re-import without the tool say so
Silthus 349a407
fix(migrate-email): let a re-import say why it got no list
Silthus 2df1f26
fix(migrate-email): read the project token with project-get
Silthus 090ac92
Merge #451 (feat/migrate-email-resend-cutover) into feat/migrate-emai…
Silthus cbb46f1
Merge remote-tracking branch 'origin/feat/migrate-email-all-sdks' int…
Silthus d8dd2d4
fix(migrate-email): ask for re-imports only when the provider keeps a…
Silthus 94d44d3
fix(migrate-email): record a provider with no list before the tool check
Silthus 2cb7e2b
migrate-email loops: say audience-check re-imports miss non-contacts
Silthus 2b8d0d6
fix(migrate-email): end a re-import early when the provider keeps no …
Silthus 8764507
migrate-email loops: check required variables only where they show, a…
Silthus 5e0607f
fix(migrate-email): keep sites a Resend webhook handler acts on, and …
Silthus eeed7cb
fix(migrate-email): check every error in a rewritten line against its…
Silthus 5f5debd
fix(migrate-email): check for a provider without a suppression list b…
Silthus cb26a5f
Merge #451 (feat/migrate-email-resend-cutover) into feat/migrate-emai…
Silthus 77b680b
fix(migrate-email): give Step 8 one rule for which typecheck errors a…
Silthus e7a7f3f
Merge #451 (feat/migrate-email-resend-cutover) into feat/migrate-emai…
Silthus 1d85155
fix(migrate-email): tie the kept Resend error names to posthog-node, …
Silthus 013a98e
Merge #450 (feat/migrate-email-resend) into feat/migrate-email-resend…
Silthus 19b1b90
fix(migrate-email): mark secret emails sensitive, check template keys…
Silthus fdea2d3
fix(migrate-email): send sensitive only with rendered content, and on…
Silthus 2fe8430
fix(migrate-email): check the app's Node version and count removed er…
Silthus 6c45e23
Merge remote-tracking branch 'origin/feat/migrate-email-resend-cutove…
Silthus 4087e6c
fix(migrate-email): carry the key, sensitive and Node checks; count r…
Silthus 808f61d
fix(migrate-email): name each SDK's sensitive flag; list the moved keys
Silthus fd58f93
fix(migrate-email): move the template keys to after cutover; edge reason
Silthus f1ba031
fix(migrate-email): scope the runtime check to where each site runs
Silthus a0b01bc
fix(migrate-email): check every server that shares the SDK's manifest
Silthus 8f51a57
fix(migrate-email): keep every site on a manifest an unsupported serv…
Silthus 6b0083e
fix(migrate-email): count workspace and root lockfile installs in the…
Silthus ef71e1f
fix(migrate-email): keep a site whose HTTP client retries a request w…
Silthus 6fdfdf7
fix(migrate-email): count only a retry setup that covers the POST
Silthus 6d4801f
fix(migrate-email): name the retry setups as examples, not a full list
Silthus caff403
fix(migrate-email): read the retry setup's options before counting it
Silthus 7aad014
fix(migrate-email): count a requests adapter whose max_retries is a n…
Silthus a090b5b
chore: merge main after #450 landed
Silthus 66dc2b2
Merge branch 'feat/migrate-email-resend-cutover' into feat/migrate-em…
Silthus 6d3d8b0
fix(migrate-email): keep a site that reads Resend's response headers
Silthus 610e703
fix(migrate-email): name each SDK's retry delay in its rewrite file
Silthus d186900
fix(migrate-email): keep a send that turns Resend's plain-text part off
Silthus 088f35b
fix(migrate-email): cover react and run-time empty text, word the tem…
Silthus 3b204b7
fix(migrate-email): check the text-part rule in Step 3, count Go's em…
Silthus f3bb668
fix(migrate-email): ask whether a copied Resend template turns its pl…
Silthus 355df95
fix(migrate-email): offer the full-access key for the plain-text ques…
Silthus 74040e5
fix(migrate-email): note every template's plain text, offer the key o…
Silthus b99cea5
fix(migrate-email): sync suppression calls on the reasons PostHog stores
Silthus 9eb4180
fix(migrate-email): report suppression-list calls instead of syncing …
Silthus 1bcc53c
fix(migrate-email): say only hard bounces block a moved send
Silthus daf563e
fix(migrate-email): give the add item a check the app can make
Silthus d00e808
fix(migrate-email): ask in Step 3 which sites rely on a suppression add
Silthus 2fe5090
fix(migrate-email): ask about hand-added suppressions too
Silthus b006c9b
fix(migrate-email): keep the sites when nobody can say who relies on …
Silthus cd9e38a
fix(migrate-email): ask about the suppression list before the templat…
Silthus 4db6763
fix(migrate-email): list the suppression note in the plan file rules
Silthus 0a6ae00
fix(migrate-email): keep Rust sites on runtimes other than Tokio
Silthus f98eb3b
fix(migrate-email): require Tokio's timers for the Rust async client
Silthus 418cc5a
chore: merge main after #451 landed
Silthus cc0a819
Merge remote-tracking branch 'origin/feat/migrate-email-all-sdks' int…
Silthus 4b4dd5a
chore: merge main after #472 landed
Silthus d918937
fix(migrate-email): adapt Loops suppressions to the shared steps on main
Silthus c829289
fix(migrate-email): report that Loops API-checked suppressions block …
Silthus 1f5bd4d
fix(migrate-email): keep a Loops template whose not_contains value ca…
Silthus 598d376
fix(migrate-email): keep Loops retry loops' server wait through PostH…
Silthus ba82a36
fix(migrate-email): keep PostHog's retry delay on the thrown Node error
Silthus ff8ea2b
fix(migrate-email): note that Loops' Go client retried a 5xx and Post…
Silthus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,3 +16,6 @@ variants: | |
| - id: resend | ||
| display_name: Resend | ||
| tags: [resend] | ||
| - id: loops | ||
| display_name: Loops | ||
| tags: [loops] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Loops account | ||
|
|
||
| What the migration needs from the person's Loops account. The agent never changes the account: it reads what the person exports or allows. | ||
|
|
||
| Every request in this file goes to `app.loops.so`, Loops' one host, even when the app's client points at another URL with `WithBaseURL` or `apiRoot`, as `sdk-reference.md` says. | ||
|
|
||
| ## DNS records | ||
|
|
||
| A sending domain set up at Loops carries these records. Keep all of them until the cutover is done. The Loops dashboard shows the exact names and values under Settings, then Domain, then View records. It can also download them as a zone file, or share them on a public records page. | ||
|
|
||
| | Record | Name | What it does | | ||
| |---|---|---| | ||
| | `TXT` (SPF) | `envelope.<sending domain>` | Loops' SPF, on its own label | | ||
| | `MX` | `envelope.<sending domain>` | Takes Loops' bounces for its return path | | ||
| | DKIM | the `_domainkey` names Loops shows | Signs Loops' mail | | ||
| | `TXT` (DMARC) | `_dmarc` | Loops shows a default one. Shared by every provider on the domain | | ||
|
|
||
| - Loops sends from the From name the person sets in each email, on the team's sending domain, such as `hello@mail.example.com`. A Loops team has one sending domain. An app that sends from several domains uses one Loops team, with its own API key, per domain: each domain has its own records. | ||
| - PostHog's sender uses its own label for its MAIL FROM, `feedback` by default. Never give PostHog the label `envelope`, which Loops uses. | ||
| - Loops' SPF record sits at `envelope.<sending domain>`, not at the sending domain. Leave it alone. When PostHog's SPF record goes to a name that already has a `v=spf1` record, merge PostHog's include into it. | ||
| - PostHog's DKIM records have their own names, so they sit next to Loops' DKIM records. | ||
| - Keep the one `_dmarc` record of the domain or its parent. Never add a second one, even when Loops' records page shows one. | ||
|
|
||
| ## Migration key | ||
|
|
||
| Loops API keys have no permissions to choose: every key can send and change the account. So the run never reads the app's own key. When the person chooses the API over the dashboard for template content, or when the suppression import below checks addresses, whichever comes first, ask them to create a separate key for the migration in Loops (Settings, then API, then Generate key), store it in `LOOPS_MIGRATION_API_KEY` in the git-ignored env file, and write it into the plan as Step 3's plan layout says. Use it only for the reads below. Its last use is the suppression check in Step 5. At the end of Step 5, on every way out of it, ask the person to revoke the key in Loops (the trash icon next to it on the API settings page) and remove its variable from the env file, and note in the plan whether they did. The report reminds them when they didn't. Never print the key, and never write it into another file. | ||
|
|
||
| An app with several Loops teams, one per sending domain, needs one migration key per team: each team's emails and contacts are visible only to its own keys. Match each site to its team by the API key variable its client reads. Ask for one key per team, each in its own variable, such as `LOOPS_MIGRATION_API_KEY_MAIL_EXAMPLE_COM`, read each team's emails and audience with its own key, and ask the person to revoke every one at the end of Step 5. | ||
|
|
||
| The steps call this key the full-access provider key. | ||
|
|
||
| ## Template content | ||
|
|
||
| Every Loops site sends a Loops email, so each site that moves needs the content of the email's published version: Step 3 checks it, and Step 7 brings it into the code, or the person makes a template in PostHog from it when they ask for one. The API returns the content, but not as HTML: it answers the body in LMX, Loops' markup, which `mapping.md` turns into HTML under "Templates". The dashboard has no export of an email's HTML, so its copy is a preview send. | ||
|
|
||
| **Read from the API.** With `Authorization: Bearer $LOOPS_MIGRATION_API_KEY`: | ||
|
|
||
| 1. `GET https://app.loops.so/api/v1/transactional-emails/{transactionalId}` answers `publishedEmailMessageId` and `dataVariables`, the names the published version uses. | ||
| 2. `GET https://app.loops.so/api/v1/email-messages/{publishedEmailMessageId}` answers `subject`, `previewText`, `fromName`, `fromEmail` (the part before the sending domain), `replyToEmail`, `ccEmail` and `bccEmail` (only when set), `languageCode` (only when set), `emailFormat` (`styled` or `plain`), `dataVariablesFallbacks` (only when set), and `lmx`, the body in LMX. | ||
| 3. For a `<Style themeId="…" />` in the LMX, `GET https://app.loops.so/api/v1/themes/{themeId}` answers its `styles`, with the names of the `<Style />` attributes. | ||
| 4. For each `<Component componentId="…" />`, `GET https://app.loops.so/api/v1/components/{componentId}` answers its `lmx`. | ||
|
|
||
| - The API doesn't say which data variable is optional: `dataVariables` lists only names, LMX has no mark for it, and `dataVariablesFallbacks` shows only the variables that have a fallback. An optional variable without a fallback looks the same as a required one, and `mapping.md` treats the two apart. So for each variable in `dataVariables` without a fallback, ask the person whether it is set to **Optional** in the editor, in the selector just below the variable's name. When they can't tell, the site stays, and the reason is `Loops optional data variables not known`. | ||
| - A `401` means the key is wrong, or the content API is not on for the team. Ask for the preview send instead. | ||
| - A `409` means the email was made from MJML, or Loops can't give its content as LMX. Ask for the preview send instead. | ||
| - These routes allow 60 requests per 60 seconds for each team. Wait and retry on `429`. | ||
|
|
||
| **Copy a preview send.** Ask the person to open the transactional email in Loops, switch to its published version with the toggle in the top right when it has a draft, and give you: | ||
|
|
||
| - the Name, From, Reply, Subject, Preview, CC, and BCC fields (click `>` to show all of them), with any data variable in them; | ||
| - each optional data variable and its fallback value, each conditional section with its condition, and each array block with its variable name and the variables inside it, with their **Array item** option; | ||
| - the example payload from the email's Publish page (**Show payload**), which lists its data variables; | ||
| - a preview of it: **Send a preview**, with **Add preview tag** off, each data variable filled with its own name in double brackets, such as `[[firstName]]`, and each array with two items when the form takes them. That marker also shows a section with no operator. A section that needs another value to show, such as `pro` for `equal` or `contains`, a value without the `ifValue` for `not_contains` when the marker holds it, or an empty value for `empty`, needs a second preview with that value, and so does a section that shows only when another one hides. Ask them to save the raw message they get, such as Gmail's **Show original**, then **Download original**, as a `.eml` file outside the repository. | ||
|
|
||
| A preview send is also how you read a theme or a social icon that the API doesn't give: ask for one when `mapping.md` says so. | ||
|
|
||
| **An email made from MJML.** The API answers `409`, and the editor shows the **Code** option. Ask for the preview send: its HTML is the MJML that Loops compiled. When the person has the MJML file they uploaded, and it has no `<loops-array>` and no `img` folder, you can instead compile it once with the MJML CLI, in a folder in the system's temporary folder, only when the person allows it. Never add MJML to the app. Without either, the site stays, and the reason is `MJML email not compiled`. | ||
|
|
||
| Read the person's copies where they saved them. An API answer goes only into the temporary file Step 3 writes, which is deleted as `template-to-code.md` says. Never write the content into the plan or the report. | ||
|
|
||
| ## Open and click tracking | ||
|
|
||
| Loops tracks no opens or clicks on a transactional email, at any setting or plan, so there is nothing to check in the account and no case where nobody can tell: | ||
|
|
||
| - Every Loops site's emails had no open pixel, as Step 3 says under "Opens the provider didn't track". | ||
| - A Loops site that moves to a template made in PostHog is one whose clicks the provider didn't track, as Step 3 says under "A template in PostHog". | ||
|
|
||
| ## Suppression list | ||
|
|
||
| Loops suppresses an address after a hard bounce or a spam complaint, and skips it on every later send. Its API has no call that adds an address to the list, and its docs show no way to add one in the dashboard: when Step 3 asks which sites rely on the list for addresses someone added, tell the person so, and ask whether they added any another way, such as through Loops support. **Loops has no export of its suppression list, and no API route that lists it.** It only answers for one contact at a time. Say this plainly to the person, and offer these ways instead: | ||
|
|
||
| **The app's own record (preferred).** When the app keeps the addresses its Loops webhook reported, such as from `email.hardBounced` and `email.spamReported` events, ask the person to export those addresses from the app's database to a CSV outside the repository, with a column that says which event each came from, and tell you where they saved it. Ask whether the app kept those events since its first Loops send. When it didn't, the record misses the older suppressions: import it, and write the phase as `- [ ] suppressions — <imported>/<entries> imported: the app's record starts after its first Loops send`. The record keeps an address after someone removed its suppression in Loops. Before the import, check each address in it with the suppression route below, at the same rate and with the key of the team that sent to it: drop an address whose `isSuppressed` is `false`, and keep one that answers `404`, which is not a contact. | ||
|
|
||
| **Check each contact through the API.** Ask the person to download their audience from Loops (Audience, then the `•••` menu, then **Download**) to a file outside the repository, and tell you where it is. For each address in its email column, call `GET https://app.loops.so/api/v1/contacts/suppression?email=<the address, URL-encoded>` with `Authorization: Bearer $LOOPS_MIGRATION_API_KEY`. Take each answer whose `isSuppressed` is `true`. A `404` means the address is not a contact: skip it. Loops allows 10 requests per second for each team, and the app's own sends share that team's limit, so send at most 5 requests per second, and wait and retry on `429`. Tell the person how long that takes for their count, that it shares the app's sending limit, and that a quiet hour is the best time, and ask whether to go on. | ||
|
|
||
| An app with several Loops teams runs this check once per team: ask for each team's audience export, and check its addresses with that team's own migration key, such as `$LOOPS_MIGRATION_API_KEY_MAIL_EXAMPLE_COM`. Each team has its own limit, so each team's check gets its own 5 requests per second, and only that team's sends share it. Tell the person the time for each team. PostHog keeps one suppression list per project, so the import puts every team's suppressed addresses into that one list, and PostHog then refuses a moved send of any team to an address that another team suppressed. Tell the person so in Step 3, and ask once whether the moved sites of all teams may share one list. When they say no, ask which one team's sites move: the sites of every other team stay, and the reason is `Loops team <name> keeps its own suppression list`, and only that team's addresses are checked and imported. An address that more than one team suppressed is imported once. This finds only addresses that are contacts in the audience: a transactional send alone does not add its recipient to the audience. So this check never covers the whole list: write the phase as `- [ ] suppressions — <imported>/<entries> imported: audience contacts only`, so the report lists the import as partial. | ||
|
|
||
| Both ways check addresses with the migration key. When the person has neither, or won't create the key, the import is not done: write why in the plan. | ||
|
|
||
| **Map each entry.** | ||
|
|
||
| | Loops source | PostHog `reason` | | ||
| |---|---| | ||
| | `email.hardBounced` in the app's record | `bounce` | | ||
| | `email.spamReported` in the app's record | `complaint` | | ||
| | `isSuppressed: true` from the API | `bounce` | | ||
|
|
||
| The API doesn't say whether a hard bounce or a spam complaint suppressed an address. Import it as `bounce`: PostHog then blocks the moved sends to it, as Loops skipped every send to it, and a hard-bounced address is not mailed again. An address that only complained is blocked too, where the app's record would let it get the moved sends. | ||
|
|
||
| **Leave out the rest.** | ||
|
|
||
| - **Soft bounces** (`email.softBounced`) are temporary failures, which Loops retries. They are not suppressions. | ||
| - **Unsubscribed contacts and mailing list unsubscribes** are marketing preferences. Loops sends transactional email to unsubscribed contacts, and so does PostHog, so nothing changes for them. A hard bounce also unsubscribes the contact at Loops, so `subscribed` false in the audience export does not tell a bounce from a choice: never import it. | ||
|
|
||
| ## For the report | ||
|
|
||
| When any address came from the API check, write under the phase: `- addresses from the Loops API check are imported as bounces, since Loops doesn't say why it suppressed them: moved sends skip them, ones that only complained included`. The report then says so next to its note that a complained address gets the moved sends, which holds only for the app's record. | ||
|
|
||
| The weekly re-import that the report asks for, while a site stays on Loops, gets its list the same way as the first import. The audience check never sees a recipient who is not an audience contact, so its re-imports never bring in that recipient's bounce or complaint, and a moved send can keep mailing them, past the week the report names. When a site stays and the import was `audience contacts only`, write under the phase: `- re-imports from the audience check miss recipients who are not contacts`. The report then says so beside the weekly re-import, and that the app's record covers them: the app keeps every `email.hardBounced` and `email.spamReported` event its Loops webhook reports from now on, and each re-import reads that record. | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.