I tried using 'Huginn', an open source task automation tool that allows various services to work together without permission.



There are various tools such as

IFTTT and Zapier that automate tasks by linking various web services. Among them, ' Huginn ' is developed as an open source and is an automation tool that can be used without worrying about data being intercepted by setting up your own server, so I tried it out and tested its usability. .

GitHub - huginn/huginn: Create agents that monitor and act on your behalf. Your agents are standing by!
https://github.com/huginn/huginn



According to Huginn's page, the easiest setup is using Docker . You can use Huginn by simply entering 'docker run -it -p 3000:3000 huginn/huginn' in the terminal of the PC where Docker is installed.



When you type the command, the docker image will be automatically pulled and the server will start.



You can access Huginn by launching your browser and opening 'localhost:3000'. Click 'Login'.



By default, the user name is 'admin' and the password is 'password'. Enter it and click 'Log in'.



The dashboard has opened. In Huginn, data is processed in units called 'agents', and data is linked by combining agents that receive data from the outside and agents that send it out. Click 'View'.



The agent list page opens. Let's create a new agent from 'New Agent'.



``Detect Tweets'', ``Start up a browser internally and scrape'', ``Receive/send emails'', ``Analyze CSV/JSON, etc.'', ``Receive RSS'', ``Read files'', ``Check weather forecasts'', ``Data formatting'', etc. There are different types of agents: This time, I decided to build a system to send all the latest GIGAZINE articles by email. First, we will create an agent of type 'Rss Agent'.



In addition to the type, decide on the name and schedule. Help is included in the columns for concepts that are difficult to understand.According to it, the Controller column allows you to set the agents that can start that agent, and the 'Sources', 'Recievers', and 'Scenarios' are mainly used to configure interactions with other agents. It looks like it will be used for collaboration. You can set the remaining time of the event in the Keep events field. If you want to use the events issued by this agent when collaborating with other agents, the events must remain until the other agents are started.



Make other settings in the Options field. The configurable items are explained in detail on the right side, so just read this explanation and enter.



Set the URL to GIGAZINE's RSS feed and click 'Save'.



This time, I set the schedule to 'every hour', but you can also start it manually by clicking 'Run' from 'Actions' of the created agent.



By switching to the 'Events' page from the tab above, you can see a list of published events.



Next, we will create an agent that will send emails. Set the type to 'Email Digest Agent', give it a name, and add the agent you created earlier to the 'Sources' field.



Let's set the Options field by referring to

the example in the official document .



When I tried to send an email, I got an error saying that the email server was not set up. It is OK if you set it using the server's environment variables, but you need to restart the server to reflect the environment variables, and if you restart the server, the agent data you have created so far will be deleted, so please export it first. To go.



Select 'Scenarios' from the tab above and click 'New Scenario'.



Enter a name and description, add the two agents you created earlier, and click 'Save Scenario'.



Click 'downloading and sharing your export file' to download the data file and save it.



As for setting up the mail server, you can refer to

the official example and set it using environment variables. If you set the connection to the external SQL server here, the data will not be lost every time, but since we are just testing the usability this time, we will only set the email settings.



Add the '--env-file' option to read the environment variables and restart.



Next, click 'Import Scenario' in 'Scenarios' ...



Select the file you saved earlier and click 'Start Import'.



A preview will be displayed, so check the confirmation button and click 'Finish Import'.



The email has been successfully sent. However, since the raw RSS data is sent as is, it is extremely difficult to read.



Therefore, we will prepare an agent to organize the data in between. Receive and process events from 'GIGAZINE New Article Checker' and select 'email sending agent' as the event destination.



After setting the type of data in 'message' of 'Options', click 'Save' to save it.



You can check the data flow by looking at 'View Diagram' on the 'Agents' tab. This is what it looked like this time.



In order to have the 'mail formatting agent' read the event, resend the event of 'GIGAZINE new article checker' ...



Start the mail sending agent manually.



I was able to format it in a format that is relatively easy to read.



Once you set it up, Huginn will start the agent periodically and automatically process it. The officially available agents are as follows. This alone is enough to automate a variety of tasks, but since it's open source , you can also create your own agents , making it an extremely scalable application that not only eliminates the need to send data externally. It becomes.

CSV Agent
Webhook Agent
Tumblr Likes Agent
Twilio agent
Javascript Agent
Dropbox Watch Agent
Aftership Agent
Manual Event Agent
Telegram Agent
Attribute Difference Agent
JSON Parse Agent
Jabber Agent
De Duplicate Agent
Google Translation Agent
Data output agent
Adioso Agent
Email Digest Agent
The Tumblr Publishing Agent
Weibo User Agent
Pushover Agent
S3 Agent
Post agent
Twitter Action Agent
Twitter Favorites
Twitter User Agent
Twitter Search Agent
Twitter Stream Agent
Twitter Publish Agent
Delay Agent
RSS Agent
Google Calendar Agent
Local File Agent
User Location Agent
Wunderlist Agent
Weibo Publish Agent
Growl Agent
IMAP Folder Agent
Evernote Agent
Twilio Receive Agent
Hipchat Agent
Commander Agent
Peak Detector Agent
Dropbox File URL Agent
Liquid Output Agent
Read File Agent
Change Detector Agent
Witai Agent
Public Transport Agent
Shell Command Agent
Phantom JS Cloud Agent
Digest agent
PDF Info Agent
Human Task Agent
Stubhub Agent
Website Agent
Sentiment agent
Gap Detector Agent
Email agent
Boxcar Agent
FTPSite Agent
Scheduler Agent
Pushbullet Agent
Trigger Agent
Jira Agent
Event Formatting Agent
MQTT Agent
HTTP Status Agent
Basecamp Agent
Weather agent
Slack Agent
Google Flights Agent

in Review,   Software,   Web Application,   , Posted by log1d_ts