Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

flows-network/flow-functions

Repository files navigation

The function examples here are outdated and do not apply to flows.netwrok. Please check out https://github.com/flows-network/awesome-flow-functions

Functions in Rust and JavaScript for flows.network

badge

Introduction

This repo consists of many functions to automate your workflows across multiple SaaS with the flows.network platform.

Since flows.network is programmable, you could write code to transform data between two SaaS based on your business needs as a developer.

The flow functions could be written in Rust and JavaScript.

Usage

Please refer to our Get Started guide to automating workflows with the functions.

The following table shows the usage of each package. Remember to select the corresponding inbound and outbound connectors on the flows.network platform.

Package Name Inbound Outbound Description
image-rotator Cloudinary Slack Returns the URL of the image rotated by 90 degrees when a file is uploaded to the Cloudinary
discord-welcome Discord Discord Send a welcome message when new member joined
discord-ping Discord Discord Reply PONG to /ping message
anti-invite-link Discord Discord Ban a user when their messages contains invite link
getting-started GitHub Slack Send a message to Slack when new comments are added to GitHub issues
branch-tag-created GitHub Slack Send a message to Slack when a Git branch or tag is created
branch-tag-deleted GitHub Slack Send a message to Slack when a Git branch or tag is deleted
commit-syncer GitHub Slack Send a message to Slack when a GitHub commit is pushed
commit-comment-notifier GitHub Slack Send a message to Slack when a commit comment is created
discussion-notifier GitHub Slack Send a message to Slack when a discussion is created, edited, deleted, pinned, unpinned, locked, unlocked, transferred, category_changed, answered, unanswered, labeled, or unlabeled
discussion-comment-notifier GitHub Slack Send a message to Slack when a comment in a dicussion is created, edited, or deleted
fork-notifier GitHub Slack Send a message to Slack when a user forks a repository
issue-notifier GitHub Slack Send a message to Slack when a GitHub issue is opened, edited, or assigned
issue-review-notifier GitHub GitHub Assign an issue to a specified team member when an issue is created or comment on the issue to remind the creator in case of non-compliance with issue titling convention
issue-pr-naive-bot GitHub GitHub A multi-purpose script that performs different tasks when deployed on certain inbound/outbound pairs. i.e. it assigns labels, assignees, makes comment when a GitHub issue is created, or a pull request is created
full-pr-review-bot GitHub GitHub Request a specific pull request reviewer when the title meets requirements, otherwise send a comment prompt
pr-reviewer GitHub GitHub Automatically merge pull requests when 3 approval are reached
dco-checker GitHub GitHub Check that every commit in a pull request is dco signed, and leave a comment to remind
label-notifier GitHub Slack Send a message to Slack when a label is created, edited, or deleted
pr-messenger GitHub Slack Send a message to Slack when an activity related to a pull request was performed. Can be one of: assigned, auto_merge_disabled, auto_merge_enabled, closed, converted_to_draft, edited, labeled, locked, opened, ready_for_review, reopened, review_request_removed, review_requested, synchronize,unassigned, unlabeled, unlocked
pr-review-notifier GitHub Slack Send a message to Slack when a pull request review is submitted, edited, or dismissed
pr-review-comment-notifier GitHub Slack Send a message to Slack when a pull request review comment is created, edited, or deleted
release-notifier GitHub Slack Send a message to Slack when a release is published, unpublished, created, edited, deleted, prereleased, or released
repository-notifier GitHub Slack Send a message to Slack when a repository is created, deleted, archived, unarchived, edited, renamed, transferred, publicized, or privatized
slack-star-messenger GitHub Slack Send a message to Slack when the GitHub repo gets every 10 stars
workflow-job-notifier GitHub Slack Send a message to Slack when a GitHub Actions workflow job has been queued, is in progress, or has been completed
star-thanks-by-gmail GitHub Gmail Send thank you message via Gmail when GitHub repo gets star
star-thanks-by-sendgrid GitHub Sendgrid Send thank you message via Sendgrid when GitHub repo gets star
star-send-question GitHub Sendgrid Send question message via Sendgrid when GitHub repo gets star
pr-thanks-by-sendgrid GitHub Sendgrid Send thank you message via Sendgrid when GitHub repo gets pull request
label-issue-discord GitHub Discord Send a message to Discord when with a label
twilio-star-messenger GitHub Twilio Send thank you message via Twilio(or Slack) when GitHub repo gets star
calculator Slack Slcak Compute the expressions on the Slack
lucky-draw Slack Slcak Simply type "lucky draw" in a Slack channel to do the trick
upload Slack Cloudinary Upload a file from Slack to Cloudinary
assign-notifier GitHub Notion Create a task on Notion when the GitHub issue is assigned
jira-pr-status-updator GitHub Jira Synchronize the PR state of GitHub to Jira (or Monday)
sync-pr-to-jira GitHub Jira Create an issue on Jira when the PR is created on GitHub
monday-pr-status-updator GitHub Monday Synchronize the PR state of GitHub to Jira (or Monday)
comment-notifier Jira Slack Send message to Slack when a comment is changed on GitHub
group-bad-message Telegram Telegram Ban a user when their messages contains shit
group-link-limit Telegram Telegram Warning a user when their messages contains link secondstate.io
group-member-change Telegram Telegram Send a message when group member changed
telegram-ping Telegram Telegram Reply PONG to /ping message

Build for Rust functions

  • Install WASM target if you not

    rustup target add wasm32-wasi
  • Build package

    cargo build -p <package-name> --target wasm32-wasi --release # Build specified package
    cargo build --workspace --target wasm32-wasi --release       # Build all packages

Contributions

flows.network is driven by the community. You are welcome to contribute and share your functions with the community. So don't hesitate to create a PR when you have some ideas to share.