Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
Go to siteNotion's API allows for the creation, reading, updating, and deleting of pages, databases, and their contents within Notion. Using Pipedream's platform, you can build workflows that connect Notion with various other services to automate tasks such as content management, task tracking, and data synchronization. With Pipedream's serverless execution, you can trigger these workflows on a schedule, or by external events from other services, without managing any infrastructure.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
notion: {
type: "app",
app: "notion",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.notion.com/v1/users/me`,
headers: {
Authorization: `Bearer ${this.notion.$auth.oauth_access_token}`,
"Notion-Version": `2021-08-16`,
},
})
},
})
Content Sync Between Notion and a CMS: Automatically push new blog posts from Notion to WordPress, ensuring a seamless content flow from drafting to publishing.
Task Management with Todoist Integration: When a new task is added to a Notion database, create a corresponding task in Todoist, and vice versa, keeping task lists synced across platforms.
Daily Sales Report Generation: Gather sales data from a tool like Shopify at the end of each day, sum up total sales, and create a page in Notion with the day's sales summary for easy reporting.
To get started, first log in to or create your Pipedream account and start a new workflow.
Add a Notion action or trigger to your workflow, then click Select a Notion account to open a Notion connection window:
From within this window, select pages you'd like Pipedream to access:
Click Accept to connect your Notion account to Pipedream.
Emit new event when a database is created. Note: Databases must be shared with your Pipedream Integtration to trigger event.
Emit new event when a page or one of its sub-pages is updated.
Emit new event when a page in a database is updated. To select a specific page, use Updated Page ID
instead
Creates and appends blocks to the specified parent. See the documentation
Creates a page from a parent page. The only valid property is title. See the documentation
Creates a new page copied from an existing page block. See the documentation
After creating a new database, reconnect your account and select it to enable Pipedream access.
Ensure the request body is formatted as valid JSON.
The URL in your request is incorrect. Ensure the correct format and parameters.
The request type isn't supported. Ensure the correct format and parameters.
Your authorization grant or refresh token is invalid, expired, or mismatched. Refer to OAuth 2.0 documentation.
The request body doesn't match the expected parameters schema. You're most likely missing a key parameter, or a parameter is malformed.
If your request lacks the required Notion-Version
header, try adding a new Notion step in Pipedream, as it should handle this automatically.
If your API token is invalid, reconnect your Notion account to Pipedream.
Your API token doesn't have permission to perform this operation. Try reconnecting your Notion account to Pipedream.
The requested resource doesn't exist or isn't shared with your API token. Double check that the block, database or page exists.
A conflict occurred, possibly due to outdated parameters. Try updating your parameters.
You've exceeded the number of allowed requests. Slow down your request rate.
An unexpected error has occurred. Contact Notion support if it persists.
Notion had a problem processing your request, possibly due to an upstream server issue.
Notion is temporarily unavailable, possibly due to a long response time. Try again later.
Notion's database cannot be queried at the moment. Try again later.
Your request to Notion timed out. Try resending it after a while.
Notion uses OAuth authentication. When you connect your Notion account, Pipedream will open a popup window where you can sign into Notion and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Notion API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://api.notion.com/v1/oauth/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
owner=user
POST
https://api.notion.com/v1/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}