gas-feed2notion
RSS フィードを Notion データベースへ送信する Google Apps Script ライブラリー。
AI Summary
gas-feed2notion
GAS library to fetch RSS feeds and send to Notion DB.
Target Users
Beginner-intermediate GAS developers wanting to auto-send RSS feeds to Notion DBs.
Problems Solved
Manual entry of RSS feed items into Notion DBs is inefficient and needs automation.
Script ID
- In GAS Editor: Click "Libraries +" → Paste into "Script ID" field → Click "Look up"
- "gas-feed2notion" will appear in the search results
- Select the latest version (highest number) from "Version" dropdown
- Click "Add"
Tags
Main Features
1
Simple send
Use FeedToNotion.send(apiKey, opts) in GAS scripts to send RSS to Notion DB.
2
Data transform
Customize feed items with paramTransformers/feedTransformers before Notion send.
3
Keyword notify
Add mentions to Notion users on detecting keywords in feed title/description.
Examples
Main Functions
| Function | Description |
|---|---|
| FeedToNotion.send | Send RSS feeds to Notion DB |
| FeedToNotion.presetParamTransformers | Get preset param transformers |
| FeedToNotion.getWordsToMentionParamTeransFormer | Create transformer for mentions |
Examples
Basic Feed Sending
/**
* 基本フィード送信
* ・設定取得: const settings = settings_()
* ・オプション指定: feeds: [{name, url}], limit: 10
* ・送信実行: FeedToNotion.send(settings.apiKey, settings.opts)
*/
function feed2notion() {
const settings = settings_();
FeedToNotion.send(settings.apiKey, settings.opts);
}
function settings_() {
const props = PropertiesService.getScriptProperties();
return {
apiKey: props.getProperty('notion_api_key'),
opts: {
database_id: props.getProperty('database_id'),
feeds: [{ name: 'feed name', url: 'feed url' }],
limit: 10
}
};
}Keyword Notification
/**
* キーワード通知設定
* ・通知ユーザーID取得: props.getProperty('notify_user_id')
* ・トランスフォーマー作成: FeedToNotion.getWordsToMentionParamTeransFormer(['keyword1', /keyword2/i], notify_user_id)
* ・プリセット+カスタム適用: paramTransfomers: [...FeedToNotion.presetParamTransformers(), w2m]
*/
function feed2notion() {
const settings = settings_();
FeedToNotion.send(settings.apiKey, settings.opts);
}
function settings_() {
const props = PropertiesService.getScriptProperties();
const notify_user_id = props.getProperty('notify_user_id');
const w2m = FeedToNotion.getWordsToMentionParamTeransFormer(
['keyword1', /keyword2/i],
notify_user_id
);
return {
apiKey: props.getProperty('notion_api_key'),
opts: {
database_id: props.getProperty('database_id'),
paramTransfomers: [...FeedToNotion.presetParamTransformers(), w2m],
feeds: [{ name: 'feed name', url: 'feed url' }],
limit: 10
}
};
}Disable Image Fetch
/**
* 画像取得無効化
* ・feedTransformers空配列: feedTransfomers: []
* ・設定取得: const settings = settings_()
* ・送信実行: FeedToNotion.send(settings.apiKey, settings.opts)
*/
function feed2notion() {
const settings = settings_();
FeedToNotion.send(settings.apiKey, settings.opts);
}
function settings_() {
const props = PropertiesService.getScriptProperties();
return {
apiKey: props.getProperty('notion_api_key'),
opts: {
database_id: props.getProperty('database_id'),
feedTransfomers: [],
feeds: [{ name: 'feed name', url: 'feed url' }],
limit: 10
}
};
}