Recipes

Make

Add a contact from a form, and start a scenario when a contact is created. Both use Make’s HTTP module with your API key.

Set up the key

In ContactZapp, create an API key with both scopes. See Getting started. Make sends the key in a header of each HTTP module, so you paste it into the module. Keep the scenario private.

Add a contact from a form

  1. Add a module that starts your scenario, such as a Webhook, a Google Forms or Typeform module, or a Google Sheets row.
  2. Add HTTP, Make a request after it, and set it like this:
    SettingValue
    URLhttps://app.contactz.app/api/v1/contacts
    MethodPOST
    HeadersAuthorization: Bearer cz_live_… (your key)
    Idempotency-Key: a value that is yours for this one submission, such as the row or form id
    Body typeRaw
    Content typeJSON (application/json)
    Request contentThe JSON below, with your form fields mapped in
    Parse responseYes
    Evaluate all states as errorsYes (except for 2xx and 3xx)
    Request content
    {
      "firstName": "{{1.firstName}}",
      "lastName": "{{1.lastName}}",
      "organization": "{{1.company}}",
      "emails": [{ "label": "work", "value": "{{1.email}}" }],
      "phones": [{ "label": "mobile", "value": "{{1.phone}}" }]
    }
    Replace {{1.…}} with the fields of your first module. A field you leave empty becomes an empty value, so map only the fields you have.
  3. The answer has an outcome: created, merged or needs_review. Make shows it as data.outcome after the module runs. A filter on it can send the 3 cases to different steps.

Start a scenario when a contact is created

Make has no ContactZapp trigger yet, so the scenario polls GET /api/v1/triggers/contact.created. Each event has a stable id. A data store remembers the ids you have handled.

  1. Set the scenario to run on a schedule, every 5 minutes or less often.
  2. Add HTTP, Make a request: URL https://app.contactz.app/api/v1/triggers/contact.created, method GET, query string limit = 50, the same Authorization header, and Parse response set to Yes.
  3. Add Flow control, Iterator and set Array to data.items from the HTTP module. The scenario now runs the next modules once for each event.
  4. Add Data store, Check the existence of a record, with the event’s id as the key. Use a data store with a text key. Add a filter after it that lets an event through only when the record does not exist.
  5. Add Data store, Add/replace a record with the same key, so the event is not handled again. Then add your own modules. The contact is in contact, for example contact.displayName and contact.emails.