Commit eab4f75
committed
feat(smartlead): expand to the core workflow surface and fix review findings
Grows the block from 22 to 47 tools and fixes every defect found in review.
New tools (all executed against the live API end to end):
campaign email accounts (list/add/remove), duplicate, delete, CSV lead export,
webhook delete + delivery summary, lead + mailbox statistics, top-level
analytics by date, lead activities, get lead by id, unsubscribe from campaign,
unsubscribe globally, mark complete, delete from campaign, master-inbox
replies, lead lists (list/get/create/update/delete), email accounts, clients.
The endpoint inventory was rebuilt by extracting method+path from all 212
reference pages, which corrected several earlier conclusions: get-lead-by-id is
`/leads/{id}` (not under `/campaigns/`), lead lists are `/lead-list/`
(singular), and lead activities are `/campaigns/all-leads-activities` with no
campaign segment. More documented paths that 404 in reality: lead tags at
`/crm/leads/tags`, and webhook delete at `/campaigns/{id}/webhooks/{id}` —
deletion actually takes the id in the body.
Shapes the docs got wrong again, caught live: `GET /leads/{id}` wraps the lead
in a single-element `data` array; `DELETE .../leads/{id}` answers with the bare
string `success`, not JSON; duplicate returns `newCampaignId`; create/update
lead list take `listName`, and mark-complete takes `campaign_lead_map_id` where
its siblings take `lead.id`.
Review fixes:
- get_campaign, get_campaign_analytics and get_lead_by_email reported an
all-null success for a missing resource, because Smartlead answers HTTP 200
with `{}` (or an empty body) instead of 404. They now fail closed.
- update_campaign_settings silently reset stop_lead_settings and
send_as_plain_text: their dropdown defaults are materialized at block
creation, so every settings update carried them. Both now default to
"Leave unchanged".
- Malformed JSON in Leads/Sequences/Custom Fields resolved to `undefined`,
which overwrote the raw string the executor falls back on and dropped the
field silently. Parsing now raises, and is scoped to the operation that
consumes the field so a stale hidden value cannot fail an unrelated one.
- The four documented import overrides (block/unsubscribe/duplicate/bounce
lists) had no field, so the block's own skill instructions were unexecutable.
- leadId did not distinguish lead.id from campaign_lead_map_id; passing the
latter 404s, and list_campaign_leads surfaces it first.
- Path ids are trimmed and escaped; dead code and a hand-rolled id mapper removed.
Unverified and called out rather than guessed: add/remove email accounts to a
campaign (no mailbox could be connected, so only their error shape was seen),
and the row shapes for statistics, message history, inbox replies, email
accounts and clients — every one of those collections was empty on the
verification account, so their rows pass through unmapped.1 parent 177543a commit eab4f75
55 files changed
Lines changed: 3828 additions & 122 deletions
File tree
- apps
- docs/content/docs/en/integrations
- sim
- blocks/blocks
- lib/integrations
- tools
- generated
- smartlead
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17816 | 17816 | | |
17817 | 17817 | | |
17818 | 17818 | | |
| 17819 | + | |
| 17820 | + | |
| 17821 | + | |
| 17822 | + | |
| 17823 | + | |
| 17824 | + | |
| 17825 | + | |
| 17826 | + | |
| 17827 | + | |
| 17828 | + | |
| 17829 | + | |
| 17830 | + | |
| 17831 | + | |
| 17832 | + | |
| 17833 | + | |
| 17834 | + | |
| 17835 | + | |
| 17836 | + | |
| 17837 | + | |
| 17838 | + | |
| 17839 | + | |
| 17840 | + | |
| 17841 | + | |
| 17842 | + | |
| 17843 | + | |
| 17844 | + | |
| 17845 | + | |
| 17846 | + | |
| 17847 | + | |
| 17848 | + | |
| 17849 | + | |
| 17850 | + | |
| 17851 | + | |
| 17852 | + | |
| 17853 | + | |
| 17854 | + | |
| 17855 | + | |
| 17856 | + | |
| 17857 | + | |
| 17858 | + | |
| 17859 | + | |
| 17860 | + | |
| 17861 | + | |
| 17862 | + | |
| 17863 | + | |
| 17864 | + | |
| 17865 | + | |
| 17866 | + | |
| 17867 | + | |
| 17868 | + | |
| 17869 | + | |
| 17870 | + | |
| 17871 | + | |
| 17872 | + | |
| 17873 | + | |
| 17874 | + | |
| 17875 | + | |
| 17876 | + | |
| 17877 | + | |
| 17878 | + | |
| 17879 | + | |
| 17880 | + | |
| 17881 | + | |
| 17882 | + | |
| 17883 | + | |
| 17884 | + | |
| 17885 | + | |
| 17886 | + | |
| 17887 | + | |
| 17888 | + | |
| 17889 | + | |
| 17890 | + | |
| 17891 | + | |
| 17892 | + | |
| 17893 | + | |
| 17894 | + | |
| 17895 | + | |
| 17896 | + | |
| 17897 | + | |
| 17898 | + | |
| 17899 | + | |
| 17900 | + | |
| 17901 | + | |
| 17902 | + | |
| 17903 | + | |
| 17904 | + | |
| 17905 | + | |
| 17906 | + | |
| 17907 | + | |
| 17908 | + | |
| 17909 | + | |
| 17910 | + | |
| 17911 | + | |
| 17912 | + | |
| 17913 | + | |
| 17914 | + | |
| 17915 | + | |
| 17916 | + | |
| 17917 | + | |
| 17918 | + | |
17819 | 17919 | | |
17820 | 17920 | | |
17821 | | - | |
| 17921 | + | |
17822 | 17922 | | |
17823 | 17923 | | |
17824 | 17924 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3692 | 3692 | | |
3693 | 3693 | | |
3694 | 3694 | | |
| 3695 | + | |
3695 | 3696 | | |
3696 | 3697 | | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
3697 | 3705 | | |
3698 | 3706 | | |
| 3707 | + | |
| 3708 | + | |
3699 | 3709 | | |
3700 | 3710 | | |
3701 | 3711 | | |
| 3712 | + | |
| 3713 | + | |
3702 | 3714 | | |
| 3715 | + | |
| 3716 | + | |
3703 | 3717 | | |
| 3718 | + | |
3704 | 3719 | | |
3705 | 3720 | | |
3706 | 3721 | | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
3707 | 3726 | | |
| 3727 | + | |
| 3728 | + | |
3708 | 3729 | | |
| 3730 | + | |
3709 | 3731 | | |
3710 | 3732 | | |
| 3733 | + | |
| 3734 | + | |
3711 | 3735 | | |
3712 | 3736 | | |
3713 | 3737 | | |
3714 | 3738 | | |
| 3739 | + | |
3715 | 3740 | | |
3716 | 3741 | | |
3717 | 3742 | | |
| |||
5788 | 5813 | | |
5789 | 5814 | | |
5790 | 5815 | | |
| 5816 | + | |
| 5817 | + | |
| 5818 | + | |
| 5819 | + | |
| 5820 | + | |
| 5821 | + | |
| 5822 | + | |
| 5823 | + | |
| 5824 | + | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
| 5832 | + | |
| 5833 | + | |
| 5834 | + | |
| 5835 | + | |
| 5836 | + | |
| 5837 | + | |
| 5838 | + | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
5791 | 5842 | | |
5792 | 5843 | | |
5793 | 5844 | | |
| |||
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 57 | + | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
0 commit comments