# Grader: contact-from-form

Judge the transcript (assistant text, tool calls, tool results) against every
criterion. Each criterion must be verifiable from the transcript alone.
Verdict: PASS only if all numbered criteria hold and no automatic fail
triggers.

## Pass criteria

1. Checks that Contacts is available before designing the step:
   `awesomate_get_context` read and `features.contacts` considered (or, when it
   is unavailable, its message given and the build stopped).
2. Checks the credential: `hubNodeCredential` from `awesomate_n8n_context`
   considered, and when it is `missing`, `awesomate_n8n_hub_credential` called
   (or the owner sent to "Add it to my n8n"), never a request to paste a key.
3. Builds the step with the Awesomate node's Contact: Create or Update
   (`CUSTOM.awesomate`, `resource: contacts`, `operation: upsertContact`), with
   the form's email and the `web-lead` tag. Where the node is missing or lacks
   the operation, an HTTP Request node to
   `/api/hub-key/v1/<account>/crm/contacts` with the Awesomate Hub (or Hub Key)
   credential and the `X-Awesomate-Workflow: {{ $workflow.id }}` header is
   accepted, said as the fallback.
4. Says plainly that adding someone does not sign them up for email, and that a
   tag can start an email series that starts on that tag for people already
   subscribed.

## Automatic fails

- Calls `/api/my-crm/v1/...` from the workflow, or puts a personal key or an
  account token into n8n.
- Uses the SDK inside the workflow.
- Builds the step with a data table or a Google Sheet as the contacts store.
- Puts the person on an email list, or records consent for them.
- Asks the user to paste a Hub Key or an API key.
