To update the due dates of the matching Google Tasks, you can use the “Update Task” action from the Google Tasks app in Pipedream. Here’s how to set up the action: 1. Search for the Google Tasks app from the step menu. 2. Select the “Update Task” action. 3. Connect your Google account. 4. Select a Tasklist ID or pass a string from a previous step. 5. Select a Task ID or pass a string from a previous step. 6. Configure the “Due Date” field with the updated due date extracted from the Notion page. After setting up the “Update Task” action, your workflow will update the due date of the Google Task when the due date is changed in Notion.
What step should I set up so that I can pass a string from a previous step for the Task ID?
To pass a string from a previous step for the Task ID, you’ll first need a step that retrieves or generates the Task ID. This could be a step that fetches tasks from Google Tasks API or a custom code step that processes data to obtain the Task ID. For example, if you have a step that fetches tasks from Google Tasks API and stores the response in steps.fetch_tasks
, you can access the Task ID in the “Update Task” action like this: 1. Add the “Update Task” action from the Google Tasks app. 2. In the “Task ID” field, use the variable steps.fetch_tasks.data.id
(assuming the Task ID is stored in the id
property of the fetched task data). Make sure to replace fetch_tasks
with the actual name of the step that retrieves the Task ID.
Can you write a google tasks api node.js code that will fetch tasks like you say?
Sure, here’s an example Pipedream component that fetches tasks from a specific tasklist using the Google Tasks API: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { google: { type: "app", app: "google", }, tasklistId: { type: "string", label: "Tasklist ID", }, }, async run({ steps, $ }) { const url = `https://tasks.googleapis.com/tasks/v1/lists/${this.tasklistId}/tasks`; const response = await axios($, { method: "GET", url: url, headers: { Authorization: `Bearer ${this.google.$auth.oauth_access_token}`, }, }); return response; }, });
Replace tasklistId
with the ID of the tasklist you want to fetch tasks from. This component will fetch tasks from the specified tasklist and return the response from the Google Tasks API.