Twist#
Twist is a communication app that helps teams balance focused work with collaborative conversations.
Credentials
You can find authentication information for this node here.
Basic Operations#
- Channel
- Archive a channel
- Initiates a public or private channel-based conversation
- Delete a channel
- Get information about a channel
- Get all channels
- Unarchive a channel
- Update a channel
- Comment
- Create a new comment to a thread
- Delete a comment
- Get information about a comment
- Get all comments
- Update a comment
- Message Conversation
- Create a message in a conversation
- Delete a message in a conversation
- Get a message in a conversation
- Get all messages in a conversation
- Update a message in a conversation
- Thread
- Create a new thread in a channel
- Delete a thread
- Get information about a thread
- Get all threads
- Update a thread
Example Usage#
This workflow allows you to create and update a channel as well as send a message on Twist. You can also find the workflow on n8n.io. This example usage workflow would use the following nodes. - Start - Twist
The final workflow should look like the following image.
1. Start node#
The start node exists by default when you create a new workflow.
2. Twist node (create: channel)#
This node will create a channel n8n-docs
and add a user to the channel.
1. First of all, you'll have to enter credentials for the Twist node. You can find out how to do that here.
- Select 'Channel' from the Resource dropdown list.
- Select a workspace from the Workspace ID dropdown list.
- Enter
n8n-docs
in the Name field. If you want to create a channel with a different name, enter that name instead. - Click on Add Field and select 'User IDs' from the dropdown list.
- Select the users from the User IDs dropdown list. The users you select will be added to the channel.
- Click on Execute Node to run the node.
In the screenshot below, you will notice that the node creates a new channel named n8n-docs
, and adds a user to the channel.
3. Twist1 node (update: channel)#
This node will update the description of the channel that we created in the previous node.
- Select the credentials that you entered in the previous node.
- Select 'Channel' from the Resource dropdown list.
- Select 'Update' from the Operation dropdown list.
- Click on the gears icon next to the Channel ID field and click on Add Expression.
- Select the following in the Variable Selector section: Nodes > Twist > Output Data > JSON > id. You can also add the following expression:
{{$node["Twist"].json["id"]}}
. - Click on Add Field and select 'Description' from the dropdown list.
- Enter a description in the Description field.
- Click on Execute Node to run the node.
In the screenshot below, you will notice that the node adds a description to the channel that we created in the previous node.
4. Twist2 node (create: messageConversation)#
This node will send a message to the General conversation on Twist. The message contains an action button that navigates to https://docs.n8n.io
.
- Select the credentials that you entered in the previous node.
- Select a workspace from the Workspace ID dropdown list.
- Select 'General' from the Conversation ID dropdown list. If you want to send a message to a different conversation, select that conversation instead.
- Click on the gears icon next to the Channel ID field and click on Add Expression.
-
Enter the following text in the Content field:
The above message mentions the user1 2 3
Hey [Harshil](twist-mention://475370)! You have been added to the {{$node["Twist"].json["name"]}} channel. Click on the button below to quickly navigate to the documentation website.
Harshil
. To mention a user in your workspace you need to use their User ID. Refer to the FAQs to learn how to get a User ID. -
Click on Add options and select 'Actions' from the dropdown list.
- Click on the Add Action button.
- Select 'Open URL' from the Action dropdown list.
- Enter
Documentation site
in the Button Text field. - Select 'Action' from the Type dropdown list.
- Enter
https://docs.n8n.io
in the URL field. - Click on Execute Node to run the node.
In the screenshot below, you will notice that the node sends a message to the General conversation and mentions the user.
FAQs#
Where can I get the User ID?#
To get the User ID for a user follow the steps mentioned below
1. Click on the Team tab.
2. Click on a user's avatar.
3. Copy the string of characters located after /u/
in your Twist URL. This string is the User ID. For example, if the URL is https://twist.com/a/4qw45/people/u/475370
the User ID will be 475370
.