This topic was automatically generated from Slack. You can find the original thread here.
i need to pull data from Google Calendar, but from all the calendars that the account has access to, not just a hardcoded list of calendar IDs
This topic was automatically generated from Slack. You can find the original thread here.
i need to pull data from Google Calendar, but from all the calendars that the account has access to, not just a hardcoded list of calendar IDs
To pull data from all Google Calendars that an account has access to, you can use the Google Calendar API. Here’s a Pipedream component example that lists all calendars accessible by the authenticated Google account: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { google: { type: "app", app: "google", }, }, async run({ steps, $ }) { const response = await axios($, { url: `https://www.googleapis.com/calendar/v3/users/me/calendarList`, headers: { Authorization: `Bearer ${this.google.$auth.oauth_access_token}`, }, }); return response.items.map(calendar => ({ id: calendar.id, summary: calendar.summary, })); }, });
### Explanation - OAuth Authentication: The component uses OAuth to authenticate with Google. Ensure that the Google account is connected to Pipedream with the necessary permissions. - API Endpoint: The request is made to the calendarList
endpoint, which returns all calendars the user has access to. - Response Handling: The response is mapped to return a list of calendar IDs and their summaries. You can use this component in a Pipedream workflow to dynamically access all calendars associated with the account. If you need further assistance, please refer to the Google integration documentation on Pipedream.
but i can’t use this with the New Upcoming Event Alert because that only accepts a single calendar ID
It seems like you’re encountering an issue with the “New Upcoming Event Alert” trigger, which only accepts a single calendar ID. If you need to monitor multiple calendars, you might consider creating separate workflows for each calendar ID, each using the “New Upcoming Event Alert” trigger with a different calendar ID. If this approach doesn’t meet your needs, or if you have additional requirements, please provide more details so I can assist you further. Alternatively, you can visit Pipedream Support for more support options.