Problem with Slack Modal and views.open: invalid_trigger_id

Hi everyone :wave:

I’m trying to open a Slack modal using the views.open method triggered by a Slash Command (/enviar-credenciales) in an n8n workflow. The flow works perfectly when tested via cURL, but fails when triggered via n8n.

:wrench: Workflow Setup

  1. Webhook Node

• Method: POST

• Receives the Slack Slash Command.

  1. Code Node

• Extracts trigger_id from body.trigger_id

• Builds the modal view with multiple inputs (language, email list, credentials, etc.).

  1. HTTP Request Node

• URL: https://slack.com/api/views.open

• Method: POST

• Headers:

{
  "Authorization": "Bearer xoxb-...",
  "Content-Type": "application/json"
}

• Body (as JSON with expressions):

{
  "trigger_id": "={{ $json.trigger_id }}",
  "view": {{ JSON.stringify($json.view) }}
}
  1. Respond to Webhook Node

• Sends a basic response like:

{
  "text": "📤 Sending modal..."
}

:test_tube: Result

The HTTP Request node returns the following error:

{
  "ok": false,
  "error": "invalid_trigger_id"
}

Here’s the incoming trigger_id from the webhook payload:

"trigger_id": "8653186027153.716539322848.603f5d38c28b11be04d745b93a79edb4"

When using the exact same payload via cURL, the modal opens successfully.

:thread: My Question

Is there something in how n8n handles Slack webhook data that could cause the trigger_id to become invalid by the time the HTTP request is made?

Any examples of working Slack + views.open workflows in n8n that I can look at would be super helpful :pray:

Thanks in advance!

Hey, could you ctl a, ctl c on your entire workflow, and click the ‘</>’ button in the forums response and paste the workflow between the backticks that appear?

That would help give some more context on what is happening.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.