← ClayCONTENT HISTORY
WHAT CHANGED
Update to Clay
Snapshot Nov 18, 2026 · 06:19 UTC · version 2.38.0
Collection source: downloaded plugin package.
First saved snapshot
No earlier snapshot is available to establish a change.
Save Clay and check future changes in Following.
Up to 3 plugins free · no card required.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Enrol Audiences people into a Clay sequence (formerly campaign) from a workflow step, using the \"Enroll in sequence\" action (`enroll-lead-in-sequence`). Use when a workflow should start emailing the people it just processed.",
"included_files": [],
"name": "workflows-sequence-enrollment",
"skill_md_contents": "---\nname: workflows-sequence-enrollment\ndescription: Enrol Audiences people into a Clay sequence (formerly campaign) from a workflow step, using the \"Enroll in sequence\" action (`enroll-lead-in-sequence`). Use when a workflow should start emailing the people it just processed.\n---\n\n# Enrolling people in a sequence from a workflow\n\nBefore using this skill, read the `clay` entry skill if you haven’t already this session, and follow its access guidance.\n\nIf the action is absent from `clay workflows actions list`, this workspace does not have it — say so\nrather than trying to work around it.\n\nHow the **Enroll in sequence** action works as a workflow step. `clay workflows actions list`\nstill names it **Enroll in campaign**; the workflow canvas shows **Enroll in sequence**. For the\nworkflow mechanics this builds on (node creation, input mapping, `$.result.*` output paths), use\nthe `/workflows` skill and its `data-passing.md`.\n\nEverything else about sequences — reading them, writing their copy, analytics, variants — lives\nbehind `clay sequences`, which is hidden in some products. Run `clay sequences --help` before\noffering any of it, and point the user at the Sequencer UI when it is absent.\n\nOne run of this step enrols **one** Audiences person into **one** sequence. It confirms enrollment,\nnot delivery: the email provider owns pacing from there.\n\n**A successful run sends a real email.** Get the user's explicit confirmation before publishing or\ntest-running a workflow that contains this step.\n\n## Attaching the action\n\n- `actionKey: \"enroll-lead-in-sequence\"`\n- `actionPackageId: \"b1ab3d5d-b0db-4b30-9251-3f32d8b103c1\"`\n\nTwo inputs, and they come from completely different places:\n\n| Parameter | Mapping | Where the value comes from |\n| ------------ | ------------- | ----------------------------------------------- |\n| `campaignId` | `static` only | `clay workflows actions dynamic-fields` (below) |\n| `entityId` | `reference` | an upstream Audiences step's record id (below) |\n\nOutputs, all under `$.result`: `enrollmentStatus` (`\"enrolled\"` or `\"already_enrolled\"` — both are\nsuccesses), `campaignId`, `entityId`, `email`, and `entityResolution` (`\"provided\"`, `\"matched\"`,\nor `\"created\"`). Only the first four are declared output parameters, so `entityResolution` is in\nthe run result but never in `clay workflows actions schema` or a token picker.\n\n## `campaignId` must be a static value\n\nThe sequence is a fixed choice, not per-run data. A `reference`, `item`, `llm`, or `map` mapping\nis **rejected** with `inputMappingConfig key \"campaignId\" must be a static value`. Resolve a real\nid first:\n\n```bash\nclay workflows actions dynamic-fields b1ab3d5d-b0db-4b30-9251-3f32d8b103c1 \\\n enroll-lead-in-sequence campaignId --type select\n```\n\nThat returns only sequences that are **active** and take their leads from a workflow, so its\noutput is the only safe source for this value. Do **not** pick an id out of `clay sequences list`:\nmost sequences there draw leads from an audience instead, and pointing this step at one fails\nevery run with `campaign_not_workflow`.\n\nTwo outcomes are blocking, not retryable — report them to the user rather than trying again:\n\n- `Couldn't load campaigns. Try again.` — the lookup itself failed.\n- `No live campaigns take their leads from a workflow. Launch one to enroll.` — the workspace has\n no eligible sequence, and this step cannot be configured at all until it does. If the user asks\n to launch one and `clay sequences --help` lists `launch`, follow the status workflow in the\n `sequences` skill; otherwise they launch it in the Sequencer UI.\n\n## `entityId` is an Audiences record id\n\nThere are three supported ways to get one, and they answer different questions.\n\n**Per-run (the normal case): take it from an upstream Audiences step.** Both\n`upsert-audiences-record` and `update-audiences-record` return the record they touched as\n`entityId`, so put one of them ahead of this step and wire its output through. `/workflows`'s\n`audiences.md` covers configuring the upsert itself.\n\n```json\n{\n \"inputSchema\": {\n \"type\": \"object\",\n \"properties\": {\n \"record_id\": {\n \"type\": \"string\",\n \"sourceNodeId\": \"wfn_upsert\",\n \"sourcePath\": \"$.result.entityId\"\n }\n }\n },\n \"tools\": [\n {\n \"toolType\": \"clay_action\",\n \"actionKey\": \"enroll-lead-in-sequence\",\n \"actionPackageId\": \"b1ab3d5d-b0db-4b30-9251-3f32d8b103c1\",\n \"inputMappingConfig\": {\n \"campaignId\": { \"type\": \"static\", \"value\": \"<id from dynamic-fields>\" },\n \"entityId\": { \"type\": \"reference\", \"expression\": \"{{record_id}}\" }\n }\n }\n ]\n}\n```\n\n`sourcePath` must be `$.result.entityId`. `$.result` on its own passes the whole output object and\nfails with `invalid_input` — an enrich step's outputs sit under `result`, per `/workflows`'s\n`data-passing.md`.\n\n**Looking a record up instead of writing one.** **Look up in Audiences** (`lookup-in-audiences`)\nalso carries the id, at `$.result.records[0].fields.id`. Use it when the person is already in\nAudiences and the workflow has no reason to write to them. Three differences from the upsert route,\nall of which bite:\n\n- It declares **no output schema**, so `clay workflows actions schema` returns an empty\n `outputParameters` and there is no field-level token to pick. Run the action once and read the\n path off `.result` before wiring it — see `/workflows`'s `data-passing.md`.\n- It returns a **list** capped by `limit`, so you must index `records[0]`. A lookup that matches\n nothing returns an empty array, and the enrol step then fails `invalid_input`.\n- It cannot create anyone. If the workflow might be seeing a new person, use the upsert route —\n that is the difference that decides between them.\n\n**A fixed record (testing, or a workflow that always targets the same person):**\n`clay audiences records search-ids --entity-type people …` returns matching ids; map one as a\n`static` value. This is wrong for a workflow meant to enrol whoever it just processed.\n\n## Before it will run\n\n- The sequence must be **active**. A paused or draft sequence rejects every enrollment.\n- The person needs an email address on their record, plus any field the sequence copy marks\n required.\n\nA contact and an account created by the _same_ upstream upsert are not yet linked in a way this\nstep can read, so company tokens in the copy render blank on that first enrollment. Enrich or\nassociate the account in an earlier run if the copy depends on it.\n\n## Failure codes\n\nEvery failure carries one of these codes, and the message alongside it is safe to relay verbatim.\nThis is the whole set — a code outside it means the step failed before enrollment was attempted.\n\n| Code | Means |\n| ------------------------------------ | --------------------------------------------------------------- |\n| `contact_not_found` | no such record, or it belongs to another workspace / is deleted |\n| `ambiguous_identity` | the record could not be resolved to a single person |\n| `canonical_email_mismatch` | the record has no usable email address |\n| `missing_required_fields` | the record is missing data the sequence copy requires |\n| `campaign_not_active` | the sequence is not active |\n| `campaign_not_workflow` | that sequence takes its leads from an audience, not a workflow |\n| `campaign_not_found` | the sequence no longer exists |\n| `lead_in_cooldown` | enrolled in a related sequence too recently |\n| `cooldown_check_unavailable` | the cooldown could not be checked |\n| `insufficient_credits` | the workspace is out of credits for this enrollment |\n| `snippet_generation_failed` | the sequence's AI snippets could not be generated |\n| `provider_rejected` | the email provider refused this person (blocklist, unsubscribe) |\n| `invalid_input` | usually a `sourcePath` that passed an object instead of the id |\n| `feature_disabled` | enrollment from workflows is off for this workspace |\n| `provider_result_indeterminate` | the provider's answer could not be confirmed |\n| `enrollment_persistence_unavailable` | the enrollment result could not be recorded |\n| `unexpected_error` | an unhandled failure |\n\n`provider_result_indeterminate` and `enrollment_persistence_unavailable` mean the person **may\nalready be enrolled**. Re-running the step can send a second email, so report them and let the user\ncheck the sequence rather than retrying.\n\n## Testing a step without enrolling anyone\n\n`clay sequences variants send-test` cannot preview a workflow-fed sequence — it looks for a\npreview lead in an audience, and these sequences have none. Sending a test render of the copy is\nonly possible from the step's own panel in the app today. Say so rather than sending a real\nenrollment to check the copy.\n"
}SHA-256 of public snapshot: 3eabcd9691ab3557764cb84b7400b4bf10950f2fd2e2bf13608eab6383e8b393