Skip to content

[pull] main from baptisteArno:main #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/credentials/src/decryptAndRefreshCredentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const decryptAndRefreshCredentialsData = async (
};

try {
console.log("refreshing credentials");
const tokens = await ky
.post(blockDef.auth.tokenUrl, {
json: {
Expand Down
2 changes: 0 additions & 2 deletions packages/credentials/src/getGoogleSpreadsheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export const getGoogleSpreadsheet = async ({
secret: env.GOOGLE_SHEETS_CLIENT_SECRET,
};

console.log("is expired", expiry_date && expiry_date > Date.now());

if (expiry_date && expiry_date > Date.now())
return new GoogleSpreadsheet(spreadsheetId, {
token: access_token,
Expand Down
4 changes: 3 additions & 1 deletion packages/forge/blocks/gmail/src/actions/sendEmail.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { gmail } from "@googleapis/gmail";
import { createAction, option } from "@typebot.io/forge";
import { parseUnknownError } from "@typebot.io/lib/parseUnknownError";
import { isDefined } from "@typebot.io/lib/utils";
import { isDefined, isNotEmpty } from "@typebot.io/lib/utils";
import { OAuth2Client } from "google-auth-library";
import { auth } from "../auth";
import { buildEmail } from "../helpers/buildEmail";
Expand Down Expand Up @@ -50,6 +50,7 @@ export const sendEmail = createAction({
placeholder: "[email protected]",
moreInfoTooltip:
"If provided, the reply to this email will be set to the provided email address",
isHidden: ({ threadId }) => isNotEmpty(threadId),
}),
responseMapping: option.saveResponseArray(["Thread ID"]).layout({
accordion: "Save response",
Expand Down Expand Up @@ -156,6 +157,7 @@ export const sendEmail = createAction({
},
});
} catch (labelError) {
console.error(labelError);
logs.add(`Failed to apply label: ${labelError}`);
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/forge/blocks/gmail/src/auth.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { createAuth } from "@typebot.io/forge";

const gmailScopes = [
"https://www.googleapis.com/auth/gmail.send",
"https://www.googleapis.com/auth/gmail.labels",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/userinfo.email",
] as const;
Expand Down
Loading