Designing an AI-assisted SMS campaign workflow in n8n (BulkSMS + HubSpot)

Hi,

I have a draft of a workflow. I would very much appriciate a second opinion from someone more comfortable with n8n.

Short context: A company runs sales campaigns using BulkSMS to current customers using HubSpot as CRM. A lot of customer replies differs from just “Yes” or ”No”. And every time that happens there will be manual work. Here is how I would solve this:

Step 1 – Webhook node
Capture inbound replies from BulkSMS. This requires a two-way BulkSMS setup.

  • In BulkSMS settings (two-way/inbound or “callback/webhooks”), configure the reply callback URL to point to the n8n webhook URL. (Still need to verify exact BulkSMS options.)

Step 2 – Code node (normalize payload)
Extract and map the relevant fields so we know exactly what BulkSMS sends. For example:

  • Sender (phone number)

  • Message body

  • Campaign ID, message ID, etc.


Step 3 – HTTP Request node (Azure OpenAI)
Send the message to Azure OpenAI with a role/system prompt to classify the reply into one of three categories:

  • YES

  • NO

  • Question


Step 4 – Code node (parse classification)
Extract the classification value (YES, NO, or Question] from the AI response so n8n can branch the flow.


Step 5 – Switch node
Branch into three flows depending on classification result:

  • YES-flow

    • HubSpot Node (Search contacts by phone = {{$json.from}})

    • Code Node (extract contactId)

    • HubSpot Node (Update contact: set CompanyX_last_campaign_response = "YES")

  • NO-flow

    • Same as above, but update property to "NO".
  • Question (Default)
    Purpose: Generate a short suggested reply, then create a HubSpot Task for human review/response.

    • HTTP Request node → Azure OpenAI (generate short reply, set max characters)

    • Code Node (extract suggested reply)

    • HubSpot Node (Search contacts)

    • Code Node (extract contactId)

    • HTTP Request Node → HubSpot API (Create Task with suggested reply)

    • HTTP Request Node → HubSpot API (Associate Task with the contact)

Does this look like a solid approach? Thank you so much for reading all this.

Maybe it is better to not retrieve information from BulkSMS but just use connections with HubSpot?

I had a similar case and switched to sms.to since their API was simpler to set up with n8n. The docs helped a lot and the webhook test worked on the first try. If you’re handling larger lists, their batch send feature saved me time, and I didn’t hit any rate limits. It also played nicely with my NLP step for message variations based on user segments.