Skip to content
New issue

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

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

Already on GitHub? # to your account

Programmatic-style node tutorial outdated #49

Open
Noiirod opened this issue Jul 19, 2024 · 4 comments
Open

Programmatic-style node tutorial outdated #49

Noiirod opened this issue Jul 19, 2024 · 4 comments

Comments

@Noiirod
Copy link

Noiirod commented Jul 19, 2024

Hello,
its me again, i have a problem with the programmatic-style node tutorial, 2 on 3 imports are outdated.

import {
	IExecuteFunctions,
} from 'n8n-core';

import {
	OptionsWithUri,
} from 'request';

I found that the first one is changed by n8n-workflow, but what about the second ? and how i should change the code in the exemple to match the right import :

// Make HTTP request according to https://sendgrid.com/docs/api-reference/
			const options: OptionsWithUri = {
				headers: {
					'Accept': 'application/json',
				},
				method: 'PUT',
				body: {
					contacts: [
						data,
					],
				},
				uri: `https://api.sendgrid.com/v3/marketing/contacts`,
				json: true,
			};
			responseData = await this.helpers.requestWithAuthentication.call(this, 'friendGridApi', options);
			returnData.push(responseData);
		}

Thanks by advance !

@netroy
Copy link
Member

netroy commented Jul 19, 2024

can you please link to the tutorial you are using? we can then try to get it updated 🙏🏽

@Noiirod
Copy link
Author

Noiirod commented Jul 19, 2024

@Joffcom
Copy link
Member

Joffcom commented Jul 19, 2024

I have created DOC-961 as the internal ticket to update the guides.

@Noiirod
Copy link
Author

Noiirod commented Jul 19, 2024

Thank you !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants