How to Build Automated Client Onboarding Workflows in Antigravity with Intake Forms, Document Generation & CRM Sync

How to Build Automated Client Onboarding Workflows in Antigravity

Manual client onboarding is time-consuming and error-prone. With Antigravity, you can build fully automated onboarding workflows that trigger from an intake form submission, generate personalized documents, and sync everything to your CRM — all without writing a custom backend. This guide walks you through every step.

Prerequisites

  • An Antigravity workspace (Free tier or above)- Node.js 18+ installed- A CRM account (Salesforce, HubSpot, or Pipedrive) with API access- Basic familiarity with YAML configuration

Step 1: Install and Configure the Antigravity CLI

Start by installing the Antigravity CLI globally and authenticating with your workspace. npm install -g @antigravity/cli

antigravity auth login —api-key YOUR_API_KEY

antigravity workspace select —name “my-agency”

Verify your connection is active: antigravity status

You should see your workspace name, active plan, and connected integrations listed in the output.

Step 2: Initialize the Onboarding Workflow Project

Create a dedicated workflow project directory and scaffold the configuration files: antigravity workflow init client-onboarding cd client-onboarding

This generates the following structure: client-onboarding/ ├── workflow.yaml ├── triggers/ │ └── intake-form.yaml ├── steps/ │ ├── generate-docs.yaml │ └── crm-sync.yaml └── templates/ └── welcome-letter.hbs

Step 3: Create the Intake Form Trigger

Open triggers/intake-form.yaml and define the fields your intake form collects: trigger: type: form name: client_intake fields: - name: client_name type: text required: true - name: client_email type: email required: true - name: company_name type: text required: true - name: service_tier type: select options: ["starter", "professional", "enterprise"] required: true - name: project_start_date type: date required: true webhook_url: https://hooks.antigravity.io/v1/workflows/{{workflow_id}}/trigger on_submit: start_workflow

Deploy the trigger to generate an embeddable form URL: antigravity trigger deploy triggers/intake-form.yaml

The CLI returns a public form URL and an embed snippet you can place on your website or share directly with clients.

Step 4: Add the Document Generation Step

Edit steps/generate-docs.yaml to define which documents are automatically created when a form is submitted: step: name: generate_onboarding_docs type: document_generation depends_on: client_intake documents: - template: templates/welcome-letter.hbs output_name: “Welcome_Letter_{{client_name}}.pdf” format: pdf - template: templates/service-agreement.hbs output_name: “Service_Agreement_{{company_name}}.pdf” format: pdf e_signature: true delivery: method: email to: “{{client_email}}” subject: “Welcome aboard, {{client_name}}!” body_template: templates/welcome-email.hbs

Create the Handlebars template at templates/welcome-letter.hbs:

Welcome, {{client_name}}

Thank you for choosing our {{service_tier}} plan.

Your project is scheduled to begin on {{project_start_date}}.

Company: {{company_name}}

Step 5: Configure the CRM Sync Step

Edit steps/crm-sync.yaml to push onboarding data to your CRM automatically: step: name: sync_to_crm type: crm_sync depends_on: generate_onboarding_docs connector: hubspot credentials: api_key: YOUR_CRM_API_KEY actions: - action: create_contact mapping: firstname: “{{client_name | split ’ ’ | first}}” lastname: “{{client_name | split ’ ’ | last}}” email: “{{client_email}}” company: “{{company_name}}” - action: create_deal mapping: dealname: “Onboarding — {{company_name}}” pipeline: default dealstage: appointmentscheduled amount_tier: “{{service_tier}}” - action: add_note mapping: body: “Auto-onboarded on {{project_start_date}}. Documents sent via email.”

To use Salesforce or Pipedrive instead, change the connector value and adjust the field mappings to match your CRM schema. Run the following to verify your mapping: antigravity step validate steps/crm-sync.yaml —dry-run

Step 6: Wire It All Together in workflow.yaml

Open the root workflow.yaml and connect your trigger and steps: workflow: name: client_onboarding version: 1.0 trigger: triggers/intake-form.yaml steps: - steps/generate-docs.yaml - steps/crm-sync.yaml on_failure: notify: channel: slack webhook: YOUR_SLACK_WEBHOOK_URL message: "Onboarding workflow failed for {{client_name}}. Check logs." ## Step 7: Deploy and Test

Deploy the complete workflow to your Antigravity workspace: antigravity workflow deploy --file workflow.yaml --env production

Run a test submission to validate the entire pipeline: antigravity workflow test client_onboarding --data '{ "client_name": "Jane Doe", "client_email": "jane@example.com", "company_name": "Acme Corp", "service_tier": "professional", "project_start_date": "2026-04-01" }'

Check execution logs: antigravity logs --workflow client_onboarding --last 5 ## Pro Tips for Power Users - **Conditional branching:** Add condition: "{{service_tier}} == 'enterprise'" to any step to create tier-specific onboarding paths, such as assigning a dedicated account manager only for enterprise clients.- **Parallel steps:** Set parallel: true on independent steps like document generation and CRM sync to cut workflow execution time in half.- **Custom webhooks:** Use type: webhook steps to notify external services (Slack, Zapier, or internal APIs) at any point in the workflow.- **Version pinning:** Use antigravity workflow deploy --version 1.0 --pin to lock a stable workflow version while iterating on a v2 draft.- **Template previews:** Run antigravity template preview templates/welcome-letter.hbs --data sample.json to preview generated documents before deploying. ## Troubleshooting Common Errors

ErrorCauseSolution
AUTH_EXPIREDAPI key or session token has expiredRun antigravity auth login --api-key YOUR_API_KEY to re-authenticate
CRM_FIELD_MAPPING_ERRORA mapped CRM field does not exist in your CRM schemaRun antigravity step validate steps/crm-sync.yaml --dry-run and verify field names match your CRM
TEMPLATE_RENDER_FAILHandlebars variable is missing or misspelledEnsure all {{variables}} in templates match the field names in your trigger definition
WEBHOOK_TIMEOUTExternal service did not respond within 30 secondsIncrease timeout with timeout: 60 in the step config or check the external service status
DUPLICATE_CONTACTCRM already has a contact with the same emailAdd deduplicate: true and dedup_field: email to your CRM sync action to update instead of create
## Frequently Asked Questions

Can I use Antigravity onboarding workflows with CRMs other than HubSpot?

Yes. Antigravity supports native connectors for HubSpot, Salesforce, and Pipedrive out of the box. For other CRMs, you can use the generic type: webhook step to send data to any REST API endpoint. Simply replace the connector field with webhook and provide the target URL and payload mapping in your step configuration.

How do I add e-signature collection to generated documents?

Add e_signature: true to any document entry in your generate-docs.yaml step. Antigravity integrates with built-in e-signature functionality that tracks signing status. You can add a conditional step that waits for signature completion before proceeding to CRM sync by using wait_for: signature_complete in the depends_on configuration.

Is there a limit to how many onboarding workflows can run concurrently?

On the Free tier, Antigravity allows up to 50 concurrent workflow executions. The Professional plan supports 500, and Enterprise plans offer unlimited concurrency. You can monitor active executions at any time using antigravity workflow stats client_onboarding, which shows queue depth, average completion time, and failure rate.

Explore More Tools

Antigravity AI Content Pipeline Automation Guide: Google Docs to WordPress Publishing Workflow Guide Bolt.new Case Study: Marketing Agency Built 5 Client Dashboards in One Day Case Study Bolt.new Best Practices: Rapid Full-Stack App Generation from Natural Language Prompts Best Practices ChatGPT Advanced Data Analysis (Code Interpreter) Complete Guide: Upload, Analyze, Visualize Guide ChatGPT Custom GPTs Advanced Guide: Actions, API Integration, and Knowledge Base Configuration Guide ChatGPT Voice Mode Guide: Build Voice-First Customer Service and Internal Workflows Guide Claude API Production Chatbot Guide: System Prompt Architecture for Reliable AI Assistants Guide Claude Artifacts Best Practices: Create Interactive Dashboards, Documents, and Code Previews Best Practices Claude Code Hooks Guide: Automate Custom Workflows with Pre and Post Execution Hooks Guide Claude MCP Server Setup Guide: Build Custom Tool Integrations for Claude Code and Claude Desktop Guide Cursor Composer Complete Guide: Multi-File Editing, Inline Diffs, and Agent Mode Guide Cursor Case Study: Solo Founder Built a Next.js SaaS MVP in 2 Weeks with AI-Assisted Development Case Study Cursor Rules Advanced Guide: Project-Specific AI Configuration and Team Coding Standards Guide Devin AI Team Workflow Integration Best Practices: Slack, GitHub, and Code Review Automation Best Practices Devin Case Study: Automated Dependency Upgrade Across 500-Package Python Monorepo Case Study ElevenLabs Case Study: EdTech Startup Localized 200 Course Hours to 8 Languages in 6 Weeks Case Study ElevenLabs Multilingual Dubbing Guide: Automated Video Localization Workflow for Global Content Guide ElevenLabs Voice Design Complete Guide: Create Consistent Character Voices for Games, Podcasts, and Apps Guide Gemini 2.5 Pro vs Claude Sonnet 4 vs GPT-4o: AI Code Generation Comparison 2026 Comparison Gemini API Multimodal Developer Guide: Image, Video, and Document Analysis with Code Examples Guide