docs
EnglishChatigram website ↗Open Chatigram
Recipes

Capture a lead in your CRM

Receive a protected lead request, forward its JSON to your CRM API, and return a clear accepted or failure response.

Capture a lead in your CRM Expand a node to see its configuration

Swipe sideways to explore the workflow branches.

  • TRIGGERHTTP Endpoint

    Example configuration

    {
      "secretKey": "",
      "authEnabled": true,
      "extractors": [
        {
          "$tag": "GetWholeAsString",
          "variableName": "payload"
        }
      ]
    }
      • createLeadExternal API integration

        Example configuration

        {
          "request": {
            "method": "POST",
            "path": [
              {
                "$tag": "Constant",
                "value": "https://business-api.example.invalid/crm/leads"
              }
            ],
            "headers": [
              {
                "key": "Content-Type",
                "value": [
                  {
                    "$tag": "Constant",
                    "value": "application/json"
                  }
                ]
              }
            ],
            "queryStrings": [],
            "body": [
              {
                "$tag": "Variable",
                "name": "trigger.payload"
              }
            ]
          },
          "responseHandlers": [
            {
              "$tag": "GetWholeAsString",
              "variableName": "response"
            }
          ]
        }
        • Success
          • acceptedHTTP Response

            Example configuration

            {
              "statusCode": 202,
              "headers": [],
              "body": {
                "$tag": "Json",
                "value": {
                  "$tag": "Object",
                  "properties": [
                    {
                      "key": "status",
                      "value": {
                        "$tag": "String",
                        "value": [
                          {
                            "$tag": "Constant",
                            "value": "accepted"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            }
        • Error
          • failedHTTP Response

            Example configuration

            {
              "statusCode": 502,
              "headers": [],
              "body": {
                "$tag": "Json",
                "value": {
                  "$tag": "Object",
                  "properties": [
                    {
                      "key": "status",
                      "value": {
                        "$tag": "String",
                        "value": [
                          {
                            "$tag": "Constant",
                            "value": "not_completed"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            }

This diagram follows the downloadable workflow. Edit and run it in Chatigram.Swipe the diagram to explore its branches.

Plan availability #

Feature Free Starter Pro Enterprise
Active workflows 3 10 45 Unlimited

Allowances follow the published Chatigram pricing page. Your organization’s Billing & Plans screen confirms its subscription and current usage. Plans can change. Plan information reviewed 2026-11-10.

The business outcome #

Receive a protected lead request, forward its JSON to your CRM API, and return a clear accepted or failure response.

This is an importable starter using Chatigram’s current native nodes. It needs destination-specific setup; it does not imply a dedicated connector for every CRM or ERP brand. Check your software’s API documentation and permissions.

Before you begin #

Set a fresh trigger secret and your CRM API URL and authorization. Use the payload format required by that CRM.

The reserved example.invalid endpoint is deliberately non-working. No real customer data, account credentials, or private resource identifiers are embedded. Keep the workflow disabled until setup is complete.

Configure the workflow #

  1. Import the workflow and set the HTTP Endpoint secret. Save to get your own endpoint URL.
  2. Open createLead. Replace the reserved placeholder URL and configure the authorization your CRM requires, using a protected connection or signed-request action where appropriate.
  3. The trigger exposes the whole request as payload, and createLead forwards it as the request body. Send only the lead fields that your CRM accepts.
  4. Review the accepted and failed responses. The 202 reply means the forwarding action succeeded; it is not a promise about every later CRM process.

Test the outcomes #

  • Use a non-customer lead and confirm it appears once in the CRM.
  • Send a rejected or incomplete request and verify the failure behavior.
  • Repeat an event only after checking whether the first request already created a lead. Use your CRM’s duplicate-prevention mechanism when available.

Open Workflow Activity after the test. Import validation checks the definition; it does not prove a remote API accepted the business operation. Check the destination before repeating a send or write.

Make it your own #

Put reusable public settings in Properties, configure credentials through the protected connection options, and keep explicit error paths. Explore App Connections for existing provider-specific actions you can substitute through the editor.

Use the copy controls below for the complete workflow or its first node. The diagram and downloads come from the same definition. Use Share recipe to share the guide’s public address.

READY TO CUSTOMIZE

Try this in Chatigram

Setup required. Set a fresh trigger secret and your CRM API URL and authorization. Use the payload format required by that CRM. Placeholder endpoints use example.invalid and cannot call a real business service. Keep the workflow disabled until you finish the setup and review its effects.

Download JSON
View workflow JSON
Workflow JSON
{
  "format": "chatigram-workflow",
  "version": 1,
  "metadata": {
    "sourceName": "Capture a lead in your CRM",
    "importHelp": {
      "note": "Setup required. Set a fresh trigger secret and your CRM API URL and authorization. Use the payload format required by that CRM. Placeholder endpoints use example.invalid and cannot call a real business service. Keep the workflow disabled until you finish the setup and review its effects."
    }
  },
  "workflow": {
    "instruction": null,
    "multiLanguageSupport": null,
    "properties": [],
    "trigger": {
      "$tag": "Trigger",
      "type": "HTTP_ENDPOINT",
      "data": {
        "secretKey": "",
        "authEnabled": true,
        "extractors": [
          {
            "$tag": "GetWholeAsString",
            "variableName": "payload"
          }
        ]
      }
    },
    "nodes": [
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000001",
        "name": "createLead",
        "parentId": null,
        "branchIndex": 0,
        "type": "HTTP_REQUEST_NODE_TYPE",
        "data": {
          "request": {
            "method": "POST",
            "path": [
              {
                "$tag": "Constant",
                "value": "https://business-api.example.invalid/crm/leads"
              }
            ],
            "headers": [
              {
                "key": "Content-Type",
                "value": [
                  {
                    "$tag": "Constant",
                    "value": "application/json"
                  }
                ]
              }
            ],
            "queryStrings": [],
            "body": [
              {
                "$tag": "Variable",
                "name": "trigger.payload"
              }
            ]
          },
          "responseHandlers": [
            {
              "$tag": "GetWholeAsString",
              "variableName": "response"
            }
          ]
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000002",
        "name": "accepted",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 0,
        "type": "HTTP_RESPONSE",
        "data": {
          "statusCode": 202,
          "headers": [],
          "body": {
            "$tag": "Json",
            "value": {
              "$tag": "Object",
              "properties": [
                {
                  "key": "status",
                  "value": {
                    "$tag": "String",
                    "value": [
                      {
                        "$tag": "Constant",
                        "value": "accepted"
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000003",
        "name": "failed",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 1,
        "type": "HTTP_RESPONSE",
        "data": {
          "statusCode": 502,
          "headers": [],
          "body": {
            "$tag": "Json",
            "value": {
              "$tag": "Object",
              "properties": [
                {
                  "key": "status",
                  "value": {
                    "$tag": "String",
                    "value": [
                      {
                        "$tag": "Constant",
                        "value": "not_completed"
                      }
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    ],
    "gotos": []
  }
}
Keep building.Need help with this? Explore troubleshooting ↗

Find an answer. Try “welcome workflow”, “database”, or “Telegram”.