How to Search for an Event on Google Calendar Using a Notion Page's Title Card?

This topic was automatically generated from Slack. You can find the original thread here.

How can I to a search step on Google calendar for an event using the title card of a notion page.

To perform a search step on Google Calendar for an event using the title of a Notion page, you can create a Pipedream workflow that integrates both Notion and Google Calendar. Here’s a step-by-step guide: 1. Trigger: Use a Notion trigger to start the workflow when a new page is created or updated. 2. Action: Use a Notion action to retrieve the title of the page. 3. Action: Use a Google Calendar action to search for events with the retrieved title. ### Step-by-Step Workflow 1. Trigger: Set up a Notion trigger. - Search for the Notion app in the Pipedream UI. - Select a trigger such as “New Page Created” or “Updated Page”. 2. Action: Retrieve the title of the Notion page. - Add a new step and search for the Notion app. - Select the “Retrieve Page” action. - Connect your Notion account. - Select the Page ID from the trigger step. 3. Action: Search for events in Google Calendar using the title. - Add a new step and search for the Google Calendar app. - Select the “Search Events” action. - Connect your Google Calendar account. - Use the title from the Notion page as the search query. ### Example Pipedream Component Code Here’s an example of how you can achieve this using Pipedream component code: ``` import { axios } from “@pipedream/platform”; export default defineComponent({ props: { notion: { type: “app”, app: “notion”, }, google: { type: “app”, app: “google”, }, pageId: { type: “string”, label: “Notion Page ID”, }, }, async run({ steps, $ }) { // Retrieve the Notion page title const notionResponse = await axios($, { url: https://api.notion.com/v1/pages/${this.pageId}, headers: { Authorization: Bearer ${this.notion.$auth.oauth_access_token}, “Notion-Version”: 2021-08-16, }, }); const pageTitle = notionResponse.properties.title.title[0].text.content; // Search for events in Google Calendar using the page title

I don’t see the “Search Event” function in Pipedream for Google Calendar events action

You should visit Pricing - Pipedream for the latest pricing, but I’ll do my best to answer. It seems like you’re looking for a way to search for Google Calendar events in Pipedream. Currently, Pipedream does not have a pre-built “Search Event” action for Google Calendar. However, you can create a custom Pipedream component to search for events using the Google Calendar API. Here’s an example Pipedream component that searches for events in Google Calendar: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { google: { type: "app", app: "google", }, calendarId: { type: "string", label: "Calendar ID", description: "The ID of the calendar to search events in", }, query: { type: "string", label: "Search Query", description: "The search query to filter events", }, }, async run({ steps, $ }) { const response = await axios($, { url: `https://www.googleapis.com/calendar/v3/calendars/${this.calendarId}/events`, headers: { Authorization: `Bearer ${this.google.$auth.oauth_access_token}`, }, params: { q: this.query, }, }); return response.items; }, }); To use this component: 1. Search for the “Google” app in the Pipedream UI. 2. Use the component above to create a custom action. 3. Provide the calendarId and query props to search for events in your Google Calendar. If you need further assistance or have any other questions, feel free to ask!

How can I search for a Google Calendar Event using the title of a notion page

To search for a Google Calendar event using the title of a Notion page, you can create a Pipedream workflow that integrates both Notion and Google Calendar. Here’s a step-by-step guide to achieve this: 1. Trigger: Use the Notion “Updated Page ID” trigger to detect changes in a Notion page. 2. Action: Use a custom code step to search for a Google Calendar event using the title of the Notion page. ### Step-by-Step Instructions #### 1. Trigger: Notion “Updated Page ID” 1. Search for the Notion app from the trigger menu. 2. Select the “Updated Page ID” trigger. 3. Connect your Notion account. 4. Select a Page ID or pass a string from a previous step. 5. Follow the instructions on the trigger configuration screen. You may need to generate a test event from Notion to get real data to test your workflow. #### 2. Action: Custom Code to Search Google Calendar Create a custom code step to search for a Google Calendar event using the title of the Notion page. ``` import { axios } from “@pipedream/platform”; export default defineComponent({ props: { notion: { type: “app”, app: “notion”, }, google: { type: “app”, app: “google”, }, }, async run({ steps, $ }) { // Get the title of the Notion page const notionPageId = steps.trigger.event.page_id; const notionPage = await axios($, { url: https://api.notion.com/v1/pages/${notionPageId}, headers: { Authorization: Bearer ${this.notion.$auth.oauth_access_token}, “Notion-Version”: 2021-08-16, }, }); const pageTitle = notionPage.properties.title.title[0].text.content; // Search for Google Calendar events with the title const calendarId = ‘primary’; // Use ‘primary’ for the primary calendar or specify another calendar ID const events = await axios($, { url: https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events, headers: { Authorization: Bearer ${this.google.$auth.oauth_access_token}, }, params: { q: pageTitle, },