# Workflow Steps

Steps are the steps that execute when your workflow triggers. You can chain multiple Steps together, and they'll run in sequence from top to bottom.

***

### Send Message

Send a Threadly message to users or channels. This is the most common workflow action.

#### Configuration

| Setting                       | Description                                    |
| ----------------------------- | ---------------------------------------------- |
| **Message**                   | Compose your message with rich text formatting |
| **Destination**               | Choose where to send it (see options below)    |
| **Image** (optional)          | Attach an image to the message                 |
| **Action Buttons** (optional) | Add forms, links, or calendar booking buttons  |
| **Sender** (optional)         | Override who the message appears to come from  |

#### Destination Types

| Destination                               | Description                             | Example Use Case                            |
| ----------------------------------------- | --------------------------------------- | ------------------------------------------- |
| **User who triggered workflow**           | DM the person who caused the trigger    | Welcome message to new channel member       |
| **Channel the workflow was triggered in** | Post to the same channel                | Respond in the channel where someone joined |
| **Specific channels**                     | Post to selected public channels        | Announce to multiple team channels          |
| **Specific users**                        | DM selected users individually          | Notify specific team members                |
| **Multi-DM**                              | Create a group DM (up to 8 users)       | Loop in a small team together               |
| **Conversation Group**                    | Send to a saved static or dynamic group | Message all managers or a custom segment    |

#### Using Variables in Messages

Make your messages dynamic by including variables:

```
Hey {{user}}! Welcome to {{channel}}!

We're glad you're here. Here's what you need to know...
```

Variables are replaced with actual values when the message sends.

***

### Delay

Pause your workflow for a set amount of time before the next step runs. Use delays to space out messages or create drip sequences.

#### Configuration

| Setting      | Description                |
| ------------ | -------------------------- |
| **Duration** | Enter a number (1-9999)    |
| **Unit**     | Seconds, Minutes, or Hours |

#### Example: Onboarding Drip Sequence

1. **Send Message** — Welcome message (immediate)
2. **Delay** — Wait 24 hours
3. **Send Message** — Day 2 tips and resources
4. **Delay** — Wait 48 hours
5. **Send Message** — Check-in message

{% hint style="info" %}
Multiple delays accumulate. A 5-minute delay followed by a 10-minute delay means the third step runs 15 minutes after the workflow starts.
{% endhint %}

***

### Send Webhook

Trigger an external system by sending an HTTP POST request. Use this to integrate with custom applications or services.

#### Configuration

| Setting                       | Description                          |
| ----------------------------- | ------------------------------------ |
| **Webhook URL**               | The HTTPS endpoint to call           |
| **Custom Headers** (optional) | Add authentication or custom headers |

#### Payload Structure

When the webhook fires, it sends this JSON payload:

```json
{
  "type": "threadly_workflow_trigger",
  "step": { ... },
  "user_who_triggered_workflow": "U123ABC",
  "team_id": "T456DEF",
  "channel": "C789GHI",
  "event_type": "new_member_joins_channel"
}
```

#### Example Use Cases

* Log workflow events to your analytics system
* Trigger internal tools or custom integrations
* Send data to a database or data warehouse

***

### Send to Zapier

Kick off a Zapier automation (Zap) using this workflow as the trigger. Perfect for integrating with thousands of apps.

#### Configuration

| Setting                | Description                                                         |
| ---------------------- | ------------------------------------------------------------------- |
| **Zapier Webhook URL** | Your Zap's webhook URL (from Zapier's "Webhooks by Zapier" trigger) |

#### Example Integrations

* Add form responses to Google Sheets
* Create Notion pages for new channel members
* Update Salesforce records when workflows trigger
* Send emails via Gmail or Mailchimp
* Create tasks in Asana or Monday.com

***

### Add User to Segment

Automatically add the user who triggered the workflow to a predefined [static segment](/threadly/groups/static-groups.md). Use this to segment users for future targeting.

#### Configuration

| Setting   | Description                                  |
| --------- | -------------------------------------------- |
| **Group** | Select the Conversation Group to add them to |

#### Example Use Cases

* Add users who complete onboarding to an "Onboarded" group
* Segment users by the channel they joined
* Build lists for future campaigns based on actions

***

### Remove User from Segment

Automatically remove a user from a [static segment](/threadly/groups/static-groups.md) — useful for managing segments based on steps or time-based rules.

#### Configuration

| Setting   | Description                                       |
| --------- | ------------------------------------------------- |
| **Group** | Select the Conversation Group to remove them from |

#### Example Use Cases

* Remove users from "New Hire" group after 30 days
* Move users between segments based on activity
* Clean up groups when users take certain actions

***

### Add Threadly to Channel

Add Threadly as a member of a channel if it isn't already. Useful when your workflow needs to post to channels Threadly hasn't joined yet.

#### Configuration

| Setting     | Description                           |
| ----------- | ------------------------------------- |
| **Channel** | Select the channel to add Threadly to |

#### When to Use This

* Before sending messages to channels via "Channel Meets Criteria" workflows
* When scaling across many channels that may not have Threadly added

***

### Update HubSpot Contact

Update fields on a HubSpot contact record based on workflow events. Requires an active HubSpot integration.

#### Configuration

| Setting              | Description                       |
| -------------------- | --------------------------------- |
| **Fields to Update** | Map HubSpot field names to values |

#### Available Variables

| Variable                       | Description                               |
| ------------------------------ | ----------------------------------------- |
| `{{user_id}}`                  | Slack user ID                             |
| `{{user_email}}`               | User's email address (from Slack)         |
| `{{user_joined_channel_date}}` | Date they joined the channel (YYYY-MM-DD) |
| `{{channel_name}}`             | Name of the trigger channel               |
| `{{workflow_name}}`            | Name of this workflow                     |

#### Example Use Cases

* Update "Slack Onboarded" field when user joins #general
* Set "Last Slack Activity" date on contact records
* Track which channels contacts have joined

***

### Step Availability by Trigger

Not all steps work with every trigger type. Here's the compatibility matrix:

| Action                       | User Joins Channel | Channel Meets Criteria | On Schedule | Form Submission | Message Posted |
| ---------------------------- | :----------------: | :--------------------: | :---------: | :-------------: | :------------: |
| **Delay**                    |          ✓         |            ✓           |      ✓      |        ✓        |        ✓       |
| **Send Message**             |          ✓         |            ✓           |      ✓      |        ✓        |        ✓       |
| **Send Webhook**             |          ✓         |            ✓           |      —      |        ✓        |        ✓       |
| **Send to Zapier**           |          ✓         |            ✓           |      —      |        ✓        |        ✓       |
| **Add Threadly to Channel**  |          ✓         |            ✓           |      —      |        ✓        |        ✓       |
| **Add User to Segment**      |          ✓         |            —           |      —      |        ✓        |        ✓       |
| **Remove User from Segment** |          ✓         |            —           |      —      |        ✓        |        ✓       |
| **Update HubSpot Contact**   |          ✓         |            —           |      —      |        ✓        |        ✓       |

***

### Tips for Effective Steps

1. **Start with Send Message** — It's the most common and easiest to test
2. **Use delays strategically** — Space out messages to avoid overwhelming users
3. **Test webhooks first** — Use a tool like webhook.site to verify payloads
4. **Combine actions** — Chain multiple steps for powerful automations
5. **Consider the destination** — Match your destination type to your use case

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://threadly.gitbook.io/threadly/workflows/workflow-steps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
