Action Node
Learn how Action Nodes in Giselle enable your workflows to interact with external services like GitHub, performing tasks such as creating issues, comments, or retrieving discussions in your repositories.
Action Node in Giselle
Action Node empowers your Giselle workflows to connect with and control external services. It acts as a bridge, allowing you to automate tasks beyond the Giselle environment. Currently, the primary integration is with GitHub, enabling a variety of repository operations. We are continuously working to expand support for more external services.
GitHub Action
The GitHub Action capability within the Action Node allows your workflows to perform specific operations in your GitHub repositories. This is useful for automating tasks like issue creation, commenting, retrieving data, and more, based on the logic and data processed within your Giselle flow.
Setting up a GitHub Action:
-
Select GitHub Account/Organization:
- Upon adding an Action Node and choosing GitHub as the service, you’ll first need to select the GitHub account or organization where your target repository resides (e.g.,
giselles-ai
,liam-hq
).
- Upon adding an Action Node and choosing GitHub as the service, you’ll first need to select the GitHub account or organization where your target repository resides (e.g.,
-
Choose a Repository:
- Next, a list of repositories accessible under the selected account/organization will appear (e.g.,
docs
,giselle
). - Click the Set up button next to the repository you want the action to target (e.g.,
giselle
).
- Next, a list of repositories accessible under the selected account/organization will appear (e.g.,
-
Choose the GitHub Action to Perform:
- Once a repository is selected (e.g.,
giselles-ai/giselle
), you’ll need to specify what action the Giselle’s app should execute. - Click on the dropdown menu, which might be labeled “Choose what action you want to perform.”
- Select the desired action from the list. Examples include:
- Create Issue
- Create Issue Comment
- Create Pull Request Comment
- Reply Pull Request Review Comment
- Get Discussion
- After selecting an action, click the Setup Action button to proceed to parameter configuration.
- Once a repository is selected (e.g.,
-
Configure Action Parameters:
- Each GitHub action requires specific parameters to execute correctly. For instance, the “Create Issue Comment” action requires an
issueNumber
and abody
for the comment, as indicated by “Required” fields. - The configuration panel will display the selected repository and the chosen action (e.g., “Create Issue Comment”). Below this, the necessary parameters will be listed.
- For each parameter, you’ll need to provide a value. This can often be done by:
- Entering a static value directly.
- Selecting a Source: This allows you to map data dynamically from the outputs of previous nodes in your flow or from the Giselle’s app flow’s initial trigger inputs. The “Select Source” option next to each parameter field facilitates this.
- Ensure all parameters marked as “Required” are filled in.
- Once all parameters are configured, the changes are typically saved by an “Action” button or similar confirmation in the UI. The node on the canvas will update to reflect the configured action (e.g., showing “Create Issue Comment” with inputs for
issueNumber
andbody
).
- Each GitHub action requires specific parameters to execute correctly. For instance, the “Create Issue Comment” action requires an
Output of the Action Node:
After successfully performing its task, an Action Node will typically produce an output. This output can contain information relevant to the action performed, such as the ID or URL of a created issue or comment, or the data retrieved from a service (like discussion content). This output can then be used as input by subsequent nodes in your workflow, enabling complex chains of operations. The node preview often indicates the availability of an “output”.
Example: Creating an Issue Comment
Imagine you’ve configured an Action Node to “Create Issue Comment” for the giselles-ai/giselle
repository:
- Repository:
giselles-ai/giselle
- Action: Create Issue Comment
- Required Parameters (Inputs):
issueNumber
: Sourced from a workflow trigger or a previous node (e.g., an issue number identified earlier in the flow).body
: Sourced from another node (e.g., a text summary generated by an AI model in a preceding step).
- Execution: When this node runs, it will post a new comment using the provided
body
to the issue specified byissueNumber
within thegiselles-ai/giselle
repository. - Potential Output: The node might output details like the URL or ID of the newly created comment, which can be used in further steps.
Example: Replying to a Pull Request Review Comment
Here’s how you might configure an Action Node to “Reply Pull Request Review Comment” in the giselles-ai/giselle
repository, as shown in the provided image:
- Repository:
giselles-ai/giselle
- Action: Reply Pull Request Review Comment
- Required Parameters (Inputs):
pullNumber
: The number of the pull request containing the review comment. This would typically be sourced from a trigger event (e.g., a GitHub Trigger for “Pull Request Review Comment Created”) or a previous node that identified the pull request.commentId
: The ID of the specific review comment to which you are replying. This also would likely come from the trigger data or a preceding node that fetched comment details.body
: The content of your reply. This could be static text, or more powerfully, dynamically generated text from an AI node in your workflow (e.g., an automated acknowledgment, a question, or a summary).
- Execution: When this Action Node executes, it will post the content from the
body
parameter as a reply to the specifiedcommentId
on the givenpullNumber
within thegiselles-ai/giselle
repository. - Potential Output: The node may output information about the reply that was posted, such as its own ID or URL, which could be useful for further conditional workflow logic.
Example: Getting a GitHub Discussion
This action allows your workflow to retrieve the content and details of a specific GitHub Discussion from your repository.
- Repository:
giselles-ai/giselle
(or any other configured repository) - Action: Get Discussion
- Required Parameters (Inputs):
discussionNumber
: The number of the GitHub Discussion to retrieve. This can be a static value or sourced dynamically from a previous node’s output or a trigger input.
- Execution: When this node runs, it connects to GitHub and fetches the details of the discussion specified by
discussionNumber
from the selected repository. - Potential Output: The node will output an object containing the discussion data. This typically includes details such as the discussion’s
id
,title
,bodyHTML
(the content of the discussion in HTML format),createdAt
,updatedAt
,author
information, and an array ofcomments
associated with the discussion (each comment also having details likebodyHTML
,author
, etc.). This structured data can then be used by subsequent nodes in your workflow, for example, to summarize the discussion, extract key points, perform analysis on the comments, or trigger other actions based on its content.
The Action Node, particularly with its GitHub integration, is a versatile tool for extending Giselle’s automation capabilities into your software development and project management lifecycles. Stay tuned for more actions and integrations with other external services!