Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ega4432/notion-to-markdown-action
Custom action to export Notion database to local as markdown files and images.
https://github.com/ega4432/notion-to-markdown-action
action github-actions markdown notion notion-api notion-to-md typescript
Last synced: 4 months ago
JSON representation
Custom action to export Notion database to local as markdown files and images.
- Host: GitHub
- URL: https://github.com/ega4432/notion-to-markdown-action
- Owner: ega4432
- License: mit
- Created: 2023-02-02T03:10:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-30T19:29:34.000Z (5 months ago)
- Last Synced: 2024-10-01T14:50:08.242Z (5 months ago)
- Topics: action, github-actions, markdown, notion, notion-api, notion-to-md, typescript
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/notion-to-markdown-action
- Size: 22.9 MB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- project-awesome - ega4432/notion-to-markdown-action - Custom action to export Notion database to local as markdown files and images. (TypeScript)
README
# notion-to-markdown-action
[](https://github.com/ega4432/notion-to-markdown-action/actions/workflows/test.yml)
[](https://github.com/ega4432/notion-to-markdown-action/actions/workflows/check-dist.yml)
[](https://github.com/ega4432/notion-to-markdown-action/actions/workflows/auto-merge.yml)
[](https://github.com/ega4432/notion-to-markdown-action/actions/workflows/auto-release.yml)## Overview
This action converts and downloads pages that exist in Notion's specified database to a markdown files.
## Usage
`.github/workflows/import.yml`
```yaml
name: importon:
schedule:
- cron: '0 0 * * *'jobs:
import:
runs-on: ubuntu-latest
steps:
- id: import
uses: ega4432/notion-to-markdown-action@v0
env:
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
with:
# Optional
output_path: some-dir # default: output
filename_property: slug # default: title
# You can check output files count
- run: |
echo "Exported count: ${{ steps.import.outputs.files_count }}"
```## Supported
### Runners
- `ubuntu-latest`
- `macos-latest`
- `windows-latest`### Events
- any
## Environments
| Name | Description | Required |
| -------------------- | --------------------------------- | -------- |
| `NOTION_API_KEY` | API key of Notion integrations | Yes |
| `NOTION_DATABASE_ID` | Database ID of target Notion page | Yes |## Inputs
| Name | Description | Default | Required |
| ------------------- | ------------------------------------------------------------------------------------------------- | -------- | -------- |
| `output_path` | You can specify the directory path to output files. | `output` | No |
| `filename_property` | You can specify the column of the Notion database to be used as a filename when saving the files. | `title` | No |## Outputs
| Name | Description |
| ------------- | ------------------------------------------------------------- |
| `files_count` | You can check the number of files output in subsequent steps. |## Author
ega4432: [GitHub](https://github.com/ega4432), [Twitter](https://twitter.com/ega4432)
## LICENSE
Copyright © 2023 ega4432.
[MIT License](https://github.com/ega4432/notion-to-markdown-action/blob/main/LICENSE)