Skip to content
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

feat: n8n integration #349

Closed
wants to merge 1 commit into from
Closed
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
24 changes: 24 additions & 0 deletions server/src/models/Robot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ interface RobotAttributes {
google_sheet_id?: string | null;
google_access_token?: string | null;
google_refresh_token?: string | null;
n8n_email?: string | null;
n8n_access_token?: string | null;
n8n_refresh_token?: string | null;
n8n_workflow_id?: string | null;
schedule?: ScheduleConfig | null;
}

Expand Down Expand Up @@ -53,6 +57,10 @@ class Robot extends Model<RobotAttributes, RobotCreationAttributes> implements R
public google_sheet_id?: string | null;
public google_access_token!: string | null;
public google_refresh_token!: string | null;
public n8n_email!: string | null;
public n8n_access_token!: string | null;
public n8n_refresh_token!: string | null;
public n8n_workflow_id!: string | null;
public schedule!: ScheduleConfig | null;
}

Expand Down Expand Up @@ -95,6 +103,22 @@ Robot.init(
type: DataTypes.STRING,
allowNull: true,
},
n8n_email: {
type: DataTypes.STRING,
allowNull: true,
},
n8n_access_token: {
type: DataTypes.STRING,
allowNull: true,
},
n8n_refresh_token: {
type: DataTypes.STRING,
allowNull: true,
},
n8n_workflow_id: {
type: DataTypes.STRING,
allowNull: true,
},
schedule: {
type: DataTypes.JSONB,
allowNull: true,
Expand Down