Salesforce · Arazzo Workflow

Salesforce Create Lead and Follow-up Records

Version 1.0.0

Create a Lead, then create the related Task and Campaign Member records that move it through the sales process.

1 workflow 1 source API 1 provider
View Spec View on GitHub Fortune 500Artificial IntelligenceAnalyticsCloudCommerceCRMCustomer ServiceEnterpriseMarketingPlatformSalesArazzoWorkflows

Provider

salesforce

Workflows

create-lead-and-relate
Create a Lead and attach a follow-up Task and CampaignMember to it.
Inserts a Lead record, then creates a Task whose WhoId references the new Lead and a CampaignMember that associates the Lead with a campaign. The underlying REST description has no Lead convert operation, so this models the early sales-process steps that normally precede or accompany conversion.
3 steps inputs: campaignId, lead, task outputs: campaignMemberId, leadId, taskId
1
createLead
Insert a new Lead record using the supplied field values. Returns the Id of the newly created Lead.
2
createFollowUpTask
Create a follow-up Task whose WhoId references the newly created Lead so the activity appears on the Lead record.
3
createCampaignMember
Associate the new Lead with a marketing Campaign by creating a CampaignMember record referencing both the Lead and the Campaign.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Create Lead and Follow-up Records
  summary: Create a Lead, then create the related Task and Campaign Member records that move it through the sales process.
  description: >-
    The Salesforce REST API description used here exposes generic SObject
    create, update, and delete operations but does not include the dedicated
    Lead convert resource, so this workflow adapts the classic
    create-then-convert pattern into create-then-relate. It first inserts a new
    Lead, then creates a follow-up Task linked to that Lead via WhoId, and
    finally records a CampaignMember tying the Lead to a marketing campaign.
    Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: recordsApi
  url: ../openapi/salesforce-records-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-lead-and-relate
  summary: Create a Lead and attach a follow-up Task and CampaignMember to it.
  description: >-
    Inserts a Lead record, then creates a Task whose WhoId references the new
    Lead and a CampaignMember that associates the Lead with a campaign. The
    underlying REST description has no Lead convert operation, so this models
    the early sales-process steps that normally precede or accompany
    conversion.
  inputs:
    type: object
    required:
    - lead
    - campaignId
    properties:
      lead:
        type: object
        description: >-
          Field map for the new Lead (e.g. LastName, Company, Email, Status).
          LastName and Company are required by Salesforce for a Lead.
      task:
        type: object
        description: >-
          Field map for the follow-up Task (e.g. Subject, Status, Priority).
          WhoId is supplied automatically from the created Lead.
      campaignId:
        type: string
        description: The 18-character Campaign Id to associate the Lead with.
  steps:
  - stepId: createLead
    description: >-
      Insert a new Lead record using the supplied field values. Returns the
      Id of the newly created Lead.
    operationId: createRecord
    parameters:
    - name: sobjectType
      in: path
      value: Lead
    requestBody:
      contentType: application/json
      payload: $inputs.lead
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      leadId: $response.body#/id
  - stepId: createFollowUpTask
    description: >-
      Create a follow-up Task whose WhoId references the newly created Lead so
      the activity appears on the Lead record.
    operationId: createRecord
    parameters:
    - name: sobjectType
      in: path
      value: Task
    requestBody:
      contentType: application/json
      payload:
        Subject: $inputs.task.Subject
        Status: $inputs.task.Status
        Priority: $inputs.task.Priority
        WhoId: $steps.createLead.outputs.leadId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      taskId: $response.body#/id
  - stepId: createCampaignMember
    description: >-
      Associate the new Lead with a marketing Campaign by creating a
      CampaignMember record referencing both the Lead and the Campaign.
    operationId: createRecord
    parameters:
    - name: sobjectType
      in: path
      value: CampaignMember
    requestBody:
      contentType: application/json
      payload:
        LeadId: $steps.createLead.outputs.leadId
        CampaignId: $inputs.campaignId
        Status: Responded
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      campaignMemberId: $response.body#/id
  outputs:
    leadId: $steps.createLead.outputs.leadId
    taskId: $steps.createFollowUpTask.outputs.taskId
    campaignMemberId: $steps.createCampaignMember.outputs.campaignMemberId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/salesforce-create-lead-and-convert-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.